title: Taking inverse of certain rows in dataframe
body: <p>I have a dataframe of market trades and need to multiply only the put returns by -1. I have the code for that, but can't figure out how to assign it back without affecting the calls.</p>
  
  <p>Input df:</p>
  
  <pre><code>         Date  Type  Stock_Open  Stock_Close  Stock_ROI
  0  2016-04-27  Call        5.33         4.80  -0.099437
  1  2016-06-03   Put        4.80         4.52  -0.058333
  2  2016-06-30  Call        4.52         5.29   0.170354
  3  2016-07-21   Put        5.29         4.84  -0.085066
  4  2016-08-08  Call        4.84         5.35   0.105372
  5  2016-08-25   Put        5.35         4.65  -0.130841
  6  2016-09-21  Call        4.65         5.07   0.090323
  7  2016-10-13   Put        5.07         4.12  -0.187377
  8  2016-11-04  Call        4.12         4.79   0.162621
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>flipped_puts = trades_df[trades_df['Type']=='Put']['Stock_ROI']*-1
  trades_df['Stock_ROI'] = flipped_puts
  </code></pre>
  
  <p>Output of flipped puts:</p>
  
  <pre><code>1    0.058333
  3    0.085066
  5    0.130841
  7    0.187377
  </code></pre>
  
  <p>Output of original DF:</p>
  
  <pre><code>         Date  Type  Stock_Open  Stock_Close  Stock_ROI
  0  2016-04-27  Call        5.33         4.80        NaN
  1  2016-06-03   Put        4.80         4.52   0.058333
  2  2016-06-30  Call        4.52         5.29        NaN
  3  2016-07-21   Put        5.29         4.84   0.085066
  4  2016-08-08  Call        4.84         5.35        NaN
  5  2016-08-25   Put        5.35         4.65   0.130841
  6  2016-09-21  Call        4.65         5.07        NaN
  7  2016-10-13   Put        5.07         4.12   0.187377
  8  2016-11-04  Call        4.12         4.79        NaN
  </code></pre>