title: pandas - Why am I unable to skip rows using the "skiprows" parameter of Pandas
body: <p>So, have a look at the following code:</p>
  
  <pre><code>import numpy as np
  import pandas as pd
  
  def answer_one():
  
      energy = pd.read_excel(io = "Energy Indicators.xls", header = 9, parse_cols = "C:F", skip_footer = 38)
      return energy
  
  answer_one()
  </code></pre>
  
  <p>It produces the following output:</p>
  
  <p><a href="https://i.stack.imgur.com/J1EpT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/J1EpT.png" alt="enter image description here"></a></p>
  
  <p>Now, when I make a little modification to the code, as below, it changes the output completely:</p>
  
  <pre><code>def answer_one():
  
      energy = pd.read_excel(io = "Energy Indicators.xls", header = 9, parse_cols = "C:F", skip_footer = 38, skiprows = 8)
      return energy
  
  answer_one()
  </code></pre>
  
  <p>The output that I get is as follows:</p>
  
  <p><a href="https://i.stack.imgur.com/I8X6a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/I8X6a.png" alt="enter image description here"></a></p>
  
  <p>Depending upon the argument that I give to the "skiprows" parameter, the output changes itself. I am unable to understand why does changing the value of "skiprows" affect the headers of the dataframe, when we are keeping the argument of the "headers"parameter unchanged? Please find the data file (.xlsx file) <a href="https://drive.google.com/open?id=17Pb50j1RlghSspsjcQV3_RVG-nCIB9lg" rel="nofollow noreferrer">here</a></p>
  
  <p>Any help please? I use Pandas v0.19.2. Also, please don't tag my question as "duplicate". I lose points man. I tried reasonably well to find an existing question, but could not.</p>