Home > Back-end >  How to change date datetype of df column entries
How to change date datetype of df column entries

Time:10-13

Within a df, the entries of a column "Date" (n entries) are of type datetime.datetime and I want to convert every entry to type datetime.date. Can anyone help here? THX!

CodePudding user response:

use to_datetime to convert the dates to datetiem

df[Date] = pd.to_datetime(df[Date]).dt.date
  • Related