Last answered:

16 Dec 2021

Posted on:

04 Nov 2021

0

Working on date columns while conversion of data type to time stamp its not converted to required

df_reason_mod["Date"] = pd.to_datetime(df_reason_mod["Date"],format = "%d%m%Y") 

Even after executing this i am getting a type error

TypeError: Unrecognized value type: <class 'str'>


ValueError: time data '07/07/2015' does not match format '%d%m%Y' (match)
1 answers ( 0 marked as helpful)
Instructor
Posted on:

16 Dec 2021

0

Hi Ketan!
Thanks for reaching out.

You should use backslashes (\) between the specificators for day, month and year.

Hope this helps.
Best,
Tsvetelin

Submit an answer