Instruction
Good! Once we have created our DataFrame, we can use the describe() function:
players.describe()
For each numerical column, describe() will show some basic statistics:
| year_born | height | titles | aces | |
|---|---|---|---|---|
| count | 10 | 10 | 10 | 10 |
| mean | 1989.2 | 191.4 | 24.5 | 3841.5 |
| std | 4.442222 | 7.589466 | 33.317496 | 2829.734744 |
| min | 1981 | 180 | 4 | 1370 |
| 25.00% | 1986.5 | 185 | 4.5 | 1689.25 |
| 50.00% | 1989 | 191 | 8.5 | 3062 |
| 75.00% | 1991.75 | 198 | 20 | 5277.5 |
| max | 1997 | 203 | 97 | 10414 |
The describe() function returns basic statistics for each column in our dataset, including:
count– number of non-empty values,mean– arithmetic mean,std– standard deviation,min– minimum value,- 25% – 1st quartile,
- 50% – 2nd quartile (median),
- 75% – 3rd quartile,
max– maximum value.
Don't worry if you don't know what these metrics are. We'll explain them over the next few exercises.
Exercise
Run the describe() function for the movies DataFrame.
As you can see, there are just two numerical columns in the DataFrame: rating and box_office.
Stuck? Here's a hint!
Simply add:
movies.describe()



