Session Ready
Exercise

Plot income and education

To get a closer look at the relationship between income and education, let's use the variable 'educ' to group the data, then plot mean income in each group.

Here, the GSS dataset has been pre-loaded into a DataFrame called gss.

Instructions
100 XP
  • Group gss by 'educ'. Store the result in grouped.
  • From grouped, extract 'realinc' and compute the mean.
  • Plot mean_income_by_educ as a scatter plot. Specify 'o' and alpha=0.5.