Group by Region
Tarefa
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.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 3. Capítulo 8
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Suggested prompts:
Resumir este capítulo
Explicar o código em file
Explicar por que file não resolve a tarefa
Awesome!
Completion rate improved to 2.94
Group by Region
Deslize para mostrar o menu
Tarefa
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.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 3. Capítulo 8
single