O'Reilly logo

Python Business Intelligence Cookbook by Robert Dempsey

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a customized box plot with whiskers

Box plots help to identify the outliers in data, and are useful for comparing distributions. As per Wikipedia, Box and whisker plots are uniform in their use of the box: the bottom and top of the box are always the first and third quartiles, and the band inside the box is always the second quartile (the median).

The lines extending from the box are the whiskers. Any data not included between the whiskers is an outlier.

How to do it…

  1. To create a customized box plot with whiskers, begin by importing all the required libraries. To show the matplotlib plots in IPython Notebook, we will use an IPython magic function which starts with %:
    %matplotlib inline import pandas as pd import numpy as np from pymongo ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required