title: PySpark withColumn & withField TypeError: 'Column' object is not callable
body: <p>I can't seem to figure out how to use <code>withField</code> to update a nested dataframe column, I always seem to get <code>'TypeError: 'Column' object is not callable'</code>.</p>
  <p>I have followed this example:
  <a href="https://spark.apache.org/docs/latest/api/python/reference/api/pyspark.sql.Column.withField.html" rel="nofollow noreferrer">https://spark.apache.org/docs/latest/api/python/reference/api/pyspark.sql.Column.withField.html</a></p>
  <pre><code>df = spark.createDataFrame([Row(a=Row(b=1, c=2))])
  df.withColumn('a', df['a'].withField('b', lit(3))).select('a.b').show()
  </code></pre>
  <p>Which still results in:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;C:\Users\benhalicki\Source\SparkTest\spark_nested_df_test.py&quot;, line 58, in &lt;module&gt;
      df.withColumn('a', df['a'].withField('b', lit(3))).select('a.b').show()
  TypeError: 'Column' object is not callable
  </code></pre>
  <p>Spark Version: 3.0.3 (on Windows).</p>
  <p>Am I doing something fundamentally wrong?</p>