Answers for "save datetime day in seperate column"

0

save datetime day in seperate column

df["day"] = df['datetime_utc'].map(lambda x: x.day)
df["month"] = df['datetime_utc'].map(lambda x: x.month)
df["year"] = df['datetime_utc'].map(lambda x: x.year)
Posted by: Guest on July-30-2021

Python Answers by Framework

Browse Popular Code Answers by Language