You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This isn't necessarily a bug, but the other issue categories didn't fit it either.
In #53974, the use of built-in callable functions for SeriesGroupBy.transform()was deprecated. The current FutureWarning message that is displayed is:
E FutureWarning: The provided callable <built-in function max> is currently using SeriesGroupBy.max. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass 'max' instead.
/pandas/core/apply.py:1828: FutureWarning
While the change is reasonable, I think the warning message could be updated to better convey the message. When I first saw the warning message, I didn't realize what was wrong. Obviously using the built-in functions was no longer supported, but the message said to keep current behavior pass 'max' instead, however this is exactly what I was doing, but I was passing the callable max instead.
After some time of reading the release notes and documentation, I realized the warning message was referring to the string "max".
Expected Behavior
My proposal is to just update the FutureWarning produced from this to explicitly state a string should be passed. Updating
FutureWarning: .... To keep current behavior pass 'max' instead.
to
FutureWarning: .... To keep current behavior pass the string 'max' instead.
Installed Versions
2.1.0
The text was updated successfully, but these errors were encountered:
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
This isn't necessarily a bug, but the other issue categories didn't fit it either.
In #53974, the use of built-in callable functions for
SeriesGroupBy.transform()
was deprecated. The currentFutureWarning
message that is displayed is:While the change is reasonable, I think the warning message could be updated to better convey the message. When I first saw the warning message, I didn't realize what was wrong. Obviously using the built-in functions was no longer supported, but the message said
to keep current behavior pass 'max' instead
, however this is exactly what I was doing, but I was passing the callablemax
instead.After some time of reading the release notes and documentation, I realized the warning message was referring to the string "max".
Expected Behavior
My proposal is to just update the
FutureWarning
produced from this to explicitly state a string should be passed. Updatingto
Installed Versions
2.1.0
The text was updated successfully, but these errors were encountered: