title: Pandas groupby TypeError: '>' not supported between instances of 'SeriesGroupBy' and 'int'
body: <p>I have the following code:</p>
  
  <pre><code>group = df.groupby(['Id',  'Name'])
  conditions = [
      ((group["Balance"]&gt;0) &amp; (group['Value']&gt;0) &amp; (group['L_Date']&lt;=group['c_date'])),
      ((group["Balance"]==0) &amp; (group['Value']==0) &amp; (group['L_Date']&lt;=group['c_date']))]
  choices = ['Good', 'Bad']
  df['outcome'] = np.select(conditions, choices, default='Normal')
  </code></pre>
  
  <p>But it is giving me the following error:</p>
  
  <pre><code>TypeError: '&gt;' not supported between instances of 'SeriesGroupBy' and 'int'
  </code></pre>
  
  <p>What is the correct way to do this?</p>