Skip to content

DOC: Add missing descriptions in See Also section #33514

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions pandas/core/window/rolling.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,8 +1041,8 @@ def _get_window(
"""
See Also
--------
pandas.DataFrame.rolling.aggregate
pandas.DataFrame.aggregate
pandas.DataFrame.rolling.aggregate: Perform a rolling aggregation over DataFrame.
pandas.DataFrame.aggregate: Perform an aggregation over DataFrame.
"""
)

Expand Down Expand Up @@ -1891,8 +1891,8 @@ def _validate_freq(self):
"""
See Also
--------
Series.rolling
DataFrame.rolling
Series.rolling: Provide rolling window calculations for Series.
DataFrame.rolling: Provides rolling window calculations for DataFrame.
"""
)

Expand Down
33 changes: 33 additions & 0 deletions pandas/tests/reshape/merge/test_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,39 @@ def _constructor(self):

assert isinstance(result, NotADataFrame)

def test_merge_right_duplicate_suffix(self):
Copy link
Member

Choose a reason for hiding this comment

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

Please remove these changes - believe you have a separate PR for these

# https://github.com/pandas-dev/pandas/issues/29697

left_df = DataFrame({"A": [100, 200, 1], "B": [60, 70, 80]})
right_df = DataFrame({"A": [100, 200, 300], "B": [600, 700, 800]})

result = merge(left_df, right_df, on="A", how="right", suffixes=("_x", "_x"))
expected = DataFrame(
{"A": [100, 200, 300], "B1": [60, 70, np.nan], "B2": [600, 700, 800]}
)
expected.columns = ["A", "B_x", "B_x"]

tm.assert_frame_equal(result, expected)

def test_merge_outer_duplicate_suffix(self):
# https://github.com/pandas-dev/pandas/issues/29697

left_df = DataFrame({"A": [100, 200, 1], "B": [60, 70, 80]})
right_df = DataFrame({"A": [100, 200, 300], "B": [600, 700, 800]})

result = merge(left_df, right_df, on="A", how="outer", suffixes=("_x", "_x"))

expected = DataFrame(
{
"A": [100, 200, 1, 300],
"B1": [60, 70, 80, np.nan],
"B2": [600, 700, np.nan, 800],
}
)
expected.columns = ["A", "B_x", "B_x"]

tm.assert_frame_equal(result, expected)

def test_join_append_timedeltas(self):
# timedelta64 issues with join/merge
# GH 5695
Expand Down