Exercise

Column manipulation

The Federal Aviation Administration (FAA) considers a flight to be "delayed" when it arrives 15 minutes or more after its scheduled time.

The next step of preparing the flight data has two parts:

  1. convert the units of distance, replacing the mile column with a kmcolumn; and
  2. create a Boolean column indicating whether or not a flight was delayed.

Instructions

100 XP
  • Import a function which will allow you to round a number to a specific number of decimal places.
  • Derive a new km column from the mile column, rounding to zero decimal places. One mile is 1.60934 km.
  • Remove the mile column.
  • Create a label column with a value of 1 indicating the delay was 15 minutes or more and 0 otherwise. Think carefully about the logical condition.