title: select rows by a pattern on the index column
body: <p>Please find below my input/output (desired):</p>
  <h4>Input :</h4>
  <pre><code>        OBID    NAME   VALUE
  0  ID-110503  Name 1    39.0
  1  ID-110504  Name 2   243.5
  2  ID-225930  Name 3  3212.0
  3  ID-339630  Name 4   350.0
  4  ID-117742  Name 5   785.0
  </code></pre>
  <p>After setting the column <code>OBID</code> as the index, I need to select all the rows (by using <code>df.loc</code>) that have an index matching the pattern <code>ID-11xxxx</code>.</p>
  <h4>Output (desired) :</h4>
  <pre><code>             NAME  VALUE
  OBID                    
  ID-110503  Name 1   39.0
  ID-110504  Name 2  243.5
  ID-117742  Name 5  785.0
  </code></pre>
  <p>I'm sorry if this is a stupid and/or a duplicated question but here is (if needed) a reproducible example.</p>
  <pre><code>import pandas as pd
  from io import StringIO
  
  s = &quot;&quot;&quot;OBID NAME    VALUE
  ID-110503   Name 1  39
  ID-110504   Name 2  243.5
  ID-225930   Name 3  3212
  ID-339630   Name 4  350
  ID-117742   Name 5  785
  &quot;&quot;&quot;
  
  df = pd.read_csv(StringIO(s), sep='\t')
  df.set_index('OBID', inplace=True)
  </code></pre>