How to Check the Data Type in Pandas DataFrame? Last Updated : 15 Jul, 2025 Comments Improve Suggest changes Like Article Like Report Pandas DataFrame is a Two-dimensional data structure of mutable size and heterogeneous tabular data. There are different Built-in data types available in Python. Two methods used to check the datatypes are pandas.DataFrame.dtypes and pandas.DataFrame.select_dtypes. Creating a Dataframe to Check DataType in Pandas DataFrame Consider a dataset of a shopping store having data about Customer Serial Number, Customer Name, Product ID of the purchased item, Product Cost, and Date of Purchase. Python3 #importing pandas as pd import pandas as pd # Create the dataframe df = pd.DataFrame({ 'Cust_No': [1,2,3], 'Cust_Name': ['Alex', 'Bob', 'Sophie'], 'Product_id': [12458,48484,11311], 'Product_cost': [65.25, 25.95, 100.99], 'Purchase_Date': [pd.Timestamp('20180917'), pd.Timestamp('20190910'), pd.Timestamp('20200610')] }) # Print the dataframe df Output: Check the Data Type in Pandas using pandas.DataFrame.dtypes For users to check the DataType of a particular Dataset or particular column from the dataset can use this method. This method returns a list of data types for each column or also returns just a data type of a particular column Example 1: Python3 # Print a list datatypes of all columns df.dtypes Output: Example 2: Python3 # print datatype of particular column df.Cust_No.dtypes Output: dtype('int64') Example 3: Python3 # Checking the Data Type of a Particular Column df['Product_cost'].dtypes Output: dtype('float64')Check the Data Type in Pandas using pandas.DataFrame.select_dtypes Unlike checking Data Type user can alternatively perform a check to get the data for a particular Datatype if it is existing otherwise get an empty dataset in return. This method returns a subset of the DataFrame’s columns based on the column dtypes. Example 1: Python3 # Returns Two column of int64 df.select_dtypes(include = 'int64') Output: Example 2: Python3 # Returns columns excluding int64 df.select_dtypes(exclude = 'int64') Output : Example 3 : Python3 # Print an empty list as there is # no column of bool type df.select_dtypes(include = "bool") Output : Comment A abhishekkharmale Follow 0 Improve A abhishekkharmale Follow 0 Improve Article Tags : Python Python-pandas Python pandas-dataFrame Explore Python FundamentalsPython Introduction 2 min read Input and Output in Python 4 min read Python Variables 5 min read Python Operators 4 min read Python Keywords 2 min read Python Data Types 8 min read Conditional Statements in Python 3 min read Loops in Python - For, While and Nested Loops 5 min read Python Functions 5 min read Recursion in Python 4 min read Python Lambda Functions 5 min read Python Data StructuresPython String 5 min read Python Lists 4 min read Python Tuples 4 min read Python Dictionary 3 min read Python Sets 6 min read Python Arrays 7 min read List Comprehension in Python 4 min read Advanced PythonPython OOP Concepts 11 min read Python Exception Handling 5 min read File Handling in Python 4 min read Python Database Tutorial 4 min read Python MongoDB Tutorial 2 min read Python MySQL 9 min read Python Packages 10 min read Python Modules 7 min read Python DSA Libraries 15 min read List of Python GUI Library and Packages 3 min read Data Science with PythonNumPy Tutorial - Python Library 3 min read Pandas Tutorial 4 min read Matplotlib Tutorial 5 min read Python Seaborn Tutorial 15+ min read StatsModel Library- Tutorial 4 min read Learning Model Building in Scikit-learn 8 min read TensorFlow Tutorial 2 min read PyTorch Tutorial 6 min read Web Development with PythonFlask Tutorial 8 min read Django Tutorial | Learn Django Framework 7 min read Django ORM - Inserting, Updating & Deleting Data 4 min read Templating With Jinja2 in Flask 6 min read Django Templates 7 min read Python | Build a REST API using Flask 3 min read How to Create a basic API using Django Rest Framework ? 4 min read Python PracticePython Quiz 1 min read Python Coding Practice 1 min read Python Interview Questions and Answers 15+ min read Like