Hey Guys. i am working on pandas.
i need to change the format of the date
given format - 2/jun/2011
to be converted to = 2011/06/02
on shell i used
>>> import pandas as pd
>>> obj = pd.read_csv('foo.csv')
>>> obj['date'] = pd.to_datetime(obj['date'], format="%Y/%m/%d")
it work totaly fine and give the correct result
THE PROBLEM IS
when is am making a script of that it gives an error
AttributeError: 'module' object has no attribute 'to_datetime'
i have seen in the mailing list some suggested that to_datetime is not in pandas library but if it is so how it works on shell mode.
i also tries DatetimeIndex it is also not working,,,
Plzz can any1 suggest me something.......