Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Is this Common Issue? | Working with Dates and Times in pandas
Dealing with Dates and Times in Python
course content

Contenu du cours

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: 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!

Tâche

Swipe to start coding

  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.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 4. Chapitre 6
toggle bottom row

book
Challenge: 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!

Tâche

Swipe to start coding

  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.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 4. Chapitre 6
Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Nous sommes désolés de vous informer que quelque chose s'est mal passé. Qu'est-il arrivé ?
some-alt