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

Adjust groupby operations to align with Pandas release 2.1.0 #116

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

CBROWN-ONS
Copy link
Collaborator

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. #111

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

Test configuration details:

  • OS: Windows 10
  • Python version: 3.9.13
  • Java version: N/A
  • Python management system: Conda

Advice for reviewer

Checklist:

  • My code follows the intended structure of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Additional comments

@CBROWN-ONS CBROWN-ONS linked an issue Sep 1, 2023 that may be closed by this pull request
@CBROWN-ONS CBROWN-ONS added small warnings Issue relates to warnings being raised labels Sep 1, 2023
@CBROWN-ONS CBROWN-ONS marked this pull request as draft September 1, 2023 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
small warnings Issue relates to warnings being raised
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adjust groupby operators to align with new pandas version
1 participant