title: How to max value and keep all columns (for max records per group)?
body: <p>Given the following DataFrame:</p>
  
  <pre><code>+----+-----+---+-----+
  | uid|    k|  v|count|
  +----+-----+---+-----+
  |   a|pref1|  b|  168|
  |   a|pref3|  h|  168|
  |   a|pref3|  t|   63|
  |   a|pref3|  k|   84|
  |   a|pref1|  e|   84|
  |   a|pref2|  z|  105|
  +----+-----+---+-----+
  </code></pre>
  
  <p>How can I get the max value from <code>uid</code>, <code>k</code> but include <code>v</code>?</p>
  
  <pre><code>+----+-----+---+----------+
  | uid|    k|  v|max(count)|
  +----+-----+---+----------+
  |   a|pref1|  b|       168|
  |   a|pref3|  h|       168|
  |   a|pref2|  z|       105|
  +----+-----+---+----------+
  </code></pre>
  
  <p>I can do something like this but it will drop the column "v" :</p>
  
  <pre><code>df.groupBy("uid", "k").max("count")
  </code></pre>