From d5eb326cdf1b385571e2950499395393f8eac265 Mon Sep 17 00:00:00 2001 From: Nick Newman Date: Sat, 30 May 2020 13:53:56 -0400 Subject: [PATCH 1/4] GH34480 DOC: update for param --- pandas/core/frame.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 2666597cbf765..c18025e552fe5 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -233,14 +233,13 @@ copy : bool, default True If False, avoid copy if possible. indicator : bool or str, default False - If True, adds a column to output DataFrame called "_merge" with - information on the source of each row. - 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 takes on a 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. + 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. validate : str, optional If specified, checks if merge is of specified type. From 823e78db68edd71fa5159afd6bafc2b6f14034bc Mon Sep 17 00:00:00 2001 From: Nick Newman Date: Sat, 30 May 2020 19:36:32 -0400 Subject: [PATCH 2/4] clarified the dataframes --- pandas/core/frame.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index c18025e552fe5..4c3ff60eb1b69 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -237,9 +237,9 @@ 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. + appears in 'left' -> the left DataFrame, "right_only" for observations + whose merge key only appears in 'right' -> the right DataFrame, and "both" + if the observation's merge key is found in both DataFrames. validate : str, optional If specified, checks if merge is of specified type. From 46368ae70a79f689c9f943041264308c20ae198d Mon Sep 17 00:00:00 2001 From: Nick Newman Date: Sat, 30 May 2020 19:37:18 -0400 Subject: [PATCH 3/4] cleaning up whitespace --- pandas/core/frame.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 4c3ff60eb1b69..1fb4daa55b950 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -237,8 +237,8 @@ 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' -> the left DataFrame, "right_only" for observations - whose merge key only appears in 'right' -> the right DataFrame, and "both" + appears in 'left' -> the left DataFrame, "right_only" for observations + whose merge key only appears in 'right' -> the right DataFrame, and "both" if the observation's merge key is found in both DataFrames. validate : str, optional From b511832ff98d281c7bc927a50ef9795e09720157 Mon Sep 17 00:00:00 2001 From: Nick Newman Date: Sat, 30 May 2020 20:11:42 -0400 Subject: [PATCH 4/4] adjusting the wording --- pandas/core/frame.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 1fb4daa55b950..5c906bf4daa2e 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -237,8 +237,8 @@ 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' -> the left DataFrame, "right_only" for observations - whose merge key only appears in 'right' -> the right DataFrame, and "both" + appears in the left DataFrame, "right_only" for observations + whose merge key only appears in the right DataFrame, and "both" if the observation's merge key is found in both DataFrames. validate : str, optional