Adjust groupby operations to align with Pandas release 2.1.0 #116
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.
Description
In this PR, groupby operations are updated to their string counterparts. Previously they were passed as functions (functions from the numpy package), e.g., np.mean.
Defences for summaries have also been updated to reflect this change, along with tests.
The error raised by
utils::defence.py::_check_list()
has been altered slightly to ensure that tests pass when a function is passed.Relevant docstrings have also been altered.
Fixes #111
Motivation and Context
The motivation for this PR is the
FutureWarning
generated by Pandas after the release of Pandas 2.1.0. More information on this can be seen in the issue. #111Type of change
How Has This Been Tested?
Test configuration details:
Advice for reviewer
Checklist:
Additional comments