Kickstart 2020 with new opportunities! - hours only!Up to 80% off on all courses and bundles.-Close
Introduction to data frames
Data frame structure
Accessing columns in a data frame
Accessing rows and columns combined in a data frame
Data frame analysis
24. Summary for a column
Summary

Instruction

Great! Since columns are vectors, you can also calculate summary statistics on each numeric column of a data frame to retrieve minimum, maximum, median, mean, and quantile values at once. Here's an example:

summary(cities$population)

Exercise

Let's analyze the populations of countries. Display the minimum, maximum, quartile, median, and mean values for the population column of the countries data frame. Use the summary() function to get all these statistics in one go.

Stuck? Here's a hint!

Just use the summary() function on the population column from the countries data frame.