WEBVTT

00:00.080 --> 00:00.840
Welcome back.

00:00.880 --> 00:07.560
As a quick recap of what we did before, we installed TensorFlow generated random numbers and set the

00:07.560 --> 00:08.160
seeds.

00:08.200 --> 00:14.480
Also, we created those variables size and price linked together by this equation.

00:14.680 --> 00:25.000
Now we're going to convert numpy array into pandas dataframe in order to be plotted and in a table format.

00:25.280 --> 00:35.680
Okay, so first of all let me introduce uh the and let's clarify some concepts we need to concatenate.

00:35.680 --> 00:38.920
And in the previous videos we learned about concatenation.

00:38.920 --> 00:48.560
And we did this step before okay I love writing uh the notes uh, like this because they are very useful

00:48.560 --> 00:50.320
when going back to this.

00:50.440 --> 00:51.680
Uh ipy.

00:51.880 --> 00:58.960
And B file using TensorFlow file and the notebook, everything will be clarified.

00:59.110 --> 01:08.590
So data equals to PD dot data frame and concatenate this size and price.

01:08.630 --> 01:17.350
Set the axis equals to y and the columns named as size and the price in thousand dollars.

01:17.470 --> 01:23.430
What we did here we are converting numpy array into pandas dataframe.

01:23.470 --> 01:29.270
As you learned before, we generated random arrays here.

01:29.350 --> 01:32.150
Size and price like this.

01:32.350 --> 01:37.510
So before concatenation we have a size array and a price array.

01:37.670 --> 01:42.910
The size array for example 1.372.771..

01:42.950 --> 01:46.430
Did you remember the range from 1 to 3.

01:46.750 --> 01:49.070
Also the price array.

01:49.310 --> 01:51.110
Also we set the range.

01:51.350 --> 01:56.510
And here we have the size and arrays without concatenation.

01:56.510 --> 02:02.890
So think about them as two arrays with 100 rows and one column.

02:02.930 --> 02:07.130
After concatenation, we get a combined array.

02:07.170 --> 02:17.810
So the first element in the array size is combined with the first element of the price array.

02:17.970 --> 02:20.170
We have this element.

02:20.210 --> 02:25.210
The first one represents the size and the second one represents the price.

02:25.250 --> 02:25.770
Okay.

02:25.890 --> 02:32.530
This is a combined array 100 rows and two columns.

02:32.530 --> 02:35.930
So you, uh, see the difference guys.

02:36.050 --> 02:36.530
How?

02:36.770 --> 02:45.170
Before concatenation we get two arrays 100 rows and one column, but two arrays here after concatenation

02:45.170 --> 02:53.170
we have only one array containing two row two columns and 100 rows.

02:53.210 --> 02:53.730
Okay.

02:54.050 --> 02:57.560
So this is about the MP dot concatenate.

02:57.600 --> 03:05.840
The axis equals to one means join side by side horizontally instead of stacking vertically.

03:05.840 --> 03:13.080
So x is one means I need to set them as a horizontal manner side by side.

03:13.200 --> 03:16.080
Then we created the columns.

03:16.080 --> 03:21.960
So those columns will represent the size here and the price.

03:22.000 --> 03:27.720
Okay so the first one is the size, the second one is the price.

03:27.720 --> 03:30.720
And the title of the table would be.

03:30.760 --> 03:34.360
And the title of the columns would be size and the price.

03:34.360 --> 03:36.200
Exactly like in this format.

03:36.200 --> 03:36.720
Okay.

03:36.880 --> 03:37.360
Don't worry.

03:37.400 --> 03:42.800
We're going to run this, um, this cell and see the results.

03:42.800 --> 03:43.680
Let's run.

03:43.720 --> 03:47.880
I got this error because I restarted my computer.

03:48.080 --> 03:56.620
So let me start from the beginning, importing TensorFlow and generating the random data before running

03:56.620 --> 03:57.220
this cell.

03:57.260 --> 03:58.500
And here we go.

03:58.540 --> 04:02.460
We have this generated data size.

04:02.500 --> 04:08.860
They see the title of the first column and the price the title of the second column.

04:09.060 --> 04:14.740
And we get the first ten results using data dot head.

04:14.780 --> 04:19.900
If you want to get all the data, we use data directly.

04:19.900 --> 04:20.980
And here we go.

04:21.020 --> 04:24.540
We have 100 rows with two columns.

04:24.780 --> 04:28.300
Okay guys this is how we set.

04:28.340 --> 04:37.420
And uh, we, we control the generated data and how we display the them into a data frame.

04:37.740 --> 04:38.220
Okay.

04:38.260 --> 04:45.100
So here we converted numpy array into pandas data frame okay.

04:45.380 --> 04:47.340
So this is our data.

04:47.380 --> 04:49.700
Now we can work with it.
