title: Filter dataframe rows by index name
body: <p>I have a DataFrame where I want to drop elements depending on their index name</p>
  
  <pre><code>               col1  col2
  entry_1          10    11
  entry_2_test     12    13
  entry_3          14    15
  entry_4_test     16    17
  </code></pre>
  
  <p>Basically I want to drop the ones ending with _test</p>
  
  <p>I know how to select them:</p>
  
  <pre><code>df.filter(like='_test', axis=0)
  
                 col1  col2
  entry_2_test     12    13
  entry_4_test     16    17
  </code></pre>
  
  <p>Then I can actually get those indexes:</p>
  
  <pre><code>df.filter(like='_test', axis=0).index
  
  entry_2_test
  entry_4_test
  </code></pre>
  
  <p>And finally I can drop those indexes and overwrite my dataframe with the filtered one.</p>
  
  <pre><code>df = df.drop(df.filter(like='_test', axis=0).index)
  df
  
                 col1  col2
  entry_1          10    11
  entry_3          14    15
  </code></pre>
  
  <p>My question is if this is the correct way of filtering or there's a more efficient dedicated function to do this?</p>