Get startedGet started for free

Compute numerical summaries

You have learnt how to display and annotate time series data in multiple ways, but it is also informative to collect summary statistics of your data. Being able to achieve this task will allow you to share and discuss statistical properties of your data that can further support the plots you generate. In pandas, it is possible to quickly obtain summaries of columns in your DataFrame by using the command:

print(df.describe())

This will print statistics including the mean, the standard deviation, the minima and maxima and the number of observations for all numeric columns in your pandas DataFrame.

This exercise is part of the course

Visualizing Time Series Data in Python

View Course

Exercise instructions

  • Print the statistical summaries of the co2_levels DataFrame.
  • Print the reported minimum value in the co2_levels DataFrame.
  • Print the reported maximum value in the co2_levels DataFrame.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Print out summary statistics of the co2_levels DataFrame
print(____.____)

# Print out the minima of the co2 column in the co2_levels DataFrame
print(____)

# Print out the maxima of the co2 column in the co2_levels DataFrame
print(____)
Edit and Run Code