保存文件带上时间蹉

    from datetime import datetime

    # 获取当前时间
    now = datetime.now()
    now=now.strftime("%Y%m%d%H%M%S")
    print("当前时间:", now)
    allData.to_excel('allData_'+now+'.xlsx',index=False)

posted on 2025-12-11 09:05  张博的博客  阅读(3)  评论(0)    收藏  举报

导航