Skip to content

Commit 0aee7c7

Browse files
committed
Amend list_ to array_ in documentation
1 parent 28e677d commit 0aee7c7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,31 +110,31 @@ This function returns an integer indicating the total number of elements in the
110110
111111
In this example, the `num_elements` column will contain `3` for both rows.
112112

113-
To concatenate two arrays, you can use the function :py:func:`datafusion.functions.list_cat` or :py:func:`datafusion.functions.list_concat`.
113+
To concatenate two arrays, you can use the function :py:func:`datafusion.functions.array_cat` or :py:func:`datafusion.functions.array_concat`.
114114
These functions return a new array that is the concatenation of the input arrays.
115115

116116
.. ipython:: python
117117
118118
from datafusion import SessionContext, col
119-
from datafusion.functions import list_cat, list_concat
119+
from datafusion.functions import array_cat, array_concat
120120
121121
ctx = SessionContext()
122122
df = ctx.from_pydict({"a": [[1, 2, 3]], "b": [[4, 5, 6]]})
123-
df.select(list_cat(col("a"), col("b")).alias("concatenated_array"))
123+
df.select(array_cat(col("a"), col("b")).alias("concatenated_array"))
124124
125125
In this example, the `concatenated_array` column will contain `[1, 2, 3, 4, 5, 6]`.
126126

127-
To repeat the elements of an array a specified number of times, you can use the function :py:func:`datafusion.functions.list_repeat`.
127+
To repeat the elements of an array a specified number of times, you can use the function :py:func:`datafusion.functions.array_repeat`.
128128
This function returns a new array with the elements repeated.
129129

130130
.. ipython:: python
131131
132132
from datafusion import SessionContext, col, literal
133-
from datafusion.functions import list_repeat
133+
from datafusion.functions import array_repeat
134134
135135
ctx = SessionContext()
136136
df = ctx.from_pydict({"a": [[1, 2, 3]]})
137-
df.select(list_repeat(col("a"), literal(2)).alias("repeated_array"))
137+
df.select(array_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)