Kimahriman commented on a change in pull request #29699:
URL: https://github.com/apache/spark/pull/29699#discussion_r487991395
##########
File path: python/pyspark/sql/column.py
##########
@@ -329,6 +329,31 @@ def getField(self, name):
DeprecationWarning)
return self[name]
+ @since(3.1)
+ def withField(self, fieldName, col):
+ """
+ An expression that adds/replaces field in StructType by name.
+
+ >>> from pyspark.sql import Row, functions
Review comment:
Oh woops I did that for the test not for the docstring, sorry
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]