📅  最后修改于: 2022-03-11 14:45:44.487000             🧑  作者: Mango
try:
df.to_csv(
path_to_csv + f'\{file_name}_{now.strftime("%Y-%m-%d")}_to_{now.strftime("%H.%M")}.csv',
date_format='%Y-%m-%d %H:%M:%S', encoding='utf-8', index=False)
except OSError as e:
print("Failed to create the file.......")
raise SystemExit(e)