(python)DataFrame 分別寫入 Excel 的工作表

import pandas as pd


with pd.ExcelWriter('test2.xlsx') as writer:  

    x.to_excel(writer, sheet_name='工作表1') # 注意要縮排

    y.to_excel(writer,sheet_name='工作表2')

沒有留言:

張貼留言

附錄

附錄 A 集合 (APPENDIX A SETS) 一個 集合 (set) 是一些被稱為該集合之 元素 (elements) 的物件的聚集。如果 x 是集合 A 的一個元素,那麼我們寫作 x \in A ;否則,我們寫作 x \notin A 。例如,如果 Z...