Hey I am trying to parse an excel using pandas. I want to parse 1 excel row (e.g first row) starting from a fixed column in the excel (e.g. column "F") and until the last non-empty column.
Until now the last non-empty column was "M" so I used a fixed number for the end like this:
pd.read_excel(excel_file,"header": None,"nrows": 1, usecols="F:M")
| - | A | B | C | D | E | F | G | H | I | J | K | L | M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | col_A | col_B | col_C | col_D | col_E | FIRST_COL | col_G | col_H | col_I | col_J | col_K | col_L | LAST_COL |
The numbers of columns can grow to the right, and I still want to parse the added columns. The starting column is fixed though.
I tried to look in panda's usecols documentation
Also I saw that you can use usecols with names, but I don't have any knowledge about the name of the last column or any column in this excel.
I can modify the excel though, e.g. to sign the with a special value the column after the last one to parse (if needed), but I don't know how to parse the excel even with that addition.
pandas==1.3.4
Python 3.7.5
Windows 10
Excel 2019