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

Contenido del Curso

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!

Tarea

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.

Solución

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 4. Capítulo 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!

Tarea

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.

Solución

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 4. Capítulo 6
Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
Lamentamos que algo salió mal. ¿Qué pasó?
some-alt