Conteúdo do Curso
Data Manipulation using pandas
Data Manipulation using pandas
2. Preprocessing Data: Part II
Bar and Scatter Plots
There are other kinds of graphs pandas
allows us to use for visualization. Among them are boxplots, bar plots, scatter plots, etc. To build a respective plot, apply the .plot()
method to selected data, and set the kind
parameter to plot type you want to build.
Possible values for the kind
parameter are the following.
Value | Kind of plot |
bar or barh | for bar plots |
hist | for histogram |
scatter | for scatter plots |
For instance, to build a scatter plot you also need to set two parameters: x
and y
. Let's build a scatter plot of total income vs. dwelling price.
The same parameters must be set to build a bar plot. For instance, let's build a bar plot with address on the x-axis and total income on the y-axis for the first 20 dwellings.
Tudo estava claro?