diff --git a/pandas/core/frame.py b/pandas/core/frame.py index ca572e2e56b6c..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 = 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):