Bar plot

To draw a bar plot, we use the following barplot method:

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

The output is as follows:

Note that there is another version of bar plots available, and these are drawn using the countplot method, as follows:

sns.countplot(x="season", data=df);

The output of the preceding code is as follows:

This style of plot can be used when you want to show the number of observations in each category, rather than compute a status for the second variable.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.37.214