1. Learn
  2. /
  3. Courses
  4. /
  5. Preprocessing for Machine Learning in Python

Exercise

Checking column types

Take a look at the UFO dataset's column types using the .info() method. Two columns jump out for transformation: the seconds column, which is a numeric column but is being read in as object, and the date column, which can be transformed into the datetime type. That will make our feature engineering efforts easier later on.

Instructions

100 XP
  • Call the .info() method on the ufo dataset.
  • Convert the type of the seconds column to the float data type.
  • Convert the type of the date column to the datetime data type.
  • Call .info() on ufo again to see if the changes worked.