We can use the info() function to display the data types in our dataset.
| print(health_data.info()) |
Result:

This dataset contains two data types:
Objects can’t be used for calculations, so they must be converted to float64 using the astype() function. In the example, the “Average_Pulse” and “Max_Pulse” columns are converted to float64, while the other columns are already in this format.
| health_data[“Average_Pulse”] = health_data[‘Average_Pulse’].astype(float) health_data[“Max_Pulse”] = health_data[“Max_Pulse”].astype(float) print (health_data.info()) |
Result:

Now, the dataset consists entirely of float64 data types.