Skip to content

Commit bda1f73

Browse files
committed
DOC: clarification on Series.apply #1910
1 parent 1076948 commit bda1f73

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pandas/core/series.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,8 +2038,9 @@ def map_f(values, f):
20382038

20392039
def apply(self, func, convert_dtype=True, args=(), **kwds):
20402040
"""
2041-
Invoke function on values of Series. Can be ufunc or Python function
2042-
expecting only single values
2041+
Invoke function on values of Series. Can be ufunc, a Python function
2042+
that applies to the entire Series, or a Python function that only
2043+
works on single values
20432044
20442045
Parameters
20452046
----------
@@ -2052,6 +2053,11 @@ def apply(self, func, convert_dtype=True, args=(), **kwds):
20522053
--------
20532054
Series.map: For element-wise operations
20542055
2056+
Notes
2057+
-----
2058+
func is applied to the entire Series at once first. If an exception
2059+
is raised, then apply to each value.
2060+
20552061
Returns
20562062
-------
20572063
y : Series

0 commit comments

Comments
 (0)