Contenido del Curso
Dealing with Dates and Times in Python
Dealing with Dates and Times in Python
3. Timezones and Daylight Savings Time (DST)
4. Working with Dates and Times in pandas
Challenge: What Will We Work With?Challenge: Converting Columns into datetime TypeChallenge: Extreme Trips DurationsChallenge: InvestigationChallenge: Negative Trip DurationChallenge: Is this Common Issue?Challenge: Fixing the IssuesChallenge: Average Metrics Across Taxi TypesChallenge: Corrected Metrics Across Taxi TypesChallenge: Group by Period?
One More Formatting
Let's practice more with date formats! The table with the most common codes is below.
Format code | Meaning | Example |
---|---|---|
%d | Day of the month as a zero-padded decimal number | 01, 02, ..., 30, 31 |
%m | Month as a zero-padded decimal number | 01, 02, ..., 11, 12 |
%y | Year without century as a zero-padded decimal number | 00, 01, 02, ..., 98, 99 |
%Y | Year with century as a decimal number | 0001, 0002, 1999, 2000, 2001, ... |
%b | Month as locale’s abbreviated name | Jan, Feb, ..., Nov, Dec |
%B | Month as locale’s full name | January, February, ..., November, December |
%a | Weekday as locale’s abbreviated name | Sun, Mon, ..., Fri, Sat |
%A | Weekday as locale’s full name | Sunday, Monday, ..., Friday, Saturday |
Tarea
Swipe to start coding
Format the same date
object as before into the format: "Wednesday, 11 of March, 1998".
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 1. Capítulo 6
One More Formatting
Let's practice more with date formats! The table with the most common codes is below.
Format code | Meaning | Example |
---|---|---|
%d | Day of the month as a zero-padded decimal number | 01, 02, ..., 30, 31 |
%m | Month as a zero-padded decimal number | 01, 02, ..., 11, 12 |
%y | Year without century as a zero-padded decimal number | 00, 01, 02, ..., 98, 99 |
%Y | Year with century as a decimal number | 0001, 0002, 1999, 2000, 2001, ... |
%b | Month as locale’s abbreviated name | Jan, Feb, ..., Nov, Dec |
%B | Month as locale’s full name | January, February, ..., November, December |
%a | Weekday as locale’s abbreviated name | Sun, Mon, ..., Fri, Sat |
%A | Weekday as locale’s full name | Sunday, Monday, ..., Friday, Saturday |
Tarea
Swipe to start coding
Format the same date
object as before into the format: "Wednesday, 11 of March, 1998".
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 1. Capítulo 6