Swarm plot

Let's now plot swarmplot. We use seaborn's swarmplot method for this, as follows:

sns.swarmplot(x="season", y="us_viewers_in_millions", data=df);

The output is as follows:

Here, we have also passed the season number on the x axis, and use viewers in millions on the y axis.

Get Mastering Exploratory Analysis with pandas now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.