title: How to iterate grouped data in spark?
body: <p>I have a dataset like this:</p>
  
  <pre><code>uid    group_a    group_b
  1      3          unkown
  1      unkown     4
  2      unkown     3
  2      2          unkown
  </code></pre>
  
  <p>I want to get the result:</p>
  
  <pre><code>uid    group_a    group_b
  1      3          4
  2      2          3
  </code></pre>
  
  <p>I try to group the data by "uid" and iterate each group and select the not-unkown value as the final value, but don't know how to do it.</p>