参考资料:

https://blog.csdn.net/weixin_38546295/article/details/83537558#2%E3%80%81sheet_name%EF%BC%8C%E8%A6%81%E8%AF%BB%E5%8F%96%E7%9A%84%E5%B7%A5%E4%BD%9C%E8%A1%A8%E5%90%8D%E7%A7%B0

 

安装pandas

 Pip install pandas

Python pandas库读取excel文件

安装xlrd

Pip install xlrd

Python pandas库读取excel文件

Panda库常用方法:

  1. 读取文件read_excel:

File=pandas.read_excel(io, sheet_name=0, header=0, skiprows=None, skip_footer=0, index_col=None, names=None, usecols=None, parse_dates=False, date_parser=None, na_values=None, thousands=None, convert_float=True, converters=None, dtype=None, true_values=None, false_values=None, engine=None, squeeze=False, **kwds)

其中:

io表示文件路径;

sheet_name表示工作表名称;

header表示列名;

names表示给列增加列名

 

参考文档:https://blog.csdn.net/u010801439/article/details/80052677

Python pandas库读取excel文件

相关文章:

  • 2022-12-23
  • 2021-09-14
  • 2022-12-23
  • 2021-11-14
  • 2021-06-03
  • 2021-11-28
  • 2021-06-16
猜你喜欢
  • 2021-10-20
  • 2022-12-23
  • 2022-12-23
  • 2021-10-05
  • 2021-08-23
  • 2021-04-17
相关资源
相似解决方案