title: Get maximum value based on unique values
body: <p>I have two columns in Excel as follows:</p>
  
  <pre><code>col1  col2
  
  1     10
  1     22
  1     11
  1     23
  1     14
  2     16
  2     12
  2     10
  2     9
  </code></pre>
  
  <p>How do I write a command to returns the  maximum value from <code>col2</code> corresponding to each unique value in <code>col1</code>? </p>
  
  <p>So here I need to write a command to get <code>23</code> and <code>16</code>.</p>
  
  <p>The data I have shown here are dummies; I have 600 unique values in <code>col1</code> in my actual data set.</p>