Yikun commented on a change in pull request #32431:
URL: https://github.com/apache/spark/pull/32431#discussion_r805231319



##########
File path: python/pyspark/sql/dataframe.py
##########
@@ -2911,6 +2911,41 @@ def freqItems(
             support = 0.01
         return DataFrame(self._jdf.stat().freqItems(_to_seq(self._sc, cols), 
support), self.sql_ctx)
 
+    def withColumns(self, *colsMap: Dict[str, Column]) -> "DataFrame":
+        """
+        Returns a new :class:`DataFrame` by adding multiple columns or 
replacing the
+        existing columns that has the same names.
+
+        The colsMap is a map of column name and column, the column must only 
refer to attributes
+        supplied by this Dataset. It is an error to add columns that refer to 
some other Dataset.

Review comment:
       Sure, will add a note on `Parameters` section for `colsMap`:
   ```
   Currently, only single map is supported.
   ```




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to