Let's see how the quality of wine varies with respect to alcohol concentration. This can be done using the box plot. Check the code snippet given here:
sns.boxplot(x='quality', y='alcohol', data = df_red)
And the output of the preceding code is as follows:
Note the box in Figure 12.7 showing some dots outside of the graph. Those are outliers. Most of the outliers as shown in Figure 12.7 are around wine with quality 5 and 6. We can remove the outliers by passing an argument, showoutliers=False, as shown in the following code:
sns.boxplot(x='quality', y='alcohol', data = df_red, showfliers=False)
And the output of the code is much cleaner, as shown here:
Note that, from Figure 12.8, it seems that as the quality of wine increases, so does the alcohol concentration. That would make sense, right? The higher the alcohol concentration is, the higher the quality of the wine.