bigframes.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.
Examples:
>>> df = bpd.DataFrame({'col1': [1, 2], 'col2': ["hello", "world"], 'col3': [True, False]}) >>> df.select_dtypes(include=['Int64']) col1 0 1 1 2 [2 rows x 1 columns]
>>> df.select_dtypes(exclude=['Int64']) col2 col3 0 hello True 1 world False [2 rows x 2 columns]
- Parameters:
include (scalar or list-like) – A selection of dtypes or strings to be included.
exclude (scalar or list-like) – A selection of dtypes or strings to be excluded.
- Returns:
The subset of the frame including the dtypes in
includeand excluding the dtypes inexclude.- Return type: