FunctionRacerProblemsRace

A Trend per Group

MediumseabornPython

df has columns hours, score and school. Use seaborn's lmplot to draw score against hours as a scatter plot with a separate least squares line for each school, in different colors on one chart, without the shaded bands (ci=None). The function returns a grid object, not a chart: return its figure.

Checked: the points and the lines.

Example 1

df {"hours":[1,2,3,1,2,3],"score":[50,60,70,40,45,50],"school":["east","east","east","west","west","west"]}
draws
The chart to draw in example 1 of A Trend 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