title: Select mean of the values column wise
body: <p>I have a dataset in which I have 5 columns. Consider the below database:-</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: center;">City</th>
  <th style="text-align: center;">Vehicle</th>
  <th style="text-align: center;">col3</th>
  <th style="text-align: center;">col4</th>
  <th style="text-align: center;">col5</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: center;">Jaipur</td>
  <td style="text-align: center;">Car</td>
  <td style="text-align: center;">...</td>
  <td style="text-align: center;">...</td>
  <td style="text-align: center;">...</td>
  </tr>
  <tr>
  <td style="text-align: center;">Jaipur</td>
  <td style="text-align: center;">Car</td>
  <td style="text-align: center;">...</td>
  <td style="text-align: center;">...</td>
  <td style="text-align: center;">...</td>
  </tr>
  <tr>
  <td style="text-align: center;">Jaipur</td>
  <td style="text-align: center;">Bike</td>
  <td style="text-align: center;">...</td>
  <td style="text-align: center;">...</td>
  <td style="text-align: center;">...</td>
  </tr>
  <tr>
  <td style="text-align: center;">Pune</td>
  <td style="text-align: center;">Car</td>
  <td style="text-align: center;">...</td>
  <td style="text-align: center;">...</td>
  <td style="text-align: center;">...</td>
  </tr>
  <tr>
  <td style="text-align: center;">Mumbai</td>
  <td style="text-align: center;">Bike</td>
  <td style="text-align: center;">...</td>
  <td style="text-align: center;">...</td>
  <td style="text-align: center;">...</td>
  </tr>
  <tr>
  <td style="text-align: center;">...</td>
  <td style="text-align: center;">...</td>
  <td style="text-align: center;">...</td>
  <td style="text-align: center;">...</td>
  <td style="text-align: center;">...</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>there are approx 10000 records in which city have 5 value possible that is Jaipur, Pune, Mumbai, Chennai, Indore and Vehicle can have 3 value possible car, bike, Activa.</p>
  <p>I used the pandas' group by function over the data frame</p>
  <pre><code>    df.groupby(['City', 'Vehicle'])['col3'].count()
  </code></pre>
  <p>It gave me something as follow:-</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: center;">City</th>
  <th style="text-align: center;">Vehicle</th>
  <th style="text-align: center;">col3</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: center;">Jaipur</td>
  <td style="text-align: center;">Car</td>
  <td style="text-align: center;">50</td>
  </tr>
  <tr>
  <td style="text-align: center;">Jaipur</td>
  <td style="text-align: center;">Bike</td>
  <td style="text-align: center;">40</td>
  </tr>
  <tr>
  <td style="text-align: center;">Jaipur</td>
  <td style="text-align: center;">Activa</td>
  <td style="text-align: center;">60</td>
  </tr>
  <tr>
  <td style="text-align: center;">Pune</td>
  <td style="text-align: center;">Car</td>
  <td style="text-align: center;">80</td>
  </tr>
  <tr>
  <td style="text-align: center;">Pune</td>
  <td style="text-align: center;">Bike</td>
  <td style="text-align: center;">90</td>
  </tr>
  <tr>
  <td style="text-align: center;">Pune</td>
  <td style="text-align: center;">Activa</td>
  <td style="text-align: center;">30</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>But I want ans as below:-</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: center;">City</th>
  <th style="text-align: center;">Vehicle</th>
  <th style="text-align: center;">col3</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: center;">Jaipur</td>
  <td style="text-align: center;">Car</td>
  <td style="text-align: center;">0.33</td>
  </tr>
  <tr>
  <td style="text-align: center;">Jaipur</td>
  <td style="text-align: center;">Bike</td>
  <td style="text-align: center;">0.27</td>
  </tr>
  <tr>
  <td style="text-align: center;">Jaipur</td>
  <td style="text-align: center;">Activa</td>
  <td style="text-align: center;">0.4</td>
  </tr>
  <tr>
  <td style="text-align: center;">Pune</td>
  <td style="text-align: center;">Car</td>
  <td style="text-align: center;">0.40</td>
  </tr>
  <tr>
  <td style="text-align: center;">Pune</td>
  <td style="text-align: center;">Bike</td>
  <td style="text-align: center;">0.45</td>
  </tr>
  <tr>
  <td style="text-align: center;">Pune</td>
  <td style="text-align: center;">Activa</td>
  <td style="text-align: center;">0.15</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I am not able to understand how to code this in pandas.</p>