title: Understanding *[] in python passed to .agg() in pyspark
body: <p>I am trying to understand how the *[] allows me to pass parameters to this 
  aggregate in pyspark. This runs, but I am trying to reuse the code in another example and was hoping someone could point me to the appropriate documentation so that I knew what was going on here. I like that it can pass the columns in the list as a parameter. </p>
  
  <p>I was hoping that either someone knew what *[] is doing here.
  How does it know to append a column  to the DataFrame and not just iterate through the list, and execute once for each element in testdata.</p>
  
  <pre><code>import pyspark.sql.functions as fn
  spark = SparkSession.builder.getOrCreate()
  testdata= spark.createDataFrame([
      (1, 144.5, 5.9, 33, 'M'),
      (2, 167.2, None, 45, 'M'),
      (3, 124.1, 5.2, 23, 'F'),
      (4, None, 5.9, None, 'M'),
      (5, 133.2, 5.7, 54, 'F'),
      (3, 124.1, None, None, 'F'),
      (5, 129.2, 5.3, None, 'M'),
      ],
      ['id', 'weight', 'height', 'age', 'gender']
  )
  testdata.where(
          fn.col("gender") == 'M'
      ).select(
          '*'
      ).agg(*[
          (1 - (fn.count(c) / fn.count('*'))).alias(c + '_missing')
          for c in testdata.columns
      ]).toPandas()
  </code></pre>
  
  <p>output:</p>
  
  <pre>
  +----------+--------------+--------------+-----------+--------------+
  |id_missing|weight_missing|height_missing|age_missing|gender_missing|
  +----------+--------------+--------------+-----------+--------------+
  |       0.0|          0.25|          0.25|        0.5|           0.0|
  +----------+--------------+--------------+-----------+--------------+
  </pre>