Skip to content

Commit

Permalink
replaced Appender with doc for Frame.compare() and Series.compare()
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmspeechmatics committed Nov 5, 2020
1 parent 875a681 commit fef203a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -6032,7 +6032,7 @@ def __rdivmod__(self, other) -> Tuple[DataFrame, DataFrame]:
# ----------------------------------------------------------------------
# Combination-Related

@Appender(
@doc(_shared_docs["compare"],
"""
Returns
-------
Expand Down Expand Up @@ -6134,9 +6134,7 @@ def __rdivmod__(self, other) -> Tuple[DataFrame, DataFrame]:
2 b b 3.0 3.0 3.0 4.0
3 b b NaN NaN 4.0 4.0
4 a a 5.0 5.0 5.0 5.0
"""
)
@Appender(_shared_docs["compare"] % _shared_doc_kwargs)
""", klass=_shared_doc_kwargs["klass"])
def compare(
self,
other: DataFrame,
Expand Down
6 changes: 2 additions & 4 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -2813,7 +2813,7 @@ def _construct_result(
out.name = name
return out

@Appender(
@doc(generic._shared_docs["compare"],
"""
Returns
-------
Expand Down Expand Up @@ -2873,9 +2873,7 @@ def _construct_result(
2 c c
3 d b
4 e e
"""
)
@Appender(generic._shared_docs["compare"] % _shared_doc_kwargs)
""", klass=_shared_doc_kwargs["klass"])
def compare(
self,
other: "Series",
Expand Down

0 comments on commit fef203a

Please sign in to comment.