title: pandas dataframe update values using groupby
body: <p>I have a pandas dataframe with id and date:</p>
  <pre><code>data = [{'id': 'a', 'date': 1, 'value':3}, {'id':'b', 'date': 1, 'value': 30},
      {'id': 'a', 'date': 2, 'value':5}, {'id':'b', 'date': 2, 'value': 20}] 
  test_df = pd.DataFrame(data)
  </code></pre>
  <p>I want to loop over each date and do some calculation with value column to get an adjusted_value column:</p>
  <pre><code>for idx, daily_df in test_df.groupby('date'):
      daily_df['adj_value'] = some functions
  </code></pre>
  <p>I have two questions:</p>
  <ol>
  <li>I am getting a warning from this: <code>A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead</code></li>
  <li>I want to add the adj_value column to the original test_df</li>
  </ol>