Skip to content
Closed
Prev Previous commit
Document parameter changes under parameters header in docstring
  • Loading branch information
Ronserruya committed Jun 14, 2024
commit 6d08684cfe9b262d2239e9324c0606b1434bb6b7
24 changes: 12 additions & 12 deletions python/pyspark/sql/functions/builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -10928,9 +10928,6 @@ def substring(
.. versionchanged:: 3.4.0
Supports Spark Connect.

.. versionchanged:: 4.0.0
`pos` and `len` now also accept Columns or names of Columns.

Notes
-----
The position is not zero based, but 1 based index.
Expand All @@ -10944,6 +10941,9 @@ def substring(
len : :class:`~pyspark.sql.Column` or str or int
length of chars.

.. versionchanged:: 4.0.0
`pos` and `len` now also accept Columns or names of Columns.

Returns
-------
:class:`~pyspark.sql.Column`
Expand Down Expand Up @@ -13973,9 +13973,6 @@ def array_position(col: "ColumnOrName", value: Any) -> Column:
.. versionchanged:: 3.4.0
Supports Spark Connect.

.. versionchanged:: 4.0.0
`value` now also accepts a Column type.

Notes
-----
The position is not zero based, but 1 based index. Returns 0 if the given
Expand All @@ -13988,6 +13985,9 @@ def array_position(col: "ColumnOrName", value: Any) -> Column:
value : Any
value or a :class:`~pyspark.sql.Column` expression to look for.

.. versionchanged:: 4.0.0
`value` now also accepts a Column type.

Returns
-------
:class:`~pyspark.sql.Column`
Expand Down Expand Up @@ -14427,16 +14427,16 @@ def array_remove(col: "ColumnOrName", element: Any) -> Column:
.. versionchanged:: 3.4.0
Supports Spark Connect.

.. versionchanged:: 4.0.0
`element` now also accepts a Column type.

Parameters
----------
col : :class:`~pyspark.sql.Column` or str
name of column containing array
element :
element or a :class:`~pyspark.sql.Column` expression to be removed from the array

.. versionchanged:: 4.0.0
`element` now also accepts a Column type.

Returns
-------
:class:`~pyspark.sql.Column`
Expand Down Expand Up @@ -17277,16 +17277,16 @@ def map_contains_key(col: "ColumnOrName", value: Any) -> Column:
.. versionchanged:: 3.4.0
Supports Spark Connect.

.. versionchanged:: 4.0.0
`value` now also accepts a Column type.

Parameters
----------
col : :class:`~pyspark.sql.Column` or str
The name of the column or an expression that represents the map.
value :
A literal value, or a :class:`~pyspark.sql.Column` expression.

.. versionchanged:: 4.0.0
`value` now also accepts a Column type.

Returns
-------
:class:`~pyspark.sql.Column`
Expand Down