Group by Region
Compito
Swipe to start coding
Let's build a new scatter plot with the same data, but this time painting the points with respect to the region (the 'continent' column). Follow the next steps:
- Iterate over pair of
colorsandregions, usingcolorandregionas dummy variables. - Within the loop, filter the observations to a particular continent (respective value of
regionvariable). - Then, within the same loop, initialize a scatter plot of
'gdp per capita'vs'life exp'. Set color of points tocolorand set thelabelparameter toregion. - Display the legend of the plot.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 3. Capitolo 8
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Suggested prompts:
Riassuma questo capitolo
Explain code
Explain why doesn't solve task
Fantastico!
Completion tasso migliorato a 2.94
Group by Region
Scorri per mostrare il menu
Compito
Swipe to start coding
Let's build a new scatter plot with the same data, but this time painting the points with respect to the region (the 'continent' column). Follow the next steps:
- Iterate over pair of
colorsandregions, usingcolorandregionas dummy variables. - Within the loop, filter the observations to a particular continent (respective value of
regionvariable). - Then, within the same loop, initialize a scatter plot of
'gdp per capita'vs'life exp'. Set color of points tocolorand set thelabelparameter toregion. - Display the legend of the plot.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 3. Capitolo 8
single