Path: blob/master/03_Grouping/Alcohol_Consumption/Exercise.ipynb
613 views
Kernel: Python 2
Ex - GroupBy
Introduction:
GroupBy can be summarized as Split-Apply-Combine.
Special thanks to: https://github.com/justmarkham for sharing the dataset and materials.
Check out this Diagram
Step 1. Import the necessary libraries
In [ ]:
Step 2. Import the dataset from this address.
Step 3. Assign it to a variable called drinks.
In [ ]:
Step 4. Which continent drinks more beer on average?
In [ ]:
Step 5. For each continent print the statistics for wine consumption.
In [ ]:
Step 6. Print the mean alcohol consumption per continent for every column
In [ ]:
Step 7. Print the median alcohol consumption per continent for every column
In [ ]:
Step 8. Print the mean, min and max values for spirit consumption.
This time output a DataFrame
In [ ]: