NetEase cloud the classroom curriculum link address
The only remaining single excel spreadsheet easier to use df.to_excel
pd.ExcelWriter save the results to excel file that already exists, and supports multiple sheet table write excel.
Python openpyxl need to install third-party packages to excel more functional programming
Python code as follows
# -*- coding: utf-8 -*- """ Created on Sat Nov 30 13:24:28 2019 @author: [email protected] """ import numpy as np import pandas as pd df1 = pd.DataFrame({"name": ['Alfred', 'Batman', 'Catwoman'], "toy": [np.nan, 'Batmobile', 'Bullwhip'], "born": [pd.NaT, pd.Timestamp("1940-04-25"), pd.NaT]}) df2 = pd.DataFrame({"name": ['Alfred', 'Jim', 'Catwoman'], "toy": [np.nan, 'Batmobile', 'Bullwhip'], "born": ['Greens',pd.Timestamp("1940-04-25"), pd.NaT]}) with pd.ExcelWriter('result.xls') as writer: df1.to_excel(writer, sheet_name='sheet1') df2.to_excel(writer, sheet_name='sheet2') # Remaining single excel spreadsheet easier to use to_excel df1.to_excel("result.xlsx")
-
https://study.163.com/provider/400000000398149/index.htm?share=2&shareId=400000000398149 (video bloggers teaching Home)
Micro-channel scan two-dimensional code, free resources to learn more python