Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Histograms | Aggregating and Visualizing Data
Data Manipulation using pandas
course content

Conteúdo do Curso

Data Manipulation using pandas

Data Manipulation using pandas

1. Preprocessing Data: Part I
2. Preprocessing Data: Part II
3. Grouping Data
4. Aggregating and Visualizing Data
5. Joining Data

Histograms

Let's move on to the first visualization steps. By now you already know how to clean, prepare, and aggregate data for further analysis. We'll start with histograms.

What is a histogram? Histogram is a graph that represents frequencies of numerical data (usually numerical intervals). To build histogram in pandas, apply the .hist() method to selected data. For instance, let's build a histogram for the 'totinch' column.

Note that you don't need to use the print() function to output the plot.

As parameters, you can set color (color for rectangles, like 'r', 'g', 'b', etc.) or bins (number of intervals to divide data). Let's make rectangles red and set the number of intervals to 50.

Tudo estava claro?

Seção 4. Capítulo 5
We're sorry to hear that something went wrong. What happened?
some-alt