📜  从 datetime pandas 开始的月份 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:21.107000             🧑  作者: Mango

代码示例1
#Exctract month and create a dedicated column df["Month"] from a 
#column in datetime format df["Date"]
df['Month'] = pd.DatetimeIndex(df['Date']).month