Here everyone in this video are going to create the data net.
So despite creating data.
So here we are the Jupiter notebooks and we will begin with leaving some gap here so that functions
can be edited here.
We are going to require full function so I'm living here.
Five cents.
In case we require something else.
So first we will begin like by asking the user that what kind of data he or she stick by.
So for that just print and there and anything like select the type of data you need to blow up something
like that one by writing one two or three maybe go a different hit return or in doing windows maybe
go with that one.
Now here we have selected type of data you need to upload by writing one two or three then we will provide
user the input options like first one this one also a string wondered then we have us one random data
so random data with hundreds rows and five columns you can have different of frozen columns if you want
to after that second one is like customize
customize data frame with let's say five columns and fold rows shifted and we have these two the last
one the third one that is upload CCE less Jason slash text file daily go with that.
So here we have the interface like selecting data data out of these.
Then we will take whatever the use it and as an input.
So with the everyone look bad it is.
So whenever we are going to create some data we need input that what kind of data to use it.
After taking that.
But we then need to create these data.
So first we will take the data from the user.
That what he requires.
So we will take all that evil data and dig the input from the user.
Here we had the input then this input is always is it correct.
Like if I have this one and I write hit two and if I print here data I will get two in quotes.
If I check the type of this that is the type and we have the data you will get a string.
So you need to convert this one into a string.
So it was a straight here end and you know after you do this one that refers to the value to then you
do this one you will get an engage of.
So this is about the data.
That's how it will happen after the input it could from the user if you will create the data offering
and named this will as the f data input and this will be the data frame created according to this particular
data.
So for that we will do here is something like create data and pass the value data.
So this one is a function we are going to define this one in a separate function.
I hope you get the idea up to this point.
This is very easy for us.
We have taken just that what kind of data he or she is required.
And then I input all the data and positive data to a function of a working will being the dysfunction.
This all is about just the interface that how these things work.
So now let me move to the function here.
So we will define this create data by Def given and here create and then data so that we have the sun
then we will pass here a pattern we don't see data all you can pass any barometer like that I'm going
for data and this one and this one is not related to each of them.
This one is just a value boss to this variable then it will get in this particular function.
Now here let me begin.
If that particular data that is this one equal to one make sure equal duplicitous.
Like if the users want some random data.
So creating random data is very easy.
You can create that one very easily.
Like just if I have X is it will do and B or random and then use ran method not used.
And here just are Endy no friend and then past like Dan do if I've been move then I had this one so
just do the same here go on.
See this one here we have bit of random but hundred dollars and five pullups then we will create a data
frame using this random value and that will be of a different definition here we have also taken a phone.
So here we have this one DeHaven because the function variables are independent of variables that are
outside the function.
So this day everyone would be equal to Beebe then we have data from.
I hope you remember how we can create the do defense first past the X or the values we can see you again
just percent pure random then a hundred five here.
But in this case it's a little systematic.
After that Bostic columns.
So here we have the columns and in that one copy delay capital B capital C capital D and the last one.
David go with that one.
So here of a data frame is key.
If I use these two commands make sure your commands are evoking by taking these one in separate lines
and checking whether they are working or not.
So this one shifted down and if I've been to have fun got the debt but so completely working fine.
So now we have created our first date in there.
So no random data created that will move custom data.
Now how to create the customized data for that.
First of all we require as if data equal to equal to to what will happen in that case.
So to create anything so a customized data request input from the user like we posted some rules then
we need some columns.
So how will we do that thing like if I have a list here that is first I have the values like 0 0 0 NCL
and if I remember by turn in Python the variable values can be changed like in this list here these
are all integers.
And if I do something like x of to equal to a.
And now if I print x I have this on a string and here this one is a number.
So Python values can be changed from one day to day to another one.
And this is how we are going to create a list here that will be customizable according to users.
Well you know if I do hear something like take inputs from a user for this index to up to this index.
So I need to have a loop there and that loop will begin from eyes equal to zero and I will do something
like for I come in and pass a list here according to the number of because it index in that particular
list like hey I have 0 1 2 3 and 4.
So I will do 0 1 2 3 and 4 but no.
But it's also gaining from 0.
Maybe go with that one.
And then what will we do we will do something like X at that particular I like four plus four I's equal
to zero then for fun net for two then for three then four for this will be equal to first we will take
a simple example like eight and make the I equal to a plus what should be done and if I print x.
Now I have this.
So if you noticed here I have manipulated the list completely by just using a loop and at least in that
case and if I just change this one in two input shift it on that one and it will ask me for the values
like two three four five six.
If I paint that one I have two three four five and six next it is if you need this one in digital form
then you need to here it shifted on two three four five six.
And if you print x now you have an integer on values list so that's not how we are going to create customized
data here.
So let's be in that one.
We will first boss already at least that is 0 0 0 in zero.
This one is four columns.
Then we have often fun just bust this complete here.
Then we have wrote to this will be like that.
Also then we have all three in last we have rofl.
David go with that one.
So here now we have five columns four rows.
Now we will convert this data according to the user's input and we will begin with like print enter
the values for all.
So columns that we had this on and then we will apply before loop by taking a variable ie equal to zero
initially then for I in this list that is 0 1 2 3 and 4.
Make sure you are only passing up to four if you pass here like five you will get input in the beginning
but in last you will get error that is denoting index error because the list has only up to 0 2 4 not
the 50 next.
In that case.
So make sure you are passing the exact number of values as in the list.
Then what will we do here.
Like x of I.
And this will became input.
And one more thing if you leave this thing like you do not incremental value.
Then whenever you enter the values here you will always get and if you try to print x when you have
this t
so be sure you are also incrementing the I advise you may get it.
So I equal to a plus one and how this loop is working like its beginning with zero and it will go for
like I go to zero in 0 1 2 and 3 whenever the value is in 0 1 2 3 and 4 then what will we do it will
change the value of X at particular index I like first on zero to the user's input and then it will
increment i.
So when the increment come back to the initialization of loop.
Now here we have is equal to 1.
So it will again check here what is present.
Again same thing.
It will become 2.
Similarly when it became 4 it will provide the data and then it will became here.
5 that is 4 plus 1 and then it will check here for 5 in 0 1 2 2 4 5 is not there.
So in that it will get out of that particular group.
I hope you get the idea after that we need to do the same thing.
Come on.
Come on V here and to the value for first to maybe had the sun and instead of x we have here of one.
Be sure you are here.
Dinging I's equal to again zero because at this point Isaac will do five right now and a five game here
then it will not take the input then you need to again initialize the I's equal to zero or you can use
any other variable like eight.
Just change it a also in here also.
But I'm just taking a simple I in all the cases because that will also work in that particular situation.
Now this value that are taken here and here are strings as I have shown you in that particular case
that the input is a string.
If I take input from user like X it will do input.
It will always be a string three and when I bring three this encodes so columns are needed to in string
but these values that are the integer values must be converted into.
So here I need to create this one into integer values.
And I hope you get the idea why I did that after that.
Here we have a rule to rule t ROFL just Jeez this one into are to this one into r 3 and there we have
this one into our fourth.
So this is Van user is selecting customized data.
Let me tell you that how again it's working random is the easy one will go with the customized first
I have taken five rows so the five list here that all have value initially 0 0 0 0.
You can change any value to them.
Just make sure you are not passing an empty list.
Then we would ask the user for the columns and we will use we have used a loop here for inputting the
values at every point in this list you can also do something like first for X of 0 then X of 1 x or
do X of three X and for just taking input simply like this thing X of zero.
Then you are digging out of X or 1 and doing here something like input and they've had input that thing
also work like two.
And it's a string object but leave that I think of all the idea what I need to tell you at that particular
point but that thing will become too large.
You need to define again and again and that is something like less efficient.
So here we have used a boy in which all the things are more systematized.
And I also hope that you go this thing that how this is working it will evolve from zero to 40 the input
and similar thing is happening for all the values we just need to add up and come on there like this
one after this thing.
Here we have for the second row and then after this point we had the third row.
This one third after this one we had the photo
for you ought to.
David Gold at that point.
So now we have also created the customized data.
You can also check this complete just by copying and turning to compete in this epic set so that you
will get the idea that is it working on now after taking this thing from user what you need to do you
no need to Jeez this complete data into what data.
So here I have a data MTF and same decision but if loop is coming for data is equal to do then this
value is not initialized and this will be BD don't data from.
We had this one in that we will pass us the values and the values out are 1 2 3 and 4 and then we will
pass the columns and the columns we have are x.
So here we have columns this on and is equal to x.
So here we have no then the customized data.
Last thing we need to do and if not else and if what's the barometer the data data equally will treat
like user need to select a file from his computer and on to upload that one here.
So what should be done in that case.
So this will be very simple.
You just take a file variable that will be input and that input will be like and the file name.
Simple as that.
And then we will use that file to upload here just BBDO greed underscored CSC.
They we had the sun and bust that particular name.
So actually what we are doing here.
We are just simply passing this thing tape stops.
We like when we are uploading this one.
What we have done we have first taken this input like that we should anticipate sell here.
We have just first taken an input that is fighting like Vonage and that one.
And here I have tapes dope CSP hit enter and when you've been fine you will have disk dips NCIC and
this one is now a screen.
So when I do come on V here and instead of keep NTSB first if I pass this one ends on that one and have
I have X dot head I have deep stored CSB what I can also do here I can just pass this thing that is
fine.
Run run I will again get the output.
So I hope you get it.
What I have done here.
I have just lost now find it.
It will take the user's input that is defiling to store CSB then it will pass this one into a variable
X that is BD to crude s we find that file will be deleted from the computer.
Now we have that file in no variable X we will create our data frame with that file no that is D 7 and
then BD don't data frame make sure the end f of capital that adviser will get data and then pass just
X now defined is created into data offering baby had this and also data.
So done with that.
So this is how you can create the data now.
Last thing in case you can use it and does something else like 4 5 6 7 and in that case just print data
frame creation failed please and to some thing oh please enter in between 1 2 3 and try again.
So this time I'm not using any random syntax like that a sector.
We are going to do something on all the things properly.
So try again maybe go with that one.
Now we have created this one no data famous created so it will just return that D7 to the functions
out.
So then we determine
shifted on the vehicle the descent funding.
So what created the function is running now.
We can test that one also does Tia shifted.
If I choose one and it random.
And here if I print the F1 shifted and David go with that one he have a fight.
Make sure to check everything.
Otherwise it will get added in the lost end.
It's hard to find it.
So step by stick check the edges first random is working fine.
Now we go for the customized one a B C D E columns have taken successfully.
Now the values 2 3 3 2 2 plus joystick unsuccessfully second is again taken.
Toad is again ticked on Dave we have the fourth one.
Close the fingers.
We didn't know to get any into here.
David go with that Ben Dedmon.
David go with Declan so a second step is also working fine.
That is the customized data now the third and the last one.
Keep stored CSP.
DAVID GOODWIN No it's asking for the input.
And this time every note CSC because that file is also at that location shifted on.
David go.
Declan so a data cell or and declared data function both are completely working fine and congratulations
for building up to this point.
Remove the unnecessary files and let me move to the next video creating the second step after this one.
We have done to create data failure.
Just input correctly now so thanks for watching.
Soon the next video and I hope you enjoyed this video creating the data.
This one is a little big video but I believe you are very excited and this is very interesting what
you are not get.
So thanks for watching.
In the next video.