boxplot
Makes a box plot of all numerical features against a specified categorical target column.
Description
A box plot (or box-and-whisker plot) shows the distribution of quantitative data in a way that facilitates comparisons between variables or across levels of a categorical variable. The box shows the quartiles of the dataset while the whiskers extend to show the rest of the distribution, except for points that are determined to be "outliers" using a method that is a function of the inter-quartile range.
Examples
We are using the classic iris data set and a Jupyter notebook in the following examples.
Boxplots can be created for every column in a DataFrame and separated by a specified target:
boxplot can be created for specified columns only:
The size of plots can changed using the fig_size parameter
To save a figure to the current working directory, set the save_fig parameter to True:
For large dataset (in orders of millions), it is recommended to set the large_data parameter to True. This tells boxplot to use an efficient method of plotting called the boxenplot
Learn more about boxenplot here
To improve this documentation, visit the datasist-doc repository
Last updated