Skip to content

Commit b13216c

Browse files
committed
update example
1 parent e8332d6 commit b13216c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

python/datafusion/dataframe.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,14 @@ def with_columns(
565565
d=lit(3)
566566
)
567567
568+
Equivalent example using just SQL strings:
569+
570+
df = df.with_columns(
571+
"x as a",
572+
["1 as b", "y as c"],
573+
d="3"
574+
)
575+
568576
Args:
569577
exprs: Either a single expression, an iterable of expressions to add or
570578
SQL expression strings.

0 commit comments

Comments
 (0)