title: Calculating percentage of total count for groupBy using pyspark
body: <p>I have the following code in pyspark, resulting in a table showing me the different values for a column and their counts. I want to have another column showing what percentage of the total count does each row represent. How do I do that?</p>
  
  <pre><code>difrgns = (df1
             .groupBy("column_name")
             .count()
             .sort(desc("count"))
             .show())
  </code></pre>
  
  <p>Thanks in advance!</p>