timsaucer commented on code in PR #909:
URL: https://github.com/apache/datafusion-python/pull/909#discussion_r1798407548


##########
python/datafusion/dataframe.py:
##########
@@ -163,7 +163,20 @@ def with_column(self, name: str, expr: Expr) -> DataFrame:
     def with_columns(
         self, *exprs: Expr | Iterable[Expr], **named_exprs: Expr
     ) -> DataFrame:
-        """Add an additional column to the DataFrame.
+        """Add columns to the DataFrame.
+
+        By passing expressions, iteratables of expressions, or named 
expressions. To
+        pass named expressions use the form name=Expr.
+
+        Example usage:
+
+            The following will add 4 columns labeled a, b, c, and d.
+
+            df = df.with_columns(
+                lit(0).alias('a'),
+                [lit(1).alias('b'), lit(2).alias('c')],
+                d=lit(3)
+                )

Review Comment:
   Do you know if this renders right in the online doc? If not, I can pull your 
branch and test it out



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