

Specifically, you’ll be using pandas hist() method, which is simply a wrapper for the matplotlib pyplot API.

This recipe will show you how to go about creating a histogram using Python.

By visualizing these binned counts in a columnar fashion, we can obtain a very immediate and intuitive sense of the distribution of values within a variable. A histogram divides the values within a numerical variable into “bins”, and counts the number of observations that fall into each bin. When exploring a dataset, you'll often want to get a quick understanding of the distribution of certain numerical variables within it. A histogram is a graphical representation commonly used to visualize the distribution of numerical data.
