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: Update args and kwargs to same line, other small changes
Put args and kwargs back on the same line, since that's how the documentation should be. The validation script needs to be changed to catch this.
  • Loading branch information
ChiefMilesEdgeworth committed Oct 3, 2019
commit 532b53cc800b571fe275a9b4e1d371d021e43e31
15 changes: 6 additions & 9 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2610,12 +2610,9 @@ def transpose(self, *args, **kwargs):

Parameters
----------
*args
Additional arguments have no effect but might be accepted for
compatibility with numpy.
**kwargs
Additional keywords have no effect but might be accepted for
compatibility with numpy.
*args, **kwargs
Additional arguments and keywords have no effect but might be
accepted for compatibility with numpy.

Returns
-------
Expand Down Expand Up @@ -3237,7 +3234,7 @@ def eval(self, expr, inplace=False, **kwargs):
If the expression contains an assignment, whether to perform the
operation inplace and mutate the existing DataFrame. Otherwise,
a new DataFrame is returned.
**kwargs : dict
**kwargs
See the documentation for :func:`eval` for complete details
on the keyword arguments accepted by
:meth:`~pandas.DataFrame.query`.
Expand Down Expand Up @@ -5205,9 +5202,9 @@ def swaplevel(self, i=-2, j=-1, axis=0):

Parameters
----------
i : int, str (can be mixed)
i : int or str
Level of first index to be swapped. Can pass level name as string.
j : int, str (can be mixed)
j : int or str
Level of second index to be swapped. Can pass level name as string.
Copy link
Member

Choose a reason for hiding this comment

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

I'd merge those, I think the validation script should accept this, as proposed in the PR where you update it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right now the proposed script does not validate any variables on the same line, just *args and **kwargs. I left it that way in case we decide we don't want people to just throw a bunch of variables on the same line. If you think that'd be fine, then I can rewrite the script update to allow for that, and change these here.

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 the PR allowing having those together was merged, right? Can you have i, j instead please


Returns
Expand Down
20 changes: 7 additions & 13 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -2082,12 +2082,9 @@ def idxmin(self, axis=0, skipna=True, *args, **kwargs):
skipna : bool, default True
Exclude NA/null values. If the entire Series is NA, the result
will be NA.
*args
Additional arguments have no effect but might be accepted
for compatability with NumPy
**kwargs
Additional keywords have no effect but might be accepted
for compatibility with NumPy.
*args, **kwargs
Additional arguments and keywords have no effect but might be
accepted for compatability with NumPy.

Returns
-------
Expand Down Expand Up @@ -2155,13 +2152,10 @@ def idxmax(self, axis=0, skipna=True, *args, **kwargs):
skipna : bool, default True
Exclude NA/null values. If the entire Series is NA, the result
will be NA.
*args
Additional arguments have no effect but might be accepted
for compatibility with NumPy.
**kwargs
Additional keywords have no effect but might be accepted
for compatibility with NumPy.

*args, **kwargs
Additional arguments and keywords have no effect but might be
accepted for compatibility with NumPy.

Returns
-------
Index
Expand Down
9 changes: 3 additions & 6 deletions pandas/core/window/ewm.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@
----------
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.
*args, **kwargs
Arguments and keyword arguments to be passed into func.
"""


Expand Down Expand Up @@ -365,10 +363,9 @@ def corr(self, other=None, pairwise=None, **kwargs):
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 : dict of {str : Any}
**kwargs
Keyword arguments to be passed into func.
"""

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

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

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

.. versionadded:: 0.23.0
args : tuple of Any
Arguments and keyword arguments to be passed into func.
kwargs : dict of {str : any}
*args, **kwargs
Arguments and keyword arguments to be passed into func.

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

Parameters
----------
*args
Arguments and keyword arguments to be passed into func.
**kwargs
*args, **kwargs
Arguments and keyword arguments to be passed into func.
"""
)
Expand Down Expand Up @@ -1197,9 +1190,7 @@ 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
For NumPy compatibility. No additional arguments are used.
**kwargs
*args, **kwargs
For NumPy compatibility. No additional arguments are used.

Returns
Expand Down Expand Up @@ -1274,9 +1265,7 @@ 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
For NumPy compatibility. No additional arguments are used.
**kwargs
*args, **kwargs
For NumPy compatibility. No additional arguments are used.

Returns
Expand Down
3 changes: 2 additions & 1 deletion pandas/plotting/_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,8 @@ def lag_plot(series, lag=1, ax=None, **kwds):
series : Time series
lag : lag of the scatter plot, default 1
ax : Matplotlib axis object, optional
**kwds : Matplotlib scatter method keyword arguments, optional
**kwds
Matplotlib scatter method keyword arguments, optional
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 remove the optional, and end with period.


Returns
-------
Expand Down
0