Skip to content

Commit a55f9c3

Browse files
committed
clearer error message
1 parent 59fcd33 commit a55f9c3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pandas/core/apply.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,8 +1088,9 @@ def apply_standard(self) -> DataFrame | Series:
10881088

10891089
if len(mapped) and isinstance(mapped[0], ABCSeries):
10901090
warnings.warn(
1091-
"converting list of Series to a DataFrame in the Series.apply method "
1092-
"is deprecated and will be removed in a future version.",
1091+
"Returning a DataFrame from Series.apply when the supplied function"
1092+
"returns a Series is deprecated and will be removed in a future "
1093+
"version.",
10931094
FutureWarning,
10941095
stacklevel=find_stack_level(),
10951096
) # GH52116

0 commit comments

Comments
 (0)