Expressing index (0-9) with two digits like- 01,02,03... rather 1,2,3... to work with Series(Pandas),
I worte this code in jupyter notebook:
students = {01 : 'Ajoy',
03 : 'Tanzin',
04 : 'Sakib',
07 : 'Rahsed',
10 : 'Shawon'}
s = pd.Series(students)
s
I got back:
File "<ipython-input-50-ae82df390e04>", line 1
students = {01 : 'Ajoy',
^
SyntaxError: invalid token
But, when I made a little change, starting index (0-9) with only one digit,the program executed successfully!
students = {1 : 'Ajoy',
3 : 'Tanzin',
4 : 'Sakib',
7 : 'Rahsed',
10 : 'Shawon'}
s = pd.Series(students)
s
Output :
1 Ajoy
3 Tanzin
4 Sakib
7 Rahsed
10 Shawon
dtype: object
Why I can't start the index using the first method?
Is there any bound to do it?
Or, how can I start expressing the index starts with 2 digits?