Good Morning,
I have the following Dataframe (Year, Month, Day, Hour, Sec):
print(df)
Date Price
2018-01-02 09:42:00 2
2018-01-02 09:46:00 4
2018-01-02 10:22:00 6
...
I would like to get, without minutes and seconds:
print(final_df)
Date Price
2018-01-02 2
2018-01-02 4
2018-01-02 6
...
I tried:
df['Date'] = datetime.datetime.strptime(df['Date'], '%Y-%m-%d').date()
But it reports "strptime() argument 1 must be str, not Series"