以下コードで最終行付近でエラーがでます。
何か良い方法はないでしょうか。
python3
1import camp 2import pandas as pd 3df = pd.read_excel(r'C:\Users\xxxx.xlsx') 4result_df_dict = {} 5for key, query_params in df.to_dict(orient='index').items(): 6 param_key = str(key) 7 8 result_df_dict[f'do_query_3_{param_key}'] = camp.do_query_3(**query_params) 9with pd.ExcelWriter('.\結果.xlsx', 10 engine='xlsxwriter', 11 options={'remove_timezone'}) as writer: 12 for key, df in result_df_dict.items(): 13 df.to_excel(writer, sheet_name=key)
error
1 2 File "C:xxxxxContinuum\anaconda3\lib\site-packages\pandas\io\formats\excel.py", line 437, in _format_value 3 "Excel does not support datetimes with " 4 5ValueError: Excel does not support datetimes with timezones. Please ensure that datetimes are timezone unaware before writing to Excel.
回答1件
あなたの回答
tips
プレビュー