Skip to article frontmatterSkip to article content

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

Check out Alcohol Consumption Exercises Video Tutorial to watch a data scientist go through the exercises

Step 1. Import the necessary libraries

Step 2. Import the dataset from this address.

Step 3. Assign it to a variable called drinks.

Step 4. Which continent drinks more beer on average?

Step 5. For each continent print the statistics for wine consumption.

Step 6. Print the mean alcohol consumption per continent for every column

Step 7. Print the median alcohol consumption per continent for every column

Step 8. Print the mean, min and max values for spirit consumption.

This time output a DataFrame