open_in_new
content_copy
df['year'] = df['insert_dataframe_here'].dt.year df['month'] = df['insert_dataframe_here'].dt.month