How To Convert Multiple Date Formats In One Format In Pandas
I have following pandas dataframe with date column as object ID Date Volume 0 13-02-2018 00:06 85 1 13-02-2018 00:10 70 2
Solution 1:
try this:
df['Date'] = pd.to_datetime(df.Date)
df['Date'] = df['Date'].dt.strftime('%Y-%m-%d %H:%M')
link: Series.dt.strftime
Post a Comment for "How To Convert Multiple Date Formats In One Format In Pandas"