eland.DataFrame.filter#
- DataFrame.filter(items: Optional[Sequence[str]] = None, like: Optional[str] = None, regex: Optional[str] = None, axis: Optional[Union[int, str]] = None) eland.dataframe.DataFrame #
Subset the dataframe rows or columns according to the specified index labels. Note that this routine does not filter a dataframe on its contents. The filter is applied to the labels of the index.
- Parameters
- itemslist-like
Keep labels from axis which are in items.
- likestr
Keep labels from axis for which “like in label == True”.
- regexstr (regular expression)
Keep labels from axis for which re.search(regex, label) == True.
- axis{0 or ‘index’, 1 or ‘columns’, None}, default None
The axis to filter on, expressed either as an index (int) or axis name (str). By default this is the info axis, ‘index’ for Series, ‘columns’ for DataFrame.
- Returns
- eland.DataFrame
See also
Notes
The
items
,like
, andregex
parameters are enforced to be mutually exclusive.