Skip to content

Bug fix using GroupBy.resample produces inconsistent behavior when calling it over empty df #47705 #47672

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

Merged
merged 53 commits into from
Oct 3, 2022

Conversation

ahmedibrhm
Copy link
Contributor

@ahmedibrhm ahmedibrhm commented Jul 11, 2022

@pep8speaks
Copy link

pep8speaks commented Jul 11, 2022

Hello @ahmedibrhm! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2022-08-15 17:40:17 UTC

@ahmedibrhm ahmedibrhm marked this pull request as draft July 11, 2022 19:16
@ahmedibrhm ahmedibrhm marked this pull request as ready for review July 13, 2022 18:57
@ahmedibrhm ahmedibrhm changed the title Bug fix GroupBy Resample #43767 Bug fix GroupBy Resample #47705 Jul 13, 2022
@ahmedibrhm
Copy link
Contributor Author

@mroeschke it's ready for another look if you wanna review again

@mroeschke mroeschke added this to the 1.5 milestone Aug 15, 2022


@pytest.mark.parametrize("keys", [["a"], ["a", "b"]])
def test_resample_empty_Dataframe(keys):
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to combine this with test_empty above using pytest.mark.parametrize?

@@ -514,11 +514,20 @@ def _wrap_result(self, result):
"""
Potentially wrap any results.
"""
obj = self.obj
Copy link
Member

Choose a reason for hiding this comment

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

Could you add # GH 47705 here?

@mroeschke mroeschke removed this from the 1.5 milestone Aug 22, 2022
@github-actions
Copy link
Contributor

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Sep 22, 2022
Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

One outstanding question about combining tests. @ahmedibrhm - can you address this (it may not be feasible to combine the tests), move the whatsnew note to 1.6.0, and merge main.

@ahmedibrhm
Copy link
Contributor Author

@rhshadrach sorry for the delay I was traveling and couldn't check that at all. It's hard to combine the tests because one test has the name of the column "date". So it won't be feasible to construct the expected one.

@rhshadrach
Copy link
Member

No problem @ahmedibrhm! Looks like the whatsnew note got dropped - can you add that back in to 1.6.0.

@ahmedibrhm
Copy link
Contributor Author

@rhshadrach how about now

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

lgtm; @mroeschke - you good here?

@mroeschke mroeschke removed the Stale label Oct 3, 2022
@mroeschke mroeschke added this to the 1.6 milestone Oct 3, 2022
@mroeschke mroeschke merged commit fba6723 into pandas-dev:main Oct 3, 2022
@mroeschke
Copy link
Member

Thanks @ahmedibrhm

@mroeschke mroeschke modified the milestones: 1.6, 2.0 Oct 13, 2022
noatamir pushed a commit to noatamir/pandas that referenced this pull request Nov 9, 2022
…lling it over empty df pandas-dev#47705 (pandas-dev#47672)

* DOC pandas-dev#45443 edited the documentation of where/mask functions

* DOC pandas-dev#45443 edited the documentation of where/mask functions

* Update generic.py

* Bug 43767 fix

* fixing lines doc

* visual indent

* visual indent

* indentation

* grouby.resample bug

* groubby.sample

* syntax

* syntax

* syntax

* syntax

* what's new

* flake8 error

* pytest

* blank line

* editting resample

* editting resample

* syntax

* syntax

* syntax

* space

* space

* space

* inplace

* spelling

* test

* test resampler

* tests

* tests

* Update resample.py

* Update resample.py

* Update resample.py

* Update v1.6.0.rst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: groupby.resample have inconsistent behavior when calling dataframe that's empty vs have entries
4 participants