pd.to_datetime format '%Y-%m-%d' does not apply

Viewed 9

when using python and pandas I want to convert time full datetime [ns] format to YYYY-mm-dd format. When applying the format according to instructions, it does not apply at all.

pd.to_datetime(df.datum, format='%Y-%m-%d') pd.to_datetime(df.datum.astype('str'), format='%Y-%m-%d')
Result in: 2018-09-02 09:47:53enter image description here

I would like to understand how to properly use the inbuilt format-parameter for pd.datetime to make it apply completely. Any ideas?

0 Answers
Related