Summarizing dates
Summary statistics can also be calculated on date columns that have values with the data type datetime64
. Some summary statistics — like mean — don't make a ton of sense on dates, but others are super helpful, for example, minimum and maximum, which allow you to see what time range your data covers.
sales
is available and pandas
is loaded as pd
.
This exercise is part of the course
Data Manipulation with pandas
Exercise instructions
- Print the maximum of the
date
column. - Print the minimum of the
date
column.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Print the maximum of the date column
____
# Print the minimum of the date column
____