title: How to drop a row using iloc method
body: <p>I dropped the first two <strong>columns</strong> using the iloc method in the following code without any problem.</p>
  
  <pre><code>eng_df.drop(eng_df.iloc[:,:2] , axis=1, inplace=True)
  </code></pre>
  
  <p>But I tried to delete the first <strong>row</strong> with the iloc method in the following code and it did not work:</p>
  
  <pre><code>eng_df.drop(eng_df.iloc[:1 , :] ,  inplace=True)
  </code></pre>
  
  <p>... and get the following warning:</p>
  
  <p>KeyError: "['Country' 'Energy Supply' 'Energy Supply per Capita' '% Renewable'] not found in axis"</p>
  
  <p>I know I can drop the row in different ways, but my question is can I drop rows with the iloc method, if so, how can I do that and  what is wrong in my codes? Thanks... </p>