-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
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
Various docstring fixes #28744
Changes from 23 commits
a3e4315
d1f1ba0
7fc0e35
cd15cec
51bdc5d
ffe849f
f3b9540
d5c0394
bedf748
4d7a386
2658caf
532b53c
2f48f5a
2df56a2
ded2c0c
5263577
3b6f88c
894f7d1
d687909
ec3b412
494b997
2c723a7
0507336
f631cb4
16fd88a
a5cbc8c
2a105c2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2614,12 +2614,9 @@ def transpose(self, *args, **kwargs): | |
|
||
Parameters | ||
---------- | ||
copy : bool, default False | ||
If True, the underlying data is copied. Otherwise (default), no | ||
copy is made if possible. | ||
*args, **kwargs | ||
Additional keywords have no effect but might be accepted for | ||
compatibility with numpy. | ||
Additional arguments and keywords have no effect but might be | ||
accepted for compatibility with numpy. | ||
|
||
Returns | ||
------- | ||
|
@@ -3241,7 +3238,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`. | ||
|
@@ -5209,8 +5206,8 @@ def swaplevel(self, i=-2, j=-1, axis=0): | |
|
||
Parameters | ||
---------- | ||
i, j : int, str (can be mixed) | ||
Level of index to be swapped. Can pass level name as string. | ||
i, j: int or str | ||
Levels indecies to be swapped. Can pass level name as string. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. typo, indices |
||
|
||
Returns | ||
------- | ||
|
@@ -6299,7 +6296,6 @@ def unstack(self, level=-1, fill_value=None): | |
%(versionadded)s | ||
Parameters | ||
---------- | ||
frame : DataFrame | ||
id_vars : tuple, list, or ndarray, optional | ||
Column(s) to use as identifier variables. | ||
value_vars : tuple, list, or ndarray, optional | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2101,8 +2101,8 @@ def idxmin(self, axis=0, skipna=True, *args, **kwargs): | |
Exclude NA/null values. If the entire Series is NA, the result | ||
will be NA. | ||
*args, **kwargs | ||
Additional keywords have no effect but might be accepted | ||
for compatibility with NumPy. | ||
Additional arguments and keywords have no effect but might be | ||
accepted for compatability with NumPy. | ||
|
||
Returns | ||
------- | ||
|
@@ -2171,8 +2171,8 @@ def idxmax(self, axis=0, skipna=True, *args, **kwargs): | |
Exclude NA/null values. If the entire Series is NA, the result | ||
will be NA. | ||
*args, **kwargs | ||
Additional keywords have no effect but might be accepted | ||
for compatibility with NumPy. | ||
Additional arguments and keywords have no effect but might be | ||
accepted for compatibility with NumPy. | ||
|
||
Returns | ||
------- | ||
|
@@ -3544,8 +3544,8 @@ def swaplevel(self, i=-2, j=-1, copy=True): | |
|
||
Parameters | ||
---------- | ||
i, j : int, str (can be mixed) | ||
Level of index to be swapped. Can pass level name as string. | ||
i, j : int, str | ||
Level of the indecies to be swapped. Can pass level name as string. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same typo |
||
copy : bool, default True | ||
Whether to copy underlying data. | ||
|
||
|
@@ -4099,14 +4099,10 @@ def rename(self, index=None, **kwargs): | |
the index. | ||
Scalar or hashable sequence-like will alter the ``Series.name`` | ||
attribute. | ||
copy : bool, default True | ||
Whether to copy underlying data. | ||
inplace : bool, default False | ||
Whether to return a new Series. If True then value of copy is | ||
ignored. | ||
level : int or level name, default None | ||
In case of a MultiIndex, only rename labels in the specified | ||
level. | ||
|
||
**kwargs | ||
Additional keyword arguments passed to the function. Only the | ||
"inplace" keyword is used. | ||
|
||
Returns | ||
------- | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,25 +21,6 @@ | |
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. | ||
**kwargs | ||
Keyword arguments to be passed into func. | ||
""" | ||
|
||
|
||
class EWM(_Rolling): | ||
r""" | ||
|
@@ -276,7 +257,7 @@ def mean(self, *args, **kwargs): | |
Parameters | ||
---------- | ||
*args, **kwargs | ||
Arguments and keyword arguments to be passed into func. | ||
Keyword arguments to be passed into func. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Better revert this please. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No idea why I missed these. I'll get them right away. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's not reverted. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you revert please There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
ChiefMilesEdgeworth marked this conversation as resolved.
Show resolved
Hide resolved
|
||
""" | ||
nv.validate_window_func("mean", args, kwargs) | ||
return self._apply("ewma", **kwargs) | ||
|
@@ -317,10 +298,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 | ||
|
@@ -348,10 +345,24 @@ 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 | ||
|
Uh oh!
There was an error while loading. Please reload this page.