diff --git a/pandas/core/apply.py b/pandas/core/apply.py index 712294a0a4c96..ad9933aff9eca 100644 --- a/pandas/core/apply.py +++ b/pandas/core/apply.py @@ -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(), )