Pandas Assignment :
Use the dtypes attribute to display each column along with its data type, also display the counts of each data type.
Ans. 1. Dataframe.dtypes
It will display each column along with its data type.
2. DataFrame.
count
(axis=0,
level=None, numeric_only=False)
It will display the counts of each datatype.
Parameters
If 0 or ‘index’ counts are generated for each column. If 1 or ‘columns’ counts are generated for each row.
If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a DataFrame. A str specifies the level name.
Include only float, int or boolean data.
Get Answers For Free
Most questions answered within 1 hours.