Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pandas/core/apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -1832,12 +1832,12 @@ def warn_alias_replacement(
full_alias = alias
else:
full_alias = f"{type(obj).__name__}.{alias}"
alias = f"'{alias}'"
alias = f'`"{alias}"`'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to remove the `s as they might not always render like markdown for example

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated @mroeschke

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(),
)