datetime - Pandas to_datetime returns error for perfectly fine python time -


so have bunch of data has timestamps in python epoch time format, using to_datetime() function returns valueerror: unconverted data remains: 00

here's code

import pandas pd  print pd.to_datetime('1451080800', format='%y%m%d') 

what's going wrong here ?

since epoch time, think want this:

in [44]: pd.to_datetime(int('1451080800'), unit='s') out[44]: timestamp('2015-12-25 22:00:00') 

note int(..) around string. when specifying unit (epoch in seconds since 1970), argument needs integer.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -