From e06bd2334e2b17570c727d06b6a588a971946a66 Mon Sep 17 00:00:00 2001 From: Misha Veldhoen Date: Sat, 9 Mar 2019 17:22:52 +0100 Subject: [PATCH] DOC: Cleanup docstring pandas.core.filter --- pandas/core/generic.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 0b81576404e2f..0128f01bddd10 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -4534,11 +4534,11 @@ def filter(self, items=None, like=None, regex=None, axis=None): Parameters ---------- items : list-like - List of axis to restrict to (must not all be present). + Keep labels from axis which are in items. like : string - Keep axis where "arg in col == True". + Keep labels from axis for which "like in label == True". regex : string (regular expression) - Keep axis with re.search(regex, col) == True. + Keep labels from axis for which re.search(regex, label) == True. axis : int or string axis name The axis to filter on. By default this is the info axis, 'index' for Series, 'columns' for DataFrame. @@ -4561,7 +4561,7 @@ def filter(self, items=None, like=None, regex=None, axis=None): Examples -------- - >>> df = pd.DataFrame(np.array(([1,2,3], [4,5,6])), + >>> df = pd.DataFrame(np.array(([1, 2, 3], [4, 5, 6])), ... index=['mouse', 'rabbit'], ... columns=['one', 'two', 'three'])