-
Notifications
You must be signed in to change notification settings - Fork 862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade pandas supported range to >=2.0, <2.3 #4079
Conversation
/platform_tests ref=pandas-2.2 |
|
1 similar comment
|
Job PR-4079-aff7f69 is done. |
/platform_tests ref=pandas-2.2 |
|
/platform_tests ref=pandas-2.2 |
Job PR-4079-fbbb99b is done. |
/platform_tests ref=pandas-2.2 |
|
Job PR-4079-b91cab8 is done. |
@@ -132,6 +132,7 @@ def _drop_duplicate_features_categorical(cls, X: DataFrame, keep: Union[str, boo | |||
# Converts [5, 'a', np.nan, 5] to [0, 1, 2, 0], these would be considered duplicates since they carry the same information. | |||
|
|||
# Have to convert to object dtype because category dtype for unknown reasons will refuse to replace NaNs. | |||
# TODO: Fix FutureWarning | |||
X_cur = X[features_to_check].astype("object").replace(mapping_features_val_dict_cur).astype(np.int64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Innixma this line raises FutureWarning
:
/local/home/shchuro/workspace/autogluon/features/src/autogluon/features/generators/drop_duplicates.py:135: FutureWarning: Downcasting behavior in `r
eplace` is deprecated and will be removed in a future version. To retain the old behavior, explicitly call `result.infer_objects(copy=False)`. To opt-
in to the future behavior, set `pd.set_option('future.no_silent_downcasting', True)`
X_cur = X[features_to_check].astype("object").replace(mapping_features_val_dict_cur).astype(np.int64)
Do you have any recommendations on how to fix it while keeping the correct behavior in pandas 2.0/2.1/2.2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will investigate and send PR
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks!
"min": "T", | ||
"ms": "L", | ||
"us": "U", | ||
# sub-daily |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow...
Job PR-4079-898abc4 is done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May not have enough time to test this before 1.1 release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Will do follow-up PRs to addres FutureWarnings
Issue #, if available: #3989
Description of changes:
YE
instead ofA
in our code).W
) that are compatible with both old/new style, and take care of all the frequency-related logic in AutoGluon (e.g., time features, lag selection)>=0.14.0,<0.14.4
to ensure that pandas 2.2 can be installedCategoryFeatureGenerator
Testing:
To do:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.