Python | Pandas DataFrame.ftypes Last Updated : 20 Feb, 2019 Comments Improve Suggest changes Like Article Like Report 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 of the Pandas. Pandas DataFrame.ftypes attribute return the ftypes (indication of sparse/dense and dtype) in DataFrame. It returns a Series with the data type of each column. Syntax: DataFrame.ftypes Parameter : None Returns : series Example #1: Use DataFrame.ftypes attribute to check if the columns are sparse or dense in the given Dataframe. Python3 # importing pandas as pd import pandas as pd # Creating the DataFrame df = pd.DataFrame({'Weight':[45, 88, 56, 15, 71], 'Name':['Sam', 'Andrea', 'Alex', 'Robin', 'Kia'], 'Age':[14, 25, 55, 8, 21]}) # Create the index index_ = ['Row_1', 'Row_2', 'Row_3', 'Row_4', 'Row_5'] # Set the index df.index = index_ # Print the DataFrame print(df) Output : Now we will use DataFrame.ftypes attribute to check the ftype of the columns in the given dataframe. Python3 1== # check if the column are # dense or sparse result = df.ftypes # Print the result print(result) Output : As we can see in the output, the DataFrame.ftypes attribute has successfully returned a series containing the ftypes of each column in the given dataframe. Example #2: Use DataFrame.ftypes attribute to check if the columns are sparse or dense in the given Dataframe. Python3 # importing pandas as pd import pandas as pd # Create an array arr = [100, 35, 125, 85, 35] # Creating a sparse DataFrame df = pd.SparseDataFrame(arr) # Print the DataFrame print(df) Output : Now we will use DataFrame.ftypes attribute to check the ftype of the columns in the given dataframe. Python3 1== # check if the column are # dense or sparse result = df.ftypes # Print the result print(result) Output : As we can see in the output, the DataFrame.ftypes attribute has successfully returned the ftype of the given dataframe. Comment More infoAdvertise with us Next Article Python | Pandas DataFrame.ftypes S Shubham__Ranjan Follow Improve Article Tags : Python Python-pandas Python pandas-dataFrame Pandas-DataFrame-Methods Practice Tags : python Similar Reads 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 Python | Pandas dataframe.info() When working with data in Python understanding the structure and content of our dataset is important. The dataframe.info() method in Pandas helps us in providing a concise summary of our DataFrame and it quickly assesses its structure, identify issues like missing values and optimize memory usage.Ke 2 min read Python | Pandas dataframe.infer_objects() 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.infer_objects() function attempts to infer better data type for input 3 min read Python | Pandas dataframe.get_dtype_counts() 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 2 min read Python | Pandas DataFrame.astype() 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. DataFrame.astype() method is used to cast a pandas object to a specified dtype.astype( 4 min read Python | Pandas DataFrame.values 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 Pandas DataFrame.to_string-Python Pandas is a powerful Python library for data manipulation, with DataFrame as its key two-dimensional, labeled data structure. It allows easy formatting and readable display of data. DataFrame.to_string() function in Pandas is specifically designed to render a DataFrame into a console-friendly tabula 5 min read Python | Pandas.CategoricalDtype() pandas.api.types.CategoricalDtype(categories = None, ordered = None) : This class is useful for specifying the type of Categorical data independent of the values, with categories and orderness.  Parameters- categories : [index like] Unique categorization of the categories. ordered : [boolean] If fa 1 min read Dataframe Attributes in Python Pandas In this article, we will discuss the different attributes of a dataframe. Attributes are the properties of a DataFrame that can be used to fetch data or any information related to a particular dataframe. The syntax of writing an attribute is: DataFrame_name.attribute These are the attributes of the 11 min read Python | Pandas DataFrame.to_records 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 Like