title: Carefully select and retrieve one from a large set of data
body: <p>I don't know what to do when I want to retrieve one item in each column from data like the following.</p>
  <pre><code>|name|power|
  test1|15
  test1|120 
  test1|40 
  test2|50 
  test2|80   
  test2|100 
  test3|1   
  test3|4 
  test3|10
  </code></pre>
  <p>The results I want.</p>
  <pre><code>|name|power|
  test1|120
  test2|100
  test3|10
  </code></pre>
  <p>What I tried.</p>
  <pre><code>pickup_one = (
      beaconPickUp_three
      .withColumn('r_max_date', f.max('power').over(w.partitionBy()))
      .filter(f.col('r_max_date') == f.col('power'))
  )
  </code></pre>
  <p>or</p>
  <pre><code>PickUp_one = beaconPickUp_three.groupBy(f.col(&quot;name&quot;)).agg({&quot;power&quot;: &quot;max&quot;})
  </code></pre>
  <p>I need your help.</p>