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.
Diese Übung ist Teil des Kurses
Visualizing Time Series Data in Python
Anleitung zur Übung
- 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.
Interaktive Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
# 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(____)