title: Failed to filter rows containing a specific value in the index column after resetting index
body: <p>I'm organizing data of a number of plans, which contains the information of the phase of the plan, P(Preliminary) or F(Final). I'm using the methods shown in the <a href="https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.filter.html" rel="nofollow noreferrer">examples</a> in the pandas documentation.</p>
  
  <pre><code>df1 = pd.read_excel('FilePath', sheetname = 'ForFilter')
  df1
  
  
  landuse_SUB_ID  TYPE    RECD_DATE   PHASE   LAND_USE    CPACTIONDA
  0   24  1   2000-04-07  P   ROW 2000-05-04
  1   24  1   2000-04-07  P   NONE    2000-05-04
  2   25  1   2000-08-10  P   COMM    2000-09-08
  3   34  1   2000-04-14  F   REC 2000-04-14
  4   34  1   2000-04-14  F   SFD 2000-04-14
  5   35  1   2000-01-20  P   NONE    2000-02-02
  6   42  1   2000-04-04  P   SFD 2000-05-01
  7   42  1   2000-12-06  P   SFD 2001-01-03
  8   43  1   2000-09-07  P   NONE    2000-09-21
  9   51  1   2000-11-10  P   NONE    2000-11-28
  10  53  1   2000-02-22  F   SFD 2000-02-22
  </code></pre>
  
  <p>After playing with the methods in the example (using <code>like</code> and <code>regex</code>), it seems to me that these methods can only filter the values in the index column. Therefore I changed the index:</p>
  
  <pre><code>df1_filter1 = df1.set_index('PHASE')
  
  
  landuse_SUB_ID  TYPE    RECD_DATE   LAND_USE    CPACTIONDA
  PHASE                   
  P   24  1   2000-04-07  ROW 2000-05-04
  P   24  1   2000-04-07  NONE    2000-05-04
  P   25  1   2000-08-10  COMM    2000-09-08
  F   34  1   2000-04-14  REC 2000-04-14
  F   34  1   2000-04-14  SFD 2000-04-14
  P   35  1   2000-01-20  NONE    2000-02-02
  P   42  1   2000-04-04  SFD 2000-05-01
  P   42  1   2000-12-06  SFD 2001-01-03
  P   43  1   2000-09-07  NONE    2000-09-21
  P   51  1   2000-11-10  NONE    2000-11-28
  F   53  1   2000-02-22  SFD 2000-02-22
  </code></pre>
  
  <p>Now the data frame is using <code>Phase</code> as index, I used the <code>like</code> method to filter <code>df1_filter1</code>:</p>
  
  <pre><code>df1_filter1.filter(like = 'F', axis = 0)
  </code></pre>
  
  <p>I get the error </p>
  
  <blockquote>
    <p>"ValueError: cannot reindex from a duplicate axis"</p>
  </blockquote>
  
  <p>This seems like a really simple operation to me, so I'm just wondering what I did wrong to have caused this error. And what shall be the best method (fewest steps and cleanest code) for my question.</p>