Skip to content

Commit

Permalink
Amend list_repeat code example - literal
Browse files Browse the repository at this point in the history
  • Loading branch information
kosiew committed Nov 8, 2024
1 parent 7a6bcd4 commit 9f47b6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/user-guide/common-operations/expressions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ This function returns a new array with the elements repeated.
ctx = SessionContext()
df = ctx.from_pydict({"a": [[1, 2, 3]]})
df.select(list_repeat(col("a"), 2).alias("repeated_array"))
df.select(list_repeat(col("a"), literal(2)).alias("repeated_array"))
In this example, the `repeated_array` column will contain `[[1, 2, 3], [1, 2, 3]]`.

Expand Down

0 comments on commit 9f47b6b

Please sign in to comment.