📅  最后修改于: 2022-03-11 14:45:04.704000             🧑  作者: Mango
#pandas datetimeindex docs: https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DatetimeIndex.html
df['month'] = pd.DatetimeIndex(df['birth_date']).month
df.head()