Skip to content

Commit 9f47b6b

Browse files
committed
Amend list_repeat code example - literal
1 parent 7a6bcd4 commit 9f47b6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/source/user-guide/common-operations/expressions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ This function returns a new array with the elements repeated.
134134
135135
ctx = SessionContext()
136136
df = ctx.from_pydict({"a": [[1, 2, 3]]})
137-
df.select(list_repeat(col("a"), 2).alias("repeated_array"))
137+
df.select(list_repeat(col("a"), literal(2)).alias("repeated_array"))
138138
139139
In this example, the `repeated_array` column will contain `[[1, 2, 3], [1, 2, 3]]`.
140140

0 commit comments

Comments
 (0)