Wednesday, June 17, 2020

How to describe the categorical variables of Object type

In general, the Int and Float type values can be described as it hold numerical values using python pandas library . But how can we describe the categorical variables which are Object type. So, we have to filter out all the object type columns and apply describe function. The below code explains the same.

Example:

1. The int and float data type values can be described as follows:



2. The Object type values can be handled as follows:






















No comments:

Post a Comment

Element wise operation on LIST vs ARRAY

The use of arrays over lists: You can write  vectorised  code on numpy arrays, not on lists, which is  convenient to read and write, and con...