## About this lesson

In this video, we begin discussing data visualization, and install matplotlib to help us create histograms.

## Exercise files

Download this lessonâ€™s related exercise files.

Plotting Histograms57.1 KB Plotting Histograms - Solution

56.7 KB

## Quick reference

### Plotting Histograms

We can use matplotlib to plot charts and graphs, including a histogram.

### When to use

Use this to create a histogram.

### Instructions

To create a histogram, use the .hist() function on a column of your DataFrame:

my_df['Wed'].hist()

To change the number of bins in the histogram:

my_df['Wed'].hist(bins=20)

You can also use the .plot() function:

my_df['Wed'].plot(kind="hist")

### Hints & tips

- my_df['Wed'].hist()
- Change Bins: my_df['Wed'].hist(bins=20)
- Other Method: my_df['Wed'].plot(kind="hist")

Lesson notes are only available for subscribers.