Exercise 2.1: Plotting with Palmer penguins

Data set download


[1]:
import pandas as pd

In a previous exercise, you tidied a subset of the Palmer penguins data set. To do that, you did the following.

[3]:
df = pd.read_csv('../data/penguins_subset.csv', header=[0, 1])

df_tidy = df.stack(
    level=0
).sort_index(
    level=1
).reset_index(
    level=1
).rename(
    columns={"level_1": "species"}
)

Now, use that tidied data set to make a scatter plot of bill length versus flipper length with the glyphs colored by species.