Session Ready
Exercise

Engineering numerical features - datetime

There are several columns in the volunteer dataset comprised of datetimes. Let's take a look at the start_date_date column and extract just the month to use as a feature for modeling.

Instructions
100 XP
  • Use Pandas to_datetime() function on the volunteer["start_date_date"] column and store it in a new column called start_date_converted.
  • To retrieve just the month, apply a lambda function to volunteer["start_date_converted"] that grabs the .month attribute from the row. Store this in a new column called start_date_month.
  • Print the head() of just the start_date_converted and start_date_month columns.