title: Skip initial empty rows and columns while reading in pandas
body: <p>I have a excel like below</p>
  <p><a href="https://i.stack.imgur.com/SoYOz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SoYOz.png" alt="enter image description here" /></a></p>
  <p>I have to read the excel and do some operations. The problem is I have to skip the empty rows and columns.In the above example it should read only from B3:D6. But with below code, it considers all the empty rows also like below</p>
  <p><a href="https://i.stack.imgur.com/yrQWn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yrQWn.png" alt="enter image description here" /></a></p>
  <p>Code i'm using</p>
  <pre><code>import pandas as pd
  user_input = input(&quot;Enter the path of your file: &quot;)
  user_input_sheet_master = input(&quot;Enter the Sheet name : &quot;)
  master = pd.read_excel(user_input,user_input_sheet_master)
  print(master.head(5))
  </code></pre>
  <p>How to ignore the empty rows and columns to get the below output</p>
  <pre><code>          ColA       ColB       ColC
  0           10         20         30
  1           23        NaN         45
  2          NaN         30         50
  </code></pre>
  <p>Based on some research i have tried using <code>df.dropna(how='all')</code> but it also deleted the <code>COLA</code> and <code>COLB</code>. I cannot hardcode value for <code>skiprows</code> or <code>skipcolumns</code> because it may not be same format every time.The no of rows and columns to be skipped may vary. Sometimes there may not be any empty rows or columns. In that case, there is no need to delete anything.</p>