Check the Column Type
If you can come across the column 'Fare'
, the numbers here are separated with the -
sign. It looks weird, doesn't it? We used to use .
as the separator, and Python can understand numbers separated only with dots. Let's check the type of this column. You can do so using the attribute .dtypes
. Look at the example with the column 'Age'
.
Explanation:
The .dtypes
syntax is simple; you just apply it to the column or to the whole data set. In our case, the type is float64.
¿Todo estuvo claro?
Contenido del Curso
Advanced Techniques in pandas
1. Get Familiar With Indexing and Selecting Data
Advanced Techniques in pandas
Check the Column Type
If you can come across the column 'Fare'
, the numbers here are separated with the -
sign. It looks weird, doesn't it? We used to use .
as the separator, and Python can understand numbers separated only with dots. Let's check the type of this column. You can do so using the attribute .dtypes
. Look at the example with the column 'Age'
.
Explanation:
The .dtypes
syntax is simple; you just apply it to the column or to the whole data set. In our case, the type is float64.
¿Todo estuvo claro?