Skip to content

DOC: merge doc for indicator parameter can be improved #34480

Closed
@ianozsvald

Description

@ianozsvald

Location of the documentation

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.merge.html#pandas.DataFrame.merge

Documentation problem

The documentation is correct but hard to read, currently:

... If string, column with information on source of each row will be added to output DataFrame, and column will be named value of string. Information column is Categorical-type and ...

Suggested fix for documentation

I believe the following paragraph will be easier to read:

If True, adds a column to the output DataFrame called “_merge” with information on 
the source of each row. The column can be given a different name by providing a 
string argument. The column will have a Categorical type with the value of “left_only” 
for observations whose merge key only appears in ‘left’ DataFrame, “right_only” for 
observations whose merge key only appears in ‘right’ DataFrame, and “both” if 
the observation’s merge key is found in both.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions