Instruction
It's time to wrap things up. Here's what we learned:
-
Some basic statistical functions you can use in pandas are:
describe()– shows multiple basic statistics,count()– counts the number of non-empty values,sum()– calculates the total sum,min()/max()– finds the minimum/maximum value, respectively,std()– calculates the standard deviation,mean()– calculates the mean value,quantile(...)– calculates specified quantiles:quantile([0.25,0.5,0.75])
will calculate 1st, 2nd and 3rd quartiles
- To group rows by a single column, use
dataFrame.groupby('column') - To group rows by multiple columns, use
dataFrame.groupby(['column1','column2'...])
- The
size()function shows the number of rows in each group. - You can access columns in grouped rows using square brackets:
grouped['column']. - You can use statistical functions and sorting with grouped rows. For example:
grouped['aces'].mean().sort_values(ascending=False)
Alright, how about a short quiz now?
Exercise
Click to continue.



