Karush Kuhn Tucker
Karush Kuhn Tucker

Reputation: 9

How to change date datetype of df column entries

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!

Upvotes: 0

Views: 19

Answers (1)

Naveed
Naveed

Reputation: 11650

use to_datetime to convert the dates to datetiem

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

Upvotes: 1

Related Questions