Skip to content
Prev Previous commit
Next Next commit
add deprecation message to Series.apply II
  • Loading branch information
topper-123 committed Apr 1, 2023
commit 06d498bdedb372b0412f8abd2b1263dc05d220b7
11 changes: 5 additions & 6 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -4412,14 +4412,13 @@ def apply(
"""
Invoke function on values of Series.

Can be ufunc (a NumPy function that applies to the entire Series)
or a Python function that only works on single values.

.. deprecated:: 2.1.0

If the output from ``func`` is a listlike of ``Series`` the output,
wrapping the output in a ``DataFrame`` instead of a ``Series`` has been
deprecated.
If the result from ``func`` is a ``Series``, wrapping the output in a
``DataFrame`` instead of a ``Series`` has been deprecated.

Can be ufunc (a NumPy function that applies to the entire Series)
or a Python function that only works on single values.

Parameters
----------
Expand Down