title: I need a way to search within a pandas grouped dataframe
body: <p>I have a dataset sort of like the following in an excel file named  data.xlsx</p>
  
  <pre><code>Building           name    salary
  00Apple032           Bob     50000
  00Apple032           James   30000
  0Bean032            James   30000
  0Soda987            Alex    0
  0Bean032            Bryon   32000
  </code></pre>
  
  <p>ive created two data frames from the data.</p>
  
  <pre><code>df = pd.read_excel('data.xlsx', sheet_name='Sheet1, dtype=str)
  
  grouped_df = pd.read_excel('data.xlsx', sheet_name='Sheet1, dtype=str)
  grouped = grouped_df.groupby("Building")[["Building", "name", "salary']]
  </code></pre>
  
  <p>Before I go on here .. the reason why I created the original df as well as grouped_df (which are both data frames) ... I'm not certain that applying the grouping function to the original df and assigning that to a new variable on a single line of code (like the below line) would somehow mess with the original data and cause trouble down the line. That may be inaccurate. </p>
  
  <pre><code>grouped = df.groupby("Builing")[["Building", "name", "salary']]
  </code></pre>
  
  <p>Anywho. This grouped dataframe is not like a normal dataframe to my knowledge. The type is listed as </p>
  
  <blockquote>
    <p>pandas.core.groupby.groupby.DataFrameGroupBy</p>
  </blockquote>
  
  <p>On the normal dataframe that is not grouped I can do something like this:</p>
  
  <pre><code>x = input("search for: ")
  df[df['Building'].str.contains(x)]]
  </code></pre>
  
  <p>however on a grouped dataframe this doesn't work. </p>
  
  <p>My problem that im trying to work around is this - i need to permit the ability to search in this grouped data frame to print the groups, but the user doesn't know the precise or exact group name. Was it Apples im searching for? Or 00Apples .. you can see the problem. </p>
  
  <p>While i can query the data with this:</p>
  
  <pre><code>grouped.get_group('00Apples032')
  </code></pre>
  
  <p>I don't have a way to offer someone the ability to search for that group via something like a str.contains. </p>
  
  <h2>What I have tried</h2>
  
  <pre><code>grouped[grouped["Building"].str.contains("Apples")]
  </code></pre>
  
  <h2>ERROR</h2>
  
  <pre><code>exception: Columns already selected  
  </code></pre>