我正在用pandas阅读我的excel表格,逐行迭代并用它做一些事情。我的输入文件只有7行,其中有一些rocord。但是,当我打印数据帧时,我得到了如下所示的结果,其中有额外的行带有“NaN”。当我的脚本迭代索引7时,它会失败,并出现ValueError异常。在
inputfile = r'C:\Users\users\Desktop\release\someexcel.xlsx'
dfr = pan.read_excel(inputfile, skiprows=3, sheetname=1)
print (dfr)
以下例外与此问题无关。但当脚本试图执行索引7中的脚本时,出现了以下情况:
^{pr2}$这是我的输入文件:
数据帧如下所示:
你知道为什么会这样吗?我该怎么解决这个问题?在
目前没有回答
相关问题 更多 >
编程相关推荐