Skip to content

DOC: Improve documented types for merge #48985

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 2 commits into from
Dec 6, 2022
Merged
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
12 changes: 4 additions & 8 deletions pandas/core/reshape/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,6 @@ def merge(
return op.get_result(copy=copy)


if __debug__:
merge.__doc__ = _merge_doc % "\nleft : DataFrame"


def _groupby_and_merge(by, left: DataFrame, right: DataFrame, merge_pieces):
"""
groupby & merge; we are always performing a left-by type operation
Expand Down Expand Up @@ -206,8 +202,8 @@ def merge_ordered(

Parameters
----------
left : DataFrame
right : DataFrame
left : DataFrame or named Series
right : DataFrame or named Series
on : label or list
Field names to join on. Must be found in both DataFrames.
left_on : label or list, or array-like
Expand All @@ -219,10 +215,10 @@ def merge_ordered(
left_on docs.
left_by : column name or list of column names
Group left DataFrame by group columns and merge piece by piece with
right DataFrame.
right DataFrame. Must be None if either left or right are a Series.
Copy link
Member

Choose a reason for hiding this comment

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

I didn't immediately find tests raising if this was the case. Mind adding a unit test to confirm this behavior?

right_by : column name or list of column names
Group right DataFrame by group columns and merge piece by piece with
left DataFrame.
left DataFrame. Must be None if either left or right are a Series.
fill_method : {'ffill', None}, default None
Interpolation method for data.
suffixes : list-like, default is ("_x", "_y")
Expand Down