FunctionRacerProblemsRace

A Chart per Group

MediumseabornPython

df has columns height, weight and sport. Instead of coloring one crowded chart, give every sport its own: use seaborn's figure-level relplot to draw weight against height as scatter plots in one row of charts, one column per sport. The function returns a grid object, not a chart: return its figure.

Checked: the title, where each chart sits and the points.

Example 1

df {"height":[150,160,170,180],"weight":[50,58,66,80],"sport":["run","swim","run","swim"]}
draws
The chart to draw in example 1 of A Chart per Group

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More seaborn problems