Login using Social Account
     Continue with GoogleLogin using your credentials
We have two attributes, latitude
and longitude
that tell us about the geographical information of the blocks.
We can create a scatterplot of all blocks to visualize the data. We can do that by using the DataFrame.plot()
method of the pandas
library. Its syntax is:
DataFrame.plot()
where DataFrame is the name of the DataFrame.
Some of the important attributes of the plot()
method to plot a scatter plot are:-
It uses matplotlib
by default in the backend. You can refer to plot() documentation for more details about the method.
Plot a scatterplot between the attributes latitude
(represented in the x-axis) and longitude
(represented in the y-axis) of the DataFrame train_copy
.
Set the value of parameter alpha
to 0.1. We experimented with many values of alpha
and got the best result at 0.1.
Note- We can also specify longitude
for the y-axis and latitude
for the x-axis. Our goal is to visualize the data and either way will accomplish the task.
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
Loading comments...