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

handle warning in newer pandas version #29

Merged
merged 3 commits into from
Feb 23, 2023
Merged

handle warning in newer pandas version #29

merged 3 commits into from
Feb 23, 2023

Conversation

mattmilten
Copy link
Member

We currently get a warning with newer pandas versions:

grblogtools\helpers.py:47: FutureWarning: Not prepending group keys to the result index of transform-like apply. In the future, the group keys will be included in the index, regardless of whether the applied function returns a like-indexed object.
To preserve the previous behavior, use

	>>> .groupby(..., group_keys=False)

To adopt the future behavior and silence this warning, use 

	>>> .groupby(..., group_keys=True)
  return parameters.groupby("Version").apply(fill_for_version_nosuffix)

I added the suggested group_keys=False to the two affected calls of groupby() to avoid this warning.

@CLAassistant
Copy link

CLAassistant commented Jan 27, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@simonbowly simonbowly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, group_keys=False is what we want here. Thanks!

@mattmilten
Copy link
Member Author

@simonbowly, do you have any idea why those checks are failing?

@simonbowly
Copy link
Member

They're failing on master as well. It looks like poetry has an issue with isort, and we need to upgrade it: PyCQA/isort#2077

@simonbowly
Copy link
Member

Merging #31 should fix the problem here

@simonbowly
Copy link
Member

I merged #31 and rebased this. All good now

@simonbowly simonbowly merged commit a77968f into master Feb 23, 2023
@simonbowly simonbowly deleted the pandas_warning branch February 23, 2023 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants