Using a box plot, one can know the spread and skewness of data. It is a standardized way of displaying the five-number summary of the data:
- The minimum
- The maximum
- The median
- The first quartile or 25th percentile and
- The third quartile or 75th percentile
A box plot usually includes two parts. It includes a box and a set of whiskers. The lower whisker denotes the minimum. The upper whisker denotes the maximum. A box is drawn from the 1st quartile or the 25th percentile to the third quartile or the 75th percentile. The horizontal line in the middle of the box denotes the median.
We can use the seaborn.boxplot() function to plot a box plot using the seaborn Python library. For example, we can use the following Python code to plot a box plot of the age of passengers in titanic:
0 Comments