当前位置: 首页 > news >正文

保存文件带上时间蹉

保存文件带上时间蹉

    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)