00:00Hello everyone. In this video, we will talk about data visualization using Matplotlib.
00:10So, when we use Matplotlib, we will talk about different charts.
00:17First, we will load a dataset.
00:19From SQL.dataset, import load iris.
00:22Pandas library, we will import.
00:24Next, iris equal to load underscore iris.
00:27So, this is actually a dictionary format.
00:31Load iris.
00:34Actually, iris dataset is a dictionary format.
00:39Key is data.
00:41This is sepal length, sepal width, petal length, petal width.
00:44So, there are 4 data.
00:46This is row data.
00:49Then, target column.
00:52So, if we use 4 values, target column 0, 1, 2 are.
00:56That is plus 0 represent setosa.
00:591 is versical.
01:002 is virginica.
01:01And, this is feature names.
01:06Sepal length, sepal width, petal length, petal width.
01:09That is the 4 values.
01:10That is the data.
01:11This is base.
01:12We will create data frame.
01:14So, df equal to pd.dataframe.
01:17Data equal to iris of data.
01:19Iris enter the dictionary.
01:21So, we use data frame.
01:24So, data equal to iris of data.
01:26Columns equal to iris of feature names.
01:29So, the first column we will create.
01:32Now, we will create a new column.
01:34We will create a new column.
01:35That is, df of species is equal to iris of target.
01:38Then, target is 0, 1, 2.
01:40Normal.
01:42Target equal to 0, 0, 0.
01:45Now, this is normal setosa represent.
01:501 is versical, 2 is versical.
01:52So, if we compare it to df of species is equal to df of species.map of 0, setosa.
01:59That is the result.
02:00That is the result.
02:01That is the result.
02:02Next is 0.
02:03So, setosa is the result.
02:041 is versical, 2 is versical.
02:06So, we will create a new column.
02:07So, in the map, we will create a new data set.
02:09So, we will create a new data set.
02:11So, we will create a new plot.
02:12The first plot, we will analyze the first line plot.
02:15So, first, what do we do in the line chart?
02:21What do we do in the line?
02:22We will create a new column.
02:23We will create a new column.
02:24We will create a new column.
02:25That is, Cepalent and Petalent.
02:30Now, this is the first data.
02:32This is 1.
02:33This is 2.
02:34This is 3.
02:35This is 4.
02:37This is 5.
02:38This is 6 and 7.
02:43So, we will create a new order.
02:46We will create a new order.
02:473, 4, 5, 6, 7.
02:50So, in the line chart, we will plot.
02:53There is a proper visualization.
02:55If we can do it,
02:56we will sort it.
02:58So, df of sorted is equal to
03:01df.sort values of Cepalent.
03:03So, Cepalent length.
03:05We will sort it.
03:06We will sort it.
03:07Sort it.
03:08So, plot.
03:09Normally, we will determine the line plot.
03:12So, line plot create.
03:14What is this?
03:15This is x-axis.
03:16First data, x-axis.
03:17Second data, y-axis.
03:19So, Cepalent, Petal length.
03:21Then, this value system.
03:22This value system.
03:23This plot is normal.
03:24In the one-toon order.
03:26This x-axis, y-axis.
03:27This point is x, y value.
03:30That is Cepalent and Petal length.
03:32Then, this is Cepalent and Petal length.
03:34So, in the dots,
03:36we will see the points.
03:37We will see the points.
03:38The points are the markers equal to oval.
03:40The other color is blue.
03:42Let's change the color.
03:43Next, I will have the title.
03:45Cepalent vs Petal length.
03:47Then, we will see the already introduction.
03:51We will do the mat plot.
03:52We will specify the little add-tration.
03:55We will specify the x-axis.
03:58That is x-axis.
03:59We will see the plot.x-label of Cepalent.
04:02The plot.y-label of y-axis data.
04:04We will provide the y-labeling.
04:06Petal length.
04:07Then, we will store the grid format.
04:09We will activate the plot.grid.
04:12The grid is important.
04:14We will visualize the exact point.
04:18We will analyze the exact point.
04:20We will analyze the exact point.
04:22So, we will consider the point.
04:24So, this is Cepal length.
04:265.
04:28Then,
04:29Petal length is 3.5.
04:32Then, we will use the grid line.
04:34So, we will activate the grid line.
04:36So, we will activate the grid line.
04:38So, we will activate the grid line.
04:42This is a normal line plot.
04:44Create the plot.
04:45The data visualization using matplotlib part 1 is the next video in the next video.
04:58You
Comments