Command
df["date"].dtExplanation
The .dt accessor allows extraction of date parts from datetime columns.
Examples
Extract year
df["date"].dt.yearExtract month
df["date"].dt.monthExtract day
df["date"].dt.daydf["date"].dtThe .dt accessor allows extraction of date parts from datetime columns.
Extract year
df["date"].dt.yearExtract month
df["date"].dt.monthExtract day
df["date"].dt.day