【发布时间】:2018-12-12 06:53:55
【问题描述】:
【问题讨论】:
-
嗨,你应该做一些研究。随便搜索“python read excel”,你会发现很多相关的问题
【问题讨论】:
你可以使用pandas:
import pandas as pd
# Read multiple sheets from one workbook
with pd.ExcelFile('path_to_file.xlsx') as xlsx:
df1 = pd.read_excel(xlsx, 'Sheet1')
df2 = pd.read_excel(xlsx, 'Sheet2')
# Work with specific columns
df1[['Column1', 'Column2']] # Do something with these
df1[['Column1', 'Column2']] # Do something with these
【讨论】: