title: How to avoid dropping null values from dropduplicate function when passing single column
body: <p>I have the below dataframe, from which I need to keep null values not being dropped from key column. I know that if we pass one more column then we can avoid dropping null values, but my problem is from key column I need to drop only the values which are duplicating, I should not drop null values.</p>
  
  <pre><code>id    pin    key  
  -----------------
  1       9       9
  9       8       9
  2       6       
  6       3         
  8       0       8
  
  df.dropDuplicates("key").show()
  </code></pre>
  
  <p>I am getting output as below,</p>
  
  <pre><code>id    pin    key  
  -----------------
  1       9       9
  2       6        
  8       0       8
  </code></pre>
  
  <p>I am expecting   </p>
  
  <pre><code>id    pin    key  
  -----------------
  1       9       9
  2       6       
  6       3         
  8       0       8
  </code></pre>
  
  <p>If I use the above function it is dropping the null values also. Kindly provide me if I have any other alternative.</p>