pandas导入excel文件的时间问题处理

在进行excel中导入时间经常无法处理

import datetime
def date(dates):
    delta=datetime.timedelta(days=dates)
    today=datetime.datetime.strptime('1899-12-30','%Y-%m-%d')+delta
    return datetime.datetime.strftime(today,'%Y年%m月%d日')
print(date(44140))
#2020年11月05日

感觉有用点赞加关注

猜你喜欢

转载自blog.csdn.net/weixin_45631815/article/details/109670141
今日推荐