Pandas DataFrame: select_dtypes() function
DataFrame - select_dtypes() function
The select_dtypes function is used to get a subset of the DataFrame’s columns based on the column dtypes.
DataFrame.select_dtypes(self, include=None, exclude=None)
|Name||Description||Type/Default Value||Required / Optional|
|include, exclude||A selection of dtypes or strings to be included/excluded. At least one of these parameters must be supplied.||scalar or list-like||Required|
The subset of the frame including the dtypes in include and excluding the dtypes in exclude.
- If both of include and exclude are empty
- If include and exclude have overlapping elements
- If any kind of string dtype is passed in.
Download the above Notebook from here.
- New Content published on w3resource:
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework