DataFrame.filter(items=None, like=None, regex=None)

Restrict frame’s columns to set of items or wildcard

Parameters :

items : list-like

List of columns to restrict to (must not all be present)

like : string

Keep columns where “arg in col == True”

regex : string (regular expression)

Keep columns with, col) == True

Returns :

DataFrame with filtered columns :


Arguments are mutually exclusive, but this is not checked for