title: Negate the values based on indicator
body: <p>i want to add negate the values of <code>Income</code> when <code>D</code> is found</p>
  
  <pre><code># Preparing data
  # Note that I have clean up the `jan` to `Jan` and `Charge` to `charge`
  [In]
  data = [{'Month': 'Jan', 'Name': 'Alice sal', 'id': 212, 'Info': 'charge', 'd/k': 'k', 'Income': 200},
  {'Month': 'Jan', 'Name': 'Alice sal', 'id': 212, 'Info': 'charge', 'd/k': 'k',  'Income': 10},
  {'Month': 'Feb', 'Name': 'Alice sal', 'id': 212, 'Info': 'charge', 'd/k': 'd', 'Ex/Im': 'export', 'Income': 100},
  {'Month': 'Jan', 'Name': 'Alice sal', 'id': 212, 'Info': 'charge', 'd/k': 'k', 'Income': 400},
  {'Month': 'Jan', 'Name': 'Alice sal', 'id': 212, 'Info': 'charge', 'd/k': 'k',  'Income': 10},
  {'Month': 'Feb', 'Name': 'Alice sal', 'id': 212, 'Info': 'charge', 'd/k': 'd', 'Ex/Im': 'export', 'Income': 200}]
  
  [Out]   Months   Name      id   Info   d/k  Ex/Im    Income
      0   Jan    Alice sal  212  charge  k    export     200
      1   Jan    Alice sal  212  charge  k    export      10
      2   Jan    Alice sal  212  charge  d    export     100
      3   Jan    Alice sal  212  charge  k    Import     400
      4   Jan    Alice sal  212  charge  k    Import      10
      5   Jan    Alice sal  212  charge  d    Import     200
  
  df = pd.DataFrame(data)
  </code></pre>
  
  <p>*note:
  name from my data frame not only alice sal, i have similar case from every name</p>
  
  <p>i've already tried</p>
  
  <pre><code># 1. Negate the values of `Income` when `D` is found, 
  
  [In]:
  df.loc[df['d/k'] == 'D', 'Income'] = -df[df['d/k'] == 'D']['Income']
  print(df)
  
  [Out]  
         Months   Name      id   Info   d/k  Ex/Im    Income
      0   Jan    Alice sal  212  charge  k    export     200
      1   Jan    Alice sal  212  charge  k    export      
      2   Jan    Alice sal  567  charge  d    export     
      3   Jan    Alice sal  212  charge  k    Import     400
      4   Jan    Alice sal  212  charge  k    Import     
      5   Jan    Alice sal  567  charge  d    Import 
  
  
  # 2. Group by
  
  [In]:
      gdf = df.groupby(['id', 'Month', 'Ex/Im', 'Info']).agg({'Income':'sum', 'Name':'first'})
  print(gdf)
  
  [Out]:
                   Income
  Month           Jan
  Ex/Im           export    import
  Info            charge    charge
  id    Name            
  212   Alice sal 200         400
  
  </code></pre>
  
  <p>ther's error warning:</p>
  
  <p>FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
    result = method(y)</p>
  
  <p><strong>my expected:</strong></p>
  
  <pre><code>                 Income
  Month           Jan
  Ex/Im           export    import
  Info            charge    charge
  id    Name            
  212   Alice sal 120         210
  
  </code></pre>