数据如下:
python 读没有列索引的数据

普通读法:
python 读没有列索引的数据

 

结果如下:(会直接把第一列作为索引,导致第一行的数用不了)
python 读没有列索引的数据

解决办法:header=None

python 读没有列索引的数据

结果如下:加一行数作为列索引

python 读没有列索引的数据

如果不要行索引  index_col=0

python 读没有列索引的数据

结果如下:

 python 读没有列索引的数据

将缺省值填充为0

python 读没有列索引的数据

结果如下:

python 读没有列索引的数据

 

相关文章:

  • 2022-12-23
  • 2021-11-05
  • 2022-02-18
  • 2022-12-23
  • 2022-02-08
  • 2022-01-15
  • 2021-12-19
  • 2021-11-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-17
  • 2022-12-23
  • 2021-04-11
  • 2021-05-18
相关资源
相似解决方案