numpy 1.19.2 version版本使用
输入为numpy.datetime64('2021-04-10T00:00:00.000000000')转为到datetime
def datenumpy(dates):
month=pd.Timestamp(dates).to_pydatetime().month
day = pd.Timestamp(dates).to_pydatetime().day
return str(month)+'.'+str(day)
numpy 1.19.2 version版本使用
输入为numpy.datetime64('2021-04-10T00:00:00.000000000')转为到datetime
def datenumpy(dates):
month=pd.Timestamp(dates).to_pydatetime().month
day = pd.Timestamp(dates).to_pydatetime().day
return str(month)+'.'+str(day)