8000 DOC: Fix docstrings with the sections in the wrong order #24280 by benjaminr · Pull Request #24288 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

DOC: Fix docstrings with the sections in the wrong order #24280 #24288

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 15 commits into from
Dec 19, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Corrected order of see_also and examples string defitions to match do…
…cstrings.
  • Loading branch information
benjaminr committed Dec 18, 2018
commit 5f64fcf824139bf2560cd07b2f91c4697aa3c2c0
16 changes: 8 additions & 8 deletions pandas/core/groupby/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,14 @@ def _selection_name(self):
else:
return self._selection

_agg_see_also_doc = dedent("""
See Also
--------
pandas.Series.groupby.apply
pandas.Series.groupby.transform
pandas.Series.aggregate
""")

_agg_examples_doc = dedent("""
Examples
--------
Expand Down Expand Up @@ -734,14 +742,6 @@ def _selection_name(self):
2 3 4
""")

_agg_see_also_doc = dedent("""
See Also
--------
pandas.Series.groupby.apply
pandas.Series.groupby.transform
pandas.Series.aggregate
""")

@Appender(_apply_docs['template']
.format(input='series',
examples=_apply_docs['series_examples']))
Expand Down
26 changes: 13 additions & 13 deletions pandas/core/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,13 @@ def f(arg, *args, **kwargs):

return self._wrap_results(results, blocks, obj)

_agg_see_also_doc = dedent("""
See Also
--------
pandas.DataFrame.rolling.aggregate
pandas.DataFrame.aggregate
""")

_agg_examples_doc = dedent("""
Examples
--------
Expand Down Expand Up @@ -725,13 +732,6 @@ def f(arg, *args, **kwargs):
9 0.070889 0.134399 -0.031308
""")

_agg_see_also_doc = dedent("""
See Also
--------
pandas.DataFrame.rolling.aggregate
pandas.DataFrame.aggregate
""")

@Substitution(see_also=_agg_see_also_doc,
examples=_agg_examples_doc,
versionadded='',
Expand Down Expand Up @@ -2192,6 +2192,12 @@ def __init__(self, obj, com=None, span=None, halflife=None, alpha=None,
def _constructor(self):
return EWM

_agg_see_also_doc = dedent("""
See Also
--------
pandas.DataFrame.rolling.aggregate
""")

_agg_examples_doc = dedent("""
Examples
--------
Expand Down 63F2 Expand Up @@ -2224,12 +2230,6 @@ def _constructor(self):
9 -0.286980 0.618493 -0.694496
""")

_agg_see_also_doc = dedent("""
See Also
--------
pandas.DataFrame.rolling.aggregate
""")

@Substitution(see_also=_agg_see_also_doc,
examples=_agg_examples_doc,
versionadded='',
Expand Down
0