I have a dataframe with a datetime column. I want to retain only until minutes and drop the seconds and milliseconds.
How do I do this?
I have a dataframe with a datetime column. I want to retain only until minutes and drop the seconds and milliseconds.
How do I do this?
You can use this:
df['SubmitTimePst'] = pd.to_datetime(df['SubmitTimePst']).dt.strftime('%Y-%m-%d %H:%M')