From 18a7ee9b5b68e604da3befa7be089261354b4de7 Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Sat, 9 Jun 2018 13:42:41 -0700 Subject: [PATCH 1/5] isin() docstring change DataFrame to pd.DataFrame --- pandas/core/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index ca572e2e56b6c..a4b1a46572732 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -7283,7 +7283,7 @@ def isin(self, values): When ``values`` is a Series or DataFrame: >>> df = pd.DataFrame({'A': [1, 2, 3], 'B': ['a', 'b', 'f']}) - >>> other = DataFrame({'A': [1, 3, 3, 2], 'B': ['e', 'f', 'f', 'e']}) + >>> other = pd.DataFrame({'A': [1, 3, 3, 2], 'B': ['e', 'f', 'f', 'e']}) >>> df.isin(other) A B 0 True False From fbeb41bcf1d230f29586cbdae875850e9f809ec8 Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Sat, 9 Jun 2018 13:56:18 -0700 Subject: [PATCH 2/5] fix PEP-8 warning line too long --- 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 a4b1a46572732..834afb3c6cc94 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -7283,8 +7283,8 @@ def isin(self, values): When ``values`` is a Series or DataFrame: >>> df = pd.DataFrame({'A': [1, 2, 3], 'B': ['a', 'b', 'f']}) - >>> other = pd.DataFrame({'A': [1, 3, 3, 2], 'B': ['e', 'f', 'f', 'e']}) - >>> df.isin(other) + >>> foo = pd.DataFrame({'A': [1, 3, 3, 2], 'B': ['e', 'f', 'f', 'e']}) + >>> df.isin(foo) A B 0 True False 1 False False # Column A in `other` has a 3, but not at index 1. From ffe151d492e62076c395a2db2d3d9ba39ac429a0 Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Sat, 9 Jun 2018 14:05:31 -0700 Subject: [PATCH 3/5] change remaining name 'other' to 'foo' --- pandas/core/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 834afb3c6cc94..02992878c0fa3 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -7287,7 +7287,7 @@ def isin(self, values): >>> df.isin(foo) A B 0 True False - 1 False False # Column A in `other` has a 3, but not at index 1. + 1 False False # Column A in `foo` has a 3, but not at index 1. 2 True True """ if isinstance(values, dict): From 2d17740d824e26232d2d397bcebc79d50bd4ab16 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Wed, 13 Jun 2018 14:08:54 +0200 Subject: [PATCH 4/5] revert other -> foo --- 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 02992878c0fa3..a4b1a46572732 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -7283,11 +7283,11 @@ def isin(self, values): When ``values`` is a Series or DataFrame: >>> df = pd.DataFrame({'A': [1, 2, 3], 'B': ['a', 'b', 'f']}) - >>> foo = pd.DataFrame({'A': [1, 3, 3, 2], 'B': ['e', 'f', 'f', 'e']}) - >>> df.isin(foo) + >>> other = pd.DataFrame({'A': [1, 3, 3, 2], 'B': ['e', 'f', 'f', 'e']}) + >>> df.isin(other) A B 0 True False - 1 False False # Column A in `foo` has a 3, but not at index 1. + 1 False False # Column A in `other` has a 3, but not at index 1. 2 True True """ if isinstance(values, dict): From ee2c8180941e79836e76afb16178c442835a445a Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Wed, 13 Jun 2018 14:10:16 +0200 Subject: [PATCH 5/5] other -> df2 --- 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 a4b1a46572732..21e3cfcdd195e 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -7283,11 +7283,11 @@ def isin(self, values): When ``values`` is a Series or DataFrame: >>> df = pd.DataFrame({'A': [1, 2, 3], 'B': ['a', 'b', 'f']}) - >>> other = pd.DataFrame({'A': [1, 3, 3, 2], 'B': ['e', 'f', 'f', 'e']}) - >>> df.isin(other) + >>> df2 = pd.DataFrame({'A': [1, 3, 3, 2], 'B': ['e', 'f', 'f', 'e']}) + >>> df.isin(df2) A B 0 True False - 1 False False # Column A in `other` has a 3, but not at index 1. + 1 False False # Column A in `df2` has a 3, but not at index 1. 2 True True """ if isinstance(values, dict):