Skip to content
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

[MNT] address deprecation of automatic drop on DataFrame.agg on non-numeric columns #4436

Merged
merged 1 commit into from Apr 10, 2023

Conversation

fkiraly
Copy link
Collaborator

@fkiraly fkiraly commented Apr 4, 2023

Prior to pandas 2, DataFrame.agg would automatically drop non-numeric columns for numeric aggregations.

That is no longer the case from pandas 2 and causes exceptions.

This PR addresses the deprecation by manually dropping respective columns.

@fkiraly fkiraly added maintenance Continuous integration, unit testing & package distribution module:metrics&benchmarking metrics and benchmarking modules labels Apr 4, 2023
@fkiraly fkiraly merged commit 0d2d878 into main Apr 10, 2023
22 checks passed
@fkiraly fkiraly deleted the benchmarking-evaluate-drop-col branch April 10, 2023 07:33
fkiraly added a commit that referenced this pull request Apr 10, 2023
Fixes #4426.
This PR contains some tentative fixes for compatibility issues arising from the `pandas` 2 release on Apr 3:

* fixes to index handling in `ForecastingHorizon.to_absolute`
* fixes to many instances of using `ForecastingHorizon` as `pd.DataFrame` `index` in constructor or setter (`.index = ...`), this is no longer possible
* writing to a `loc` index that does not exist no longer creates it but raises an exception - this was replaced by ensuring the right rows and columns are present before the write - `AutoETS`, `UnobservedComponents`
* replace deprecated `is_integer` and `is_numeric` with recommended replacement calls to `pandas.api.types`
* fixed old `from_nested_to_multi_index` utility producing `object` valued multiindex (instead of integer typed etc)
* same for `_convert_tsf_to_hierarchical` utility in data loaders
* replace deprecated `pandas.util.testing` imports with `pandas.testing`
* #4435
* #4436
* replace in-place nested pandas operations with construction of new frame: `test_interpolate`
* #4438
* replace single-index temporal slicing at lower granularity with slice-based slicing

Relies on #4429 for testing.

Does *not* change the dependency bounds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Continuous integration, unit testing & package distribution module:metrics&benchmarking metrics and benchmarking modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant