title: pandas groupby based on multi-columns, but keep the most repeated duplicates number on other column
body: <p>I have a table looks below.</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: center;"></th>
  <th style="text-align: center;">lon</th>
  <th style="text-align: center;">lat</th>
  <th style="text-align: center;">output</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: center;">4050</td>
  <td style="text-align: center;">-47.812224</td>
  <td style="text-align: center;">-19.043365</td>
  <td style="text-align: center;">1890.283215</td>
  </tr>
  <tr>
  <td style="text-align: center;">5149</td>
  <td style="text-align: center;">-47.812224</td>
  <td style="text-align: center;">-19.043365</td>
  <td style="text-align: center;">1890.283215</td>
  </tr>
  <tr>
  <td style="text-align: center;">7316</td>
  <td style="text-align: center;">-47.812224</td>
  <td style="text-align: center;">-19.043365</td>
  <td style="text-align: center;">1890.283215</td>
  </tr>
  <tr>
  <td style="text-align: center;">8406</td>
  <td style="text-align: center;">-47.812224</td>
  <td style="text-align: center;">-19.043365</td>
  <td style="text-align: center;">1890.283215</td>
  </tr>
  <tr>
  <td style="text-align: center;">511</td>
  <td style="text-align: center;">-47.812014</td>
  <td style="text-align: center;">-19.007094</td>
  <td style="text-align: center;">1813.785728</td>
  </tr>
  <tr>
  <td style="text-align: center;">1555</td>
  <td style="text-align: center;">-47.812014</td>
  <td style="text-align: center;">-19.007094</td>
  <td style="text-align: center;">1813.785728</td>
  </tr>
  <tr>
  <td style="text-align: center;">3764</td>
  <td style="text-align: center;">-47.812014</td>
  <td style="text-align: center;">-19.007094</td>
  <td style="text-align: center;">1821.363582</td>
  </tr>
  <tr>
  <td style="text-align: center;">4846</td>
  <td style="text-align: center;">-47.812014</td>
  <td style="text-align: center;">-19.007094</td>
  <td style="text-align: center;">1813.785728</td>
  </tr>
  <tr>
  <td style="text-align: center;">29</td>
  <td style="text-align: center;">-47.811177</td>
  <td style="text-align: center;">-19.008053</td>
  <td style="text-align: center;">1763.091936</td>
  </tr>
  <tr>
  <td style="text-align: center;">1114</td>
  <td style="text-align: center;">-47.811177</td>
  <td style="text-align: center;">-19.008053</td>
  <td style="text-align: center;">1763.091936</td>
  </tr>
  <tr>
  <td style="text-align: center;">3262</td>
  <td style="text-align: center;">-47.811177</td>
  <td style="text-align: center;">-19.008053</td>
  <td style="text-align: center;">1763.091936</td>
  </tr>
  <tr>
  <td style="text-align: center;">4357</td>
  <td style="text-align: center;">-47.811177</td>
  <td style="text-align: center;">-19.008053</td>
  <td style="text-align: center;">1763.091936</td>
  </tr>
  <tr>
  <td style="text-align: center;">1436</td>
  <td style="text-align: center;">-47.774424</td>
  <td style="text-align: center;">-19.008700</td>
  <td style="text-align: center;">2172.781911</td>
  </tr>
  <tr>
  <td style="text-align: center;">2557</td>
  <td style="text-align: center;">-47.774424</td>
  <td style="text-align: center;">-19.008700</td>
  <td style="text-align: center;">2174.394848</td>
  </tr>
  <tr>
  <td style="text-align: center;">4725</td>
  <td style="text-align: center;">-47.774424</td>
  <td style="text-align: center;">-19.008700</td>
  <td style="text-align: center;">2172.781911</td>
  </tr>
  <tr>
  <td style="text-align: center;">5840</td>
  <td style="text-align: center;">-47.774424</td>
  <td style="text-align: center;">-19.008700</td>
  <td style="text-align: center;">2172.781911</td>
  </tr>
  <tr>
  <td style="text-align: center;">5211</td>
  <td style="text-align: center;">-47.774166</td>
  <td style="text-align: center;">-19.043847</td>
  <td style="text-align: center;">2897.092502</td>
  </tr>
  <tr>
  <td style="text-align: center;">6313</td>
  <td style="text-align: center;">-47.774166</td>
  <td style="text-align: center;">-19.043847</td>
  <td style="text-align: center;">2897.092502</td>
  </tr>
  <tr>
  <td style="text-align: center;">8460</td>
  <td style="text-align: center;">-47.774166</td>
  <td style="text-align: center;">-19.043847</td>
  <td style="text-align: center;">2897.092502</td>
  </tr>
  <tr>
  <td style="text-align: center;">9543</td>
  <td style="text-align: center;">-47.774166</td>
  <td style="text-align: center;">-19.043847</td>
  <td style="text-align: center;">2897.092502</td>
  </tr>
  <tr>
  <td style="text-align: center;">1679</td>
  <td style="text-align: center;">-47.773958</td>
  <td style="text-align: center;">-19.007574</td>
  <td style="text-align: center;">2179.670924</td>
  </tr>
  <tr>
  <td style="text-align: center;">2770</td>
  <td style="text-align: center;">-47.773958</td>
  <td style="text-align: center;">-19.007574</td>
  <td style="text-align: center;">2179.670924</td>
  </tr>
  <tr>
  <td style="text-align: center;">4998</td>
  <td style="text-align: center;">-47.773958</td>
  <td style="text-align: center;">-19.007574</td>
  <td style="text-align: center;">2179.670924</td>
  </tr>
  <tr>
  <td style="text-align: center;">6088</td>
  <td style="text-align: center;">-47.773958</td>
  <td style="text-align: center;">-19.007574</td>
  <td style="text-align: center;">2179.670924</td>
  </tr>
  <tr>
  <td style="text-align: center;">1937</td>
  <td style="text-align: center;">-47.773121</td>
  <td style="text-align: center;">-19.008533</td>
  <td style="text-align: center;">2236.769862</td>
  </tr>
  <tr>
  <td style="text-align: center;">3004</td>
  <td style="text-align: center;">-47.773121</td>
  <td style="text-align: center;">-19.008533</td>
  <td style="text-align: center;">2236.769862</td>
  </tr>
  <tr>
  <td style="text-align: center;">5231</td>
  <td style="text-align: center;">-47.773121</td>
  <td style="text-align: center;">-19.008533</td>
  <td style="text-align: center;">2236.769862</td>
  </tr>
  <tr>
  <td style="text-align: center;">6332</td>
  <td style="text-align: center;">-47.773121</td>
  <td style="text-align: center;">-19.008533</td>
  <td style="text-align: center;">2236.769862</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I would like to drop the duplicates by using groupby on <strong>lon</strong> and <strong>lat</strong> but keep the most repeated value on <strong>output</strong></p>
  <p>for example</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: center;">lon</th>
  <th style="text-align: center;">lat</th>
  <th style="text-align: center;">output</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: center;">-47.812224</td>
  <td style="text-align: center;">-19.043365</td>
  <td style="text-align: center;">1890.283215</td>
  </tr>
  <tr>
  <td style="text-align: center;">-47.812014</td>
  <td style="text-align: center;">-19.007094</td>
  <td style="text-align: center;">1813.785728</td>
  </tr>
  <tr>
  <td style="text-align: center;">-47.811177</td>
  <td style="text-align: center;">-19.008053</td>
  <td style="text-align: center;">1763.091936</td>
  </tr>
  <tr>
  <td style="text-align: center;">-47.774424</td>
  <td style="text-align: center;">-19.008700</td>
  <td style="text-align: center;">2172.781911</td>
  </tr>
  <tr>
  <td style="text-align: center;">-47.774166</td>
  <td style="text-align: center;">-19.043847</td>
  <td style="text-align: center;">2897.092502</td>
  </tr>
  <tr>
  <td style="text-align: center;">-47.773958</td>
  <td style="text-align: center;">-19.007574</td>
  <td style="text-align: center;">2179.670924</td>
  </tr>
  <tr>
  <td style="text-align: center;">-47.773121</td>
  <td style="text-align: center;">-19.008533</td>
  <td style="text-align: center;">2236.769862</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Could anyone tell me how to do this?</p>