Skip to content

CLN: Move rolling helper functions to where they are used #34269

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 3 commits into from
May 21, 2020

Conversation

mroeschke
Copy link
Member

  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff

Added some docstrings as well

@mroeschke mroeschke added this to the 1.1 milestone May 20, 2020
@@ -59,6 +56,81 @@
from pandas.tseries.offsets import DateOffset


def calculate_center_offset(window) -> int:
"""
Calculates an offset necessary to have the window label to be centered
Copy link
Member

@MarcoGorelli MarcoGorelli May 20, 2020

Choose a reason for hiding this comment

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

Sorry to be pedantic :) But should this follow the docstring guide?

The short summary must start with a capital letter, end with a dot, and fit in a single line. It needs to express what the object does without providing details. For functions and methods, the short summary must start with an infinitive verb.

same for the calculate_min_periods docstring

@jreback jreback added the Window rolling, ewma, expanding label May 20, 2020
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

lgtm. happy to have you de-privatize things if needed (e.g. get_center_of_mass) and/or improve doc-strings. just give a quick pass if you can. ping on green.

@WillAyd WillAyd merged commit 31a8503 into pandas-dev:master May 21, 2020
@WillAyd
Copy link
Member

WillAyd commented May 21, 2020

Thanks @mroeschke

@mroeschke mroeschke deleted the move_rolling_common_functions branch May 21, 2020 16:26
PuneethaPai pushed a commit to PuneethaPai/pandas that referenced this pull request May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Window rolling, ewma, expanding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants