title: How to import filtered excel table into python?
body: <p>I have an excel table, it looks like</p>
  
  <p><a href="https://i.stack.imgur.com/vooaT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vooaT.png" alt="enter image description here"></a></p>
  
  <p>Then, I created a filter on the column Sex to get all the female data, it looks like:</p>
  
  <p><a href="https://i.stack.imgur.com/8eFS3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8eFS3.png" alt="enter image description here"></a></p>
  
  <p>Then, I want to import the filtered data into python. I used the following pandas command:</p>
  
  <pre><code>df = pd.read_excel(io="test.xlsx", sheetname="Sheet1")
  print(df)
  </code></pre>
  
  <p>The problem is that I got the entire data: </p>
  
  <pre><code>   Id   Name  Age Sex
  0   1    Tom   12   M
  1   2  Silke   33   F
  2   3   Olga   22   F
  3   4    Tom   33   M
  </code></pre>
  
  <p>However, this is not what I want, I only want the filtered data:</p>
  
  <pre><code>   Id   Name  Age Sex
  1   2  Silke   33   F
  2   3   Olga   22   F
  </code></pre>
  
  <p>How can I do this with python?</p>
  
  <hr>
  
  <p><strong>Notice:</strong> The reason why I want to import the filtered data but not filter data in python, is because of the original excel data. The filters in the excel table are very complicated. It based not only on many columns but also thousands of different values. It will be a big problem if I filter the data in python. </p>