Skip to content

Conversation

@joshlk
Copy link

@joshlk joshlk commented Mar 19, 2021

@pep8speaks
Copy link

pep8speaks commented Mar 19, 2021

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

Line 1615:9: E122 continuation line missing indentation or outdented
Line 1619:1: W293 blank line contains whitespace
Line 1628:1: W293 blank line contains whitespace
Line 1638:1: W293 blank line contains whitespace

Comment last updated at 2021-04-14 11:10:21 UTC
Copy link
Member

@mzeitlin11 mzeitlin11 left a comment

Choose a reason for hiding this comment

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

Thanks for the pr, @joshlk! A couple quick suggestions

@mzeitlin11 mzeitlin11 added Docs Window rolling, ewma, expanding labels Mar 19, 2021
joshlk and others added 4 commits March 19, 2021 16:47
Co-authored-by: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Co-authored-by: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
2013-01-01 09:00:05 NaN
2013-01-01 09:00:06 4.0
Rolling window apply function that uses multiple columns as input using
Copy link
Member

@mroeschke mroeschke Mar 20, 2021

Choose a reason for hiding this comment

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

This might be better in the rolling apply docstring (as many of these parameters are specific to apply)

Copy link
Author

Choose a reason for hiding this comment

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

The doc example is primarily about how to use the method='table' feature in the rolling function. Also the apply doc currently doesn't include any examples - all the examples seem to be in the rolling doc (e.g. .sum(std=3))

Copy link
Member

@mroeschke mroeschke Mar 23, 2021

Choose a reason for hiding this comment

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

Right but this particular usage of method='table' feature in the rolling function is only specific to rolling(...).apply(...).

The apply doc could definitely use more examples!

Copy link
Author

@joshlk joshlk Mar 24, 2021

Choose a reason for hiding this comment

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

Would you like me to move this to the apply docstring?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, this example you made would go great in the rolling apply docstring

Copy link
Author

Choose a reason for hiding this comment

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

@mroeschke Hi, I've tried adding the docs to the apply doc-string but I'm unsure how to do it - my latest commit isn't working. Sorry I am unfamiliar with how the doc-string is being generated.

Copy link
Member

Choose a reason for hiding this comment

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

You can see in this CI check what modifications need to be made to get this check to pass: https://github.com/pandas-dev/pandas/pull/40519/checks?check_run_id=2342425934

Additionally you can see here how to render the docs locally to see if there's inconsistent formatting somewhere: https://pandas.pydata.org/pandas-docs/dev/development/contributing_documentation.html#building-the-documentation

@simonjayhawkins
Copy link
Member

@joshlk ci is failing can you fix-up

@joshlk
Copy link
Author

joshlk commented May 26, 2021

@joshlk ci is failing can you fix-up

Hi, I've tried adding the docs to the apply doc-string but I'm unsure how to do it - my latest commit isn't working. Sorry I am unfamiliar with how the doc-string is being generated. Could you please help

@simonjayhawkins
Copy link
Member

you can run the docstring validation script locally. (if on windows use git bash or wsl)

to build the docs, see https://pandas.pydata.org/pandas-docs/dev/development/contributing_documentation.html#building-the-documentation

this PR is also failing pre-commit checks (black and trailing whitespace) see https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit

@datapythonista
Copy link
Member

@joshlk can you have a look at the points of the previous comment, and try to leave the CI green please?

method='table'. The apply function multiplies A with B and sums all rows
(dot product).
>>> df = pd.DataFrame({{'A': range(5), 'B': range(5,0,-1)}})
Copy link
Contributor

Choose a reason for hiding this comment

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

I get a TypeError: unhashable type: 'dict' when I run this line. When I replace {{ with { and }} with } it works, though.

@mroeschke
Copy link
Member

Thanks for the PR, but appears that progress has stalled. Closing, but let us know if you're still interested in working on this and we'd be happy to reopen.

@mroeschke mroeschke closed this Jul 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docs Window rolling, ewma, expanding

7 participants