title: Pandas read excel sheet with multiple header in row and columns and merged cells
body: <p>I'm new using pandas and I'm tring to use pandas read excel to work with a file as a df. The spreadsheet looks like this:</p>
  <p><a href="https://drive.google.com/file/d/1dLVNbSPZHEYUXPlJO53aGZsgGxG6VRuD/view?usp=sharing" rel="nofollow noreferrer">Excel Matrix</a></p>
  <p>The problem is that this file contains double headers in the colums and rows and the first header for each of them include merged cells. I tried this:</p>
  <pre><code>file = 'country_sector_py.xlsx' 
  
  matrix = pd.read_excel(file, sheet_name = 'matrix', header=[0, 1], index_col=[0, 1])
  
  </code></pre>
  <p>the error I get is &quot;ValueError: Length of new names must be 1, got 2.&quot; I've read some related posts that says it's due to some the headers are repeated, but I haven't been able to solve it. any guide would be much appreciated.</p>
  <p>References:</p>
  <p><a href="https://stackoverflow.com/questions/50472696/pandas-read-excel-sheet-with-multiple-header-when-first-column-is-empty">Pandas read excel sheet with multiple header when first column is empty</a></p>
  <p><a href="https://stackoverflow.com/questions/41251922/error-when-using-pandas-read-excelheader-0-1">Error when using pandas read_excel(header=[0,1])</a></p>