Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Corrected Metrics Across Taxi Types | Working with Dates and Times in pandas
Dealing with Dates and Times in Python
course content

Course Content

Dealing with Dates and Times in Python

Dealing with Dates and Times in Python

1. Working with Dates
2. Working with Times
3. Timezones and Daylight Savings Time (DST)
4. Working with Dates and Times in pandas

book
Challenge: Corrected Metrics Across Taxi Types

Average trip duration across different taxi types looks a bit strange. Every taxi type has an average trip duration greater than 1 hour (most of them even greater than 2 hours), while the average distance is less than 10 km. That's extremely slow!

Let's make some corrections and assume that not all noisy data were removed.

Task

Swipe to start coding

  1. Within the print function calculate the proportion of long trips (with a duration at least of 3 hours). Remember, that duration column is measured in seconds.
  2. Calculate average trip distance (dist_meters) and trip duration (duration) across each taxi type (vendor_id column) for trips with a duration less than 3 hours.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 4. ChapterΒ 9
toggle bottom row

book
Challenge: Corrected Metrics Across Taxi Types

Average trip duration across different taxi types looks a bit strange. Every taxi type has an average trip duration greater than 1 hour (most of them even greater than 2 hours), while the average distance is less than 10 km. That's extremely slow!

Let's make some corrections and assume that not all noisy data were removed.

Task

Swipe to start coding

  1. Within the print function calculate the proportion of long trips (with a duration at least of 3 hours). Remember, that duration column is measured in seconds.
  2. Calculate average trip distance (dist_meters) and trip duration (duration) across each taxi type (vendor_id column) for trips with a duration less than 3 hours.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 4. ChapterΒ 9
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt