python - Getting CSV sheet name with python
问题描述
Is there something similar or equivalent to get CSV file sheet name, such as pd.ExcelFile(file), sheet_names, for excel files?
xl = pd.ExcelFile(file)
xl.sheet_names
解决方案
@pavel, answered the question, thanks guys. CSV is a text file. It doesn't have sheet names. Note that any CSV you open in Excel will automatically have only one sheet named 'Sheet1'. – pavel Jun 12 at 2:38
推荐阅读
- apache-spark - 基于流的应用程序中的受控/手动错误/恢复处理
- python - 为什么列表的(深)副本比原始列表消耗更多内存?
- bash - macOS launchd 可以运行 bash 脚本吗?
- java - 从提供的列表之一中获取非重复值
- javascript - 将 HTML Canvas 坐标系转换为笛卡尔坐标系
- android - 为预安装的应用程序设置初始 shared_prefs?
- etl - 数据集编写器失败
- javascript - 滚动后暂停或停止 Instagram 嵌入视频
- ruby-on-rails - rake db:setup 未加载库:@rpath/libgssapi_krb5.2.2.dylib 错误
- c# - 任务或线程 c#