📅  最后修改于: 2022-03-11 14:46:23.240000             🧑  作者: Mango
pd.to_datetime(df['date'], errors='coerce').dt.year.astype(object)
0 1998
1 NaN
2 2009
3 2009
4 2009
Name: date, dtype: object