Skip to content

Commit 6a0f6c2

Browse files
committed
clearer error message
1 parent 06d498b commit 6a0f6c2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pandas/core/apply.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1094,8 +1094,9 @@ def apply_standard(self) -> DataFrame | Series:
10941094

10951095
if len(mapped) and isinstance(mapped[0], ABCSeries):
10961096
warnings.warn(
1097-
"converting list of Series to a DataFrame in the Series.apply method "
1098-
"is deprecated and will be removed in a future version.",
1097+
"Returning a DataFrame from Series.apply when the supplied function"
1098+
"returns a Series is deprecated and will be removed in a future "
1099+
"version.",
10991100
FutureWarning,
11001101
stacklevel=find_stack_level(),
11011102
) # GH52116

0 commit comments

Comments
 (0)