title: Producing mean, mode. median for columns in python
body: <p>I'm trying to calculate mean median and mode for WEIGHT (column name) only for rows that have value of PET_AGE (column name) = 5</p>
  <p>I have the following line, but don't know how to extract the values from PET_AGE column that are exactly 5. Could you please help?</p>
  <p><code>output1 = weights.groupby(&quot;PET_AGE&quot;)[&quot;WEIGHT&quot;].mean().round(2).reset_index()</code></p>