title: Spark Scala : how to display same rows of dataframe, that differ in one column, only once with all different elements
body: <p>I have a dataframe that produces a .csv as below :</p>
  
  <p><a href="https://i.stack.imgur.com/3A9JR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3A9JR.png" alt="enter image description here"></a></p>
  
  <p>All records differ in column "ncid" but all the other columns appear more than once. So I want my .csv to be exported as follows :</p>
  
  <p><a href="https://i.stack.imgur.com/P3QmJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/P3QmJ.png" alt="enter image description here"></a></p>