Learn practical skills, build real-world projects, and advance your career

Drawing Conclusions Using Groupby

# Load `winequality_edited.csv`
import pandas as pd

df = pd.read_csv('winequality_edited.csv')

Is a certain type of wine associated with higher quality?

# Find the mean quality of each wine type (red and white) with groupby
df.groupby('color').mean().quality
color
red      5.636023
white    5.877909
Name: quality, dtype: float64

What level of acidity receives the highest average rating?