Skip to content

Commit

Permalink
clearer error message
Browse files Browse the repository at this point in the history
  • Loading branch information
topper-123 committed Apr 1, 2023
1 parent 06d498b commit 6a0f6c2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pandas/core/apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -1094,8 +1094,9 @@ def apply_standard(self) -> DataFrame | Series:

if len(mapped) and isinstance(mapped[0], ABCSeries):
warnings.warn(
"converting list of Series to a DataFrame in the Series.apply method "
"is deprecated and will be removed in a future version.",
"Returning a DataFrame from Series.apply when the supplied function"
"returns a Series is deprecated and will be removed in a future "
"version.",
FutureWarning,
stacklevel=find_stack_level(),
) # GH52116
Expand Down

0 comments on commit 6a0f6c2

Please sign in to comment.