Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Check the Column Type | Preprocessing Data
course content

Зміст курсу

Advanced Techniques in pandas

Check the Column TypeCheck 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.

question-icon
Output the type of the column 'Fare'.

print(data[''].)
object

Все було зрозуміло?

Секція 5. Розділ 7
course content

Зміст курсу

Advanced Techniques in pandas

Check the Column TypeCheck 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.

question-icon
Output the type of the column 'Fare'.

print(data[''].)
object

Все було зрозуміло?

Секція 5. Розділ 7
some-alt