modin.pandas.DataFrame.select_dtypes¶
- DataFrame.select_dtypes(include=None, exclude=None) DataFrame[source]¶
Return a subset of the
DataFrame’s columns based on the column dtypes. At least one of the parameters must be specified, and the include/exclude lists must not overlap.- Parameters:
include (Optional[ListLike | type], default None) – A list of dtypes to include in the result.
exclude (Optional[ListLike | type], default None) – A list of dtypes to exclude from the result.
- Returns:
The subset of the frame including the dtypes in include and excluding the dtypes in exclude. If a column’s dtype is a subtype of a type in both include and exclude (such as if include=[np.number] and exclude=[int]), then the column will be excluded.
- Return type:
Examples
Including all number columns:
Including only bool columns:
Excluding int columns: