Python | Pandas dataframe.get_dtype_counts() Last Updated : 19 Nov, 2018 Comments Improve Suggest changes Like Article Like Report Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas dataframe.get_dtype_counts() function returns the counts of dtypes in the given object. It returns a pandas series object containing the counts of all data types present in the pandas object. It works with pandas series as well as dataframe. Syntax: DataFrame.get_dtype_counts() Returns : value : Series : Counts of datatypes For link to CSV file Used in Code, click here Example #1: Use get_dtype_counts() function to find the counts of datatype of a pandas dataframe object. Python3 # importing pandas as pd import pandas as pd # Creating the dataframe df = pd.read_csv("nba.csv") # Print the dataframe df Now apply the get_dtype_counts() function. Find out the frequency of occurrence of each data type in the dataframe. Python3 1== # applying get_dtype_counts() function df.get_dtype_counts() Output : Notice, the output is a pandas series object containing the count of each data types in the dataframe. Example #2: Use get_dtype_counts() function over a selected no. of columns of the data frame only. Python3 # importing pandas as pd import pandas as pd # Creating the dataframe df = pd.read_csv("nba.csv") # Applying get_dtype_counts() function to # find the data type counts in modified dataframe. df[["Salary", "Name", "Team"]].get_dtype_counts() Notice, the output is a pandas series object containing the count of each data types in the dataframe. We can verify all these results using this the dataframe.info() function. Python3 1== # Find out the types of all columns in the dataframe df.info() Output : Comment More infoAdvertise with us Next Article Python | Pandas dataframe.get_dtype_counts() S Shubham__Ranjan Follow Improve Article Tags : Technical Scripter Python Python pandas-dataFrame Pandas-DataFrame-Methods Practice Tags : python Similar Reads Python | Pandas dataframe.count() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas dataframe.count() is used to count the no. of non-NA/null observations across t 2 min read Python | Pandas DataFrame.ftypes Pandas DataFrame is a two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Arithmetic operations align on both row and column labels. It can be thought of as a dict-like container for Series objects. This is the primary data structure o 2 min read Python | Pandas Series.get_dtype_counts() Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index. Pandas Series.get_dtype_counts() function r 2 min read Get the datatypes of columns of a Pandas DataFrame Let us see how to get the datatypes of columns in a Pandas DataFrame. TO get the datatypes, we will be using the dtype() and the type() function.Example 1 :Â Â python # importing the module import pandas as pd # creating a DataFrame dictionary = {'Names':['Simon', 'Josh', 'Amen', 'Habby', 'Jonathan', 2 min read Python | Pandas dataframe.select_dtypes() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas dataframe.select_dtypes() function return a subset of the DataFrameâs columns b 2 min read Like