title: pyspark: drop columns that have same values in all rows
body: <p>Related question: <a href="https://stackoverflow.com/questions/39658574/how-to-drop-columns-which-have-same-values-in-all-rows-via-pandas-or-spark-dataf">How to drop columns which have same values in all rows via pandas or spark dataframe?</a></p>
  
  <p>So I have a pyspark dataframe, and I want to drop the columns where all values are the same in all rows while keeping other columns intact.</p>
  
  <p>However the answers in the above question are only for pandas. Is there a solution for pyspark dataframe?</p>
  
  <p>Thanks</p>