Skip to content

Commit

Permalink
Backport PR #55082 on branch 2.1.x (Updated future warning msg in tra…
Browse files Browse the repository at this point in the history
…nsform() for Series.groupby) (#55097)

Backport PR #55082: Updated future warning msg in transform() for Series.groupby

Co-authored-by: Rajat Subhra Mukherjee <raromukherjee@gmail.com>
  • Loading branch information
meeseeksmachine and rsm-23 committed Sep 11, 2023
1 parent dac2a06 commit f98d950
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pandas/core/apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -1830,12 +1830,12 @@ def warn_alias_replacement(
full_alias = alias
else:
full_alias = f"{type(obj).__name__}.{alias}"
alias = f"'{alias}'"
alias = f'"{alias}"'
warnings.warn(
f"The provided callable {func} is currently using "
f"{full_alias}. In a future version of pandas, "
f"the provided callable will be used directly. To keep current "
f"behavior pass {alias} instead.",
f"behavior pass the string {alias} instead.",
category=FutureWarning,
stacklevel=find_stack_level(),
)

0 comments on commit f98d950

Please sign in to comment.