Fix pandas FutureWarning in Data.deduplicate for groupby operations (#5069)#5069
Closed
eytan wants to merge 1 commit intofacebook:mainfrom
Closed
Fix pandas FutureWarning in Data.deduplicate for groupby operations (#5069)#5069eytan wants to merge 1 commit intofacebook:mainfrom
eytan wants to merge 1 commit intofacebook:mainfrom
Conversation
eytan
pushed a commit
to eytan/Ax-1
that referenced
this pull request
Mar 19, 2026
…acebook#5069) Summary: Fixes a pandas FutureWarning that appears when using `DataFrameGroupBy.apply` on grouping columns by changing to `SeriesGroupBy.apply`. The fix adds `[MAP_KEY]` selector before `.apply()` at line 360 in `ax/core/data.py`, which operates on the series rather than the entire grouped DataFrame. This eliminates the deprecation warning on pandas >= 2.1 while maintaining backward compatibility with older pandas versions. -- Reviewed + modified AI generated Summary & Test Plan from DEV115723120 Reviewed By: saitcakmak Differential Revision: D97020436
eytan
pushed a commit
to eytan/Ax-1
that referenced
this pull request
Mar 19, 2026
…acebook#5069) Summary: Pull Request resolved: facebook#5069 Fixes a pandas FutureWarning that appears when using `DataFrameGroupBy.apply` on grouping columns by changing to `SeriesGroupBy.apply`. The fix adds `[MAP_KEY]` selector before `.apply()` at line 360 in `ax/core/data.py`, which operates on the series rather than the entire grouped DataFrame. This eliminates the deprecation warning on pandas >= 2.1 while maintaining backward compatibility with older pandas versions. -- Reviewed + modified AI generated Summary & Test Plan from DEV115723120 Reviewed By: saitcakmak Differential Revision: D97020436
eytan
pushed a commit
to eytan/Ax-1
that referenced
this pull request
Mar 19, 2026
…acebook#5069) Summary: Fixes a pandas FutureWarning that appears when using `DataFrameGroupBy.apply` on grouping columns by changing to `SeriesGroupBy.apply`. The fix adds `[MAP_KEY]` selector before `.apply()` at line 360 in `ax/core/data.py`, which operates on the series rather than the entire grouped DataFrame. This eliminates the deprecation warning on pandas >= 2.1 while maintaining backward compatibility with older pandas versions. -- Reviewed + modified AI generated Summary & Test Plan from DEV115723120 Reviewed By: saitcakmak Differential Revision: D97020436
…acebook#5069) Summary: Pull Request resolved: facebook#5069 Fixes a pandas FutureWarning that appears when using `DataFrameGroupBy.apply` on grouping columns by changing to `SeriesGroupBy.apply`. The fix adds `[MAP_KEY]` selector before `.apply()` at line 360 in `ax/core/data.py`, which operates on the series rather than the entire grouped DataFrame. This eliminates the deprecation warning on pandas >= 2.1 while maintaining backward compatibility with older pandas versions. -- Reviewed + modified AI generated Summary & Test Plan from DEV115723120 Reviewed By: saitcakmak Differential Revision: D97020436
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5069 +/- ##
=======================================
Coverage 96.29% 96.30%
=======================================
Files 613 613
Lines 67232 67232
=======================================
+ Hits 64742 64747 +5
+ Misses 2490 2485 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This pull request has been merged in 1becca4. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Fixes a pandas FutureWarning that appears when using
DataFrameGroupBy.applyon grouping columns by changing toSeriesGroupBy.apply. The fix adds[MAP_KEY]selector before.apply()at line 360 inax/core/data.py, which operates on the series rather than the entire grouped DataFrame. This eliminates the deprecation warning on pandas >= 2.1 while maintaining backward compatibility with older pandas versions.--
Reviewed + modified AI generated Summary & Test Plan from DEV115723120
Reviewed By: saitcakmak
Differential Revision: D97020436