pandas.DataFrame.filter

DataFrame.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

Notes

Arguments are mutually exclusive, but this is not checked for