title: Getting low, high, and mean from column
body: <p>I am trying to get the low, high and mean from a column. However, I'd like to only aggregate by the column value. For example, if we have 2 rows with the same column value, then we aggregate these two together. Also, they have to be of the same carrier. Something like this:</p>
  
  <p>Before processing:</p>
  
  <pre><code>carrier   class   price
  SP        A       22
  VZ        C       33
  XM        A       50 
  XM        D       20     
  SP        A       88
  VZ        C       100
  </code></pre>
  
  <p>After processing:</p>
  
  <pre><code>carrier   class   price   low   high   mean
  SP        A       22      22    88     55
  VZ        C       33      33    100    66.5
  XM        A       50      50    50     50
  XM        D       20      20    20     20
  SP        A       88      22    88     55
  VZ        C       100     33    100    66.5
  </code></pre>
  
  <p>As you can see, if we have the same carrier and same class, then we aggregate and get the low, high, and mean. If we have the same carrier, but no same class then we don't aggregate, but we still get the low, high, mean which is the same number as the class' price. </p>
  
  <p>I want the result to be exactly as the way it is after processing. The result should be a dataframe. How can I accomplish this?</p>