Python Notes

Categorical data.

Categorical Data

Categorical data has only a few values, so is encoded efficiently.

Pandas documentation on categorical data: to make data categorical, you should make a new categorical column: df["B"] = df["A"].astype('category').

The legend="brief" option to sns.scatterplot does not work when the coloring of the points is done with a numerical categorical variable. Use legend="full" instead.