Group by Region
Tarea
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.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 3. Capítulo 8
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Suggested prompts:
Resumir este capítulo
Explicar el código en file
Explicar por qué file no resuelve la tarea
Genial!
Completion tasa mejorada a 2.94
Group by Region
Desliza para mostrar el menú
Tarea
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.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 3. Capítulo 8
single