8000 Various docstring fixes by ChiefMilesEdgeworth · Pull Request #28744 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

Various docstring fixes #28744

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
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a3e4315
DOC: Fixed PR02 docstring error in pandas Series idxmin and idxmax
ChiefMilesEdgeworth Oct 1, 2019
d1f1ba0
DOC: Fixed other PR02 docstring errors in pandas Series class
ChiefMilesEdgeworth Oct 1, 2019
7fc0e35
DOC: Fixed other PR02 docstring errors in pandas rolling and ewm files
ChiefMilesEdgeworth Oct 2, 2019
cd15cec
DOC: Fixed other PR02 docstring errors in pandas plotting file
ChiefMilesEdgeworth Oct 2, 2019
51bdc5d
DOC: Fixed other PR02 docstring errors in pandas frame.py file
ChiefMilesEdgeworth Oct 2, 2019
ffe849f
Ran Black
ChiefMilesEdgeworth Oct 2, 2019
f3b9540
Flake8 Changes
ChiefMilesEdgeworth Oct 2, 2019
d5c0394
Merge branch 'master' into Various_docstring_fixes
ChiefMilesEdgeworth Oct 2, 2019
bedf748
Test fixes
ChiefMilesEdgeworth Oct 2, 2019
4d7a386
DOC: Test fixes part 2
ChiefMilesEdgeworth Oct 2, 2019
2658caf
Merge branch 'master' into Various_docstring_fixes
ChiefMilesEdgeworth Oct 2, 2019
532b53c
DOC: Update args and kwargs to same line, other small changes
ChiefMilesEdgeworth Oct 3, 2019
2f48f5a
Merge remote-tracking branch 'origin/Various_docstring_fixes' into Va…
ChiefMilesEdgeworth Oct 3, 2019
2df56a2
DOC: Missed whitespace
ChiefMilesEdgeworth Oct 3, 2019
ded2c0c
DOC: Fixing overlooked issues
ChiefMilesEdgeworth Oct 4, 2019
5263577
Merge pull request #1 from pandas-dev/master
ChiefMilesEdgeworth Oct 7, 2019
3b6f88c
Merge remote-tracking branch 'origin/master'
ChiefMilesEdgeworth Oct 8, 2019
894f7d1
Merge remote-tracking branch 'upstream/master'
ChiefMilesEdgeworth Oct 10, 2019
d687909
Merge remote-tracking branch 'upstream/master'
ChiefMilesEdgeworth Oct 11, 2019
ec3b412
Merge branch 'master' into Various_docstring_fixes
ChiefMilesEdgeworth Oct 11, 2019
494b997
DOC: Revert back to multiple parameters on one line
ChiefMilesEdgeworth Oct 15, 2019
2c723a7
Merge remote-tracking branch 'upstream/master' into Various_docstring…
ChiefMilesEdgeworth Oct 15, 2019
0507336
Merge remote-tracking branch 'upstream/master' into Various_docstring…
ChiefMilesEdgeworth Oct 15, 2019
f631cb4
DOC: Spacing fixed
ChiefMilesEdgeworth Oct 16, 2019
16fd88a
DOC: Fixed typos
ChiefMilesEdgeworth Oct 16, 2019
a5cbc8c
Update pandas/core/frame.py
ChiefMilesEdgeworth Nov 8, 2019
2a105c2
Update pandas/core/window/ewm.py
ChiefMilesEdgeworth Nov 8, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DOC: Fixed other PR02 docstring errors in pandas rolling and ewm files
Fixed methods mean, std, var, and corr in ewm.py. 
Fixed methods sum, apply, max, std, var, and quantile in rolling.py
  • Loading branch information
ChiefMilesEdgeworth committed Oct 2, 2019
commit 7fc0e356ecfb4a3f2553253b1e3a0e7d169b2561
65 changes: 41 additions & 24 deletions pandas/core/window/ewm.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,10 @@
----------
bias : bool, default False
Use a standard estimation bias correction.
*args, **kwargs
Arguments and keyword arguments to be passed into func.
"""

_pairwise_template = """
Parameters
----------
other : Series, DataFrame, or ndarray, optional
If not supplied then will default to self and produce pairwise
output.
pairwise : bool, default None
If False then only matching columns between self and other will be
used and the output will be a DataFrame.
If True then all pairwise combinations will be calculated and the
output will be a MultiIndex DataFrame in the case of DataFrame
inputs. In the case of missing elements, only complete pairwise
observations will be used.
bias : bool, default False
Use a standard estimation bias correction.
*args
Arguments to be passed into func.
**kwargs
Keyword arguments to be passed into func.
Keyword arguments to be passed into func.
Copy link
Member

Choose a reason for hiding this comment

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

merge args and kwargs

"""


Expand Down Expand Up @@ -275,8 +258,10 @@ def mean(self, *args, **kwargs):

Parameters
----------
*args, **kwargs
Arguments and keyword arguments to be passed into func.
*args
Arguments to be passed into func.
**kwargs
Keyword arguments to be passed into func.
Copy link
Member

Choose a reason for hiding this comment

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

Better revert this please.

Copy link
Member

Choose a reason for hiding this comment

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

Any reason to not resolve this and mark as resolved? I think your proposed change is incorrect, the original is more accurate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No idea why I missed these. I'll get them right away.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, it looks like I just forgot to mark this as resolved. It should be fixed in the last commit.

Copy link
Member

Choose a reason for hiding this comment

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

I think it's not reverted.

Copy link
Member

Choose a reason for hiding this comment

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

Can you revert please

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For some reason it's showing up as reverted on my machine, but not here. I'll just do the edits on Github.

"""
nv.validate_window_func("mean", args, kwargs)
return self._apply("ewma", **kwargs)
Expand Down Expand Up @@ -317,10 +302,26 @@ def f(arg):

@Substitution(name="ewm")
@Appender(_doc_template)
@Appender(_pairwise_template)
def cov(self, other=None, pairwise=None, bias=False, **kwargs):
"""
Exponential weighted sample covariance.

Parameters
----------
other : Series, DataFrame, or ndarray, optional
If not supplied then will default to self and produce pairwise
output.
pairwise : bool, default None
If False then only matching columns between self and other will be
used and the output will be a DataFrame.
If True then all pairwise combinations will be calculated and the
output will be a MultiIndex DataFrame in the case of DataFrame
inputs. In the case of missing elements, only complete pairwise
observations will be used.
bias : bool, default False
Use a standard estimation bias correction
**kwargs
Keyword arguments to be passed into func.
"""
if other is None:
other = self._selected_obj
Expand Down Expand Up @@ -348,11 +349,27 @@ def _get_cov(X, Y):

@Substitution(name="ewm")
@Appender(_doc_template)
@Appender(_pairwise_template)
def corr(self, other=None, pairwise=None, **kwargs):
"""
Exponential weighted sample correlation.


Parameters
----------
other : Series, DataFrame, or ndarray, optional
If not supplied then will default to self and produce pairwise
output.
pairwise : bool, default None
If False then only matching columns between self and other will be
used and the output will be a DataFrame.
If True then all pairwise combinations will be calculated and the
output will be a MultiIndex DataFrame in the case of DataFrame
inputs. In the case of missing elements, only complete pairwise
observations will be used.
**kwargs
Keyword arguments to be passed into func.
"""

if other is None:
other = self._selected_obj
# only default unset
Expand Down
23 changes: 17 additions & 6 deletions pandas/core/window/rolling.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,10 @@ def aggregate(self, func, *args, **kwargs):

Parameters
----------
*args, **kwargs
*args
For compatibility with other %(name)s methods. Has no effect
on the computed value.
**kwargs
For compatibility with other %(name)s methods. Has no effect
on the computed value.

Expand Down Expand Up @@ -1018,7 +1021,9 @@ def count(self):
not passed. In the future `raw` will default to False.

.. versionadded:: 0.23.0
*args, **kwargs
args
Arguments and keyword arguments to be passed into func.
kwargs
Arguments and keyword arguments to be passed into func.

Returns
Expand Down Expand Up @@ -1084,7 +1089,9 @@ def sum(self, *args, **kwargs):

Parameters
----------
*args, **kwargs
*args
Arguments and keyword arguments to be passed into func.
**kwargs
Arguments and keyword arguments to be passed into func.
"""
)
Expand Down Expand Up @@ -1190,7 +1197,9 @@ def median(self, **kwargs):
ddof : int, default 1
Delta Degrees of Freedom. The divisor used in calculations
is ``N - ddof``, where ``N`` represents the number of elements.
*args, **kwargs
*args
For NumPy compatibility. No additional arguments are used.
**kwargs
For NumPy compatibility. No additional arguments are used.

Returns
Expand Down Expand Up @@ -1265,7 +1274,9 @@ def f(arg, *args, **kwargs):
ddof : int, default 1
Delta Degrees of Freedom. The divisor used in calculations
is ``N - ddof``, where ``N`` represents the number of elements.
*args, **kwargs
*args
For NumPy compatibility. No additional arguments are used.
**kwargs
For NumPy compatibility. No additional arguments are used.

Returns
Expand Down Expand Up @@ -1392,7 +1403,7 @@ def kurt(self, **kwargs):
* higher: `j`.
* nearest: `i` or `j` whichever is nearest.
* midpoint: (`i` + `j`) / 2.
**kwargs:
**kwargs
For compatibility with other %(name)s methods. Has no effect on
the result.

Expand Down
0