Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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'])

Expand Down