python pandas to_datetime change format -


my input text based, e.g. column "closeddate" = "2016-10-31 16:54:18"

with:

df.closeddate = pd.to_datetime(df.closeddate).dt.date 

i format "2016-10-31", i.e. keeping date part , dropping time, works fine far, need "31.10.2016".

what best , "elegant way accomplish that? tried adding "format = "%d%m%y" doesn't work.

thanks


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -