I am looking to parse an excel spreadsheet. I decided to use pandas but got caught by an error straight off the bat.
I started with the code below but played around with using a full path and also tried setting the sheetname.
import pandas as pd
table = pd.read_excel('ss_12.xlsx')
if __name__ == '__main__':
pass
The excel spreadsheet is in the same directory as my script file. I taught it would work the same as open() in this sense, just a name required if its in the same directory. I have looked at a few examples online and going by them this should work.
I am trying to strip the first column seen in the image above. The full error (not sure how to format it, sorry)
C:\xx\Playpen\ConfigList_V1_0.xlsx
Traceback (most recent call last):
File "C:\xx\Playpen\getConVars.py", line 12, in <module>
pd.read_excel(excelFile)
File "C:\xx\Programs\Python\Python35\lib\site-packages\pandas\io\excel.py", line 200, in read_excel
**kwds)
File "C:\xx\Programs\Python\Python35\lib\site-packages\pandas\io\excel.py", line 432, in _parse_excel
sheet = self.book.sheet_by_index(asheetname)
File "C:\xx\Programs\Python\Python35\lib\site-packages\xlrd\book.py", line 432, in sheet_by_index
return self._sheet_list[sheetx] or self.get_sheet(sheetx)
IndexError: list index out of range