Skip to content

Conversation

@mroeschke
Copy link
Member

@mroeschke mroeschke added Window rolling, ewma, expanding Regression Functionality that used to work in a prior pandas version labels Feb 5, 2021
@mroeschke mroeschke added this to the 1.2.2 milestone Feb 5, 2021
)
self.min_periods = 0
return super().count()
result = super().count()
Copy link
Contributor

Choose a reason for hiding this comment

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

grr this is not pretty. maybe have a _count() method where you can pass min_periods? (for 1.2.2 this is prob ok, but for 1.3)

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm either is a shim that will be removed in 2.0. I think in either way I'll have to do this gymnastics since min_periods is set globally on the object

Copy link
Contributor

Choose a reason for hiding this comment

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

ok for here, I was talking about a _count() (private method) that we could pass thru min_periods

@jreback jreback merged commit d558bce into pandas-dev:master Feb 5, 2021
@jreback
Copy link
Contributor

jreback commented Feb 5, 2021

@meeseeksdev backport 1.2.x

@jreback
Copy link
Contributor

jreback commented Feb 5, 2021

thanks @mroeschke

@lumberbot-app

This comment has been minimized.

@mroeschke mroeschke deleted the regr/roll_count_minp branch February 5, 2021 23:30
simonjayhawkins pushed a commit to simonjayhawkins/pandas that referenced this pull request Feb 7, 2021
simonjayhawkins added a commit that referenced this pull request Feb 7, 2021
#39634)

Co-authored-by: Matthew Roeschke <emailformattr@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Regression Functionality that used to work in a prior pandas version Window rolling, ewma, expanding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Rolling.count modifies 'min_periods' inplace since 1.2.0

3 participants