Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Is this Common Issue? | 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

bookChallenge: Is this Common Issue?

In the previous chapter, we found out that issues with negative durations happened because of misusage of 12-h and 24-h formats. We printed the first 10 rows and saw that in all of these rides dropoff_calculated has the same minute and second (accurate to 1 second), but hours differ by 12.

Let's continue our investigation!

Task

  1. Filter the observations in df dataframe to only with negative duration. Save it in df_neg variable.
  2. Iterate over rows of df_ned. If minute in dropoff_datetime and dropoff_calculated is not the same, you need to print this row.
  3. Within the same for loop count number of rows having an hour in dropoff_datetime greater or equal than 12.

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 6
toggle bottom row

bookChallenge: Is this Common Issue?

In the previous chapter, we found out that issues with negative durations happened because of misusage of 12-h and 24-h formats. We printed the first 10 rows and saw that in all of these rides dropoff_calculated has the same minute and second (accurate to 1 second), but hours differ by 12.

Let's continue our investigation!

Task

  1. Filter the observations in df dataframe to only with negative duration. Save it in df_neg variable.
  2. Iterate over rows of df_ned. If minute in dropoff_datetime and dropoff_calculated is not the same, you need to print this row.
  3. Within the same for loop count number of rows having an hour in dropoff_datetime greater or equal than 12.

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 6
toggle bottom row

bookChallenge: Is this Common Issue?

In the previous chapter, we found out that issues with negative durations happened because of misusage of 12-h and 24-h formats. We printed the first 10 rows and saw that in all of these rides dropoff_calculated has the same minute and second (accurate to 1 second), but hours differ by 12.

Let's continue our investigation!

Task

  1. Filter the observations in df dataframe to only with negative duration. Save it in df_neg variable.
  2. Iterate over rows of df_ned. If minute in dropoff_datetime and dropoff_calculated is not the same, you need to print this row.
  3. Within the same for loop count number of rows having an hour in dropoff_datetime greater or equal than 12.

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!

In the previous chapter, we found out that issues with negative durations happened because of misusage of 12-h and 24-h formats. We printed the first 10 rows and saw that in all of these rides dropoff_calculated has the same minute and second (accurate to 1 second), but hours differ by 12.

Let's continue our investigation!

Task

  1. Filter the observations in df dataframe to only with negative duration. Save it in df_neg variable.
  2. Iterate over rows of df_ned. If minute in dropoff_datetime and dropoff_calculated is not the same, you need to print this row.
  3. Within the same for loop count number of rows having an hour in dropoff_datetime greater or equal than 12.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Section 4. Chapter 6
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
some-alt