On this page
pandas.Series.filter
Series.filter(items=None, like=None, regex=None, axis=None)
-
Restrict the info axis to set of items or wildcard
Parameters: items : list-like
List of info axis to restrict to (must not all be present)
like : string
Keep info axis where “arg in col == True”
regex : string (regular expression)
Keep info axis with re.search(regex, col) == True
axis : int or None
The axis to filter on. By default this is the info axis. The “info axis” is the axis that is used when indexing with
[]
. For example,df = DataFrame({'a': [1, 2, 3, 4]]}); df['a']
. So, theDataFrame
columns are the info axis.Notes
Arguments are mutually exclusive, but this is not checked for
© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/0.18.1/generated/pandas.Series.filter.html