1

I needed to read few tables from manualy made excel. Here I found a solution:

pandas read_excel multiple tables on the same sheet

But it didn't fix my whole problem, because some of my tables has multiindex column names. I tried this way:excel example

nrows = excel_file.book.sheet_by_index(0).nrows  
table2 = excel_file.parse(0, skiprows=6, skip_footer=nrows - 11, header=[0,1,2]).dropna(axis=1, how='all')

and in this cases I have "ValueError: Length of new names must be 1, got 3"

I have found that if my excel file will look like this:modified excel file (without columns in other tables that are longer than table i read) then it works! How can I solve this problem?

SoulMan
  • 11
  • 3

0 Answers0