1 00:00:05,950 --> 00:00:10,240 Here everyone in this video are going to create the data net. 2 00:00:10,380 --> 00:00:12,840 So despite creating data. 3 00:00:13,520 --> 00:00:20,480 So here we are the Jupiter notebooks and we will begin with leaving some gap here so that functions 4 00:00:20,510 --> 00:00:21,550 can be edited here. 5 00:00:21,560 --> 00:00:24,620 We are going to require full function so I'm living here. 6 00:00:24,620 --> 00:00:25,500 Five cents. 7 00:00:25,520 --> 00:00:27,310 In case we require something else. 8 00:00:28,130 --> 00:00:34,550 So first we will begin like by asking the user that what kind of data he or she stick by. 9 00:00:35,150 --> 00:00:50,630 So for that just print and there and anything like select the type of data you need to blow up something 10 00:00:50,630 --> 00:01:06,610 like that one by writing one two or three maybe go a different hit return or in doing windows maybe 11 00:01:06,610 --> 00:01:08,060 go with that one. 12 00:01:08,060 --> 00:01:13,790 Now here we have selected type of data you need to upload by writing one two or three then we will provide 13 00:01:13,790 --> 00:01:22,190 user the input options like first one this one also a string wondered then we have us one random data 14 00:01:22,970 --> 00:01:35,420 so random data with hundreds rows and five columns you can have different of frozen columns if you want 15 00:01:35,420 --> 00:01:42,290 to after that second one is like customize 16 00:01:45,010 --> 00:02:00,810 customize data frame with let's say five columns and fold rows shifted and we have these two the last 17 00:02:00,810 --> 00:02:16,060 one the third one that is upload CCE less Jason slash text file daily go with that. 18 00:02:17,250 --> 00:02:22,400 So here we have the interface like selecting data data out of these. 19 00:02:22,740 --> 00:02:26,920 Then we will take whatever the use it and as an input. 20 00:02:27,690 --> 00:02:30,340 So with the everyone look bad it is. 21 00:02:30,360 --> 00:02:35,860 So whenever we are going to create some data we need input that what kind of data to use it. 22 00:02:36,120 --> 00:02:37,150 After taking that. 23 00:02:37,160 --> 00:02:40,160 But we then need to create these data. 24 00:02:40,260 --> 00:02:42,840 So first we will take the data from the user. 25 00:02:43,370 --> 00:02:45,220 That what he requires. 26 00:02:45,210 --> 00:02:50,530 So we will take all that evil data and dig the input from the user. 27 00:02:50,760 --> 00:02:56,290 Here we had the input then this input is always is it correct. 28 00:02:56,340 --> 00:03:05,540 Like if I have this one and I write hit two and if I print here data I will get two in quotes. 29 00:03:05,700 --> 00:03:13,410 If I check the type of this that is the type and we have the data you will get a string. 30 00:03:13,620 --> 00:03:16,050 So you need to convert this one into a string. 31 00:03:16,060 --> 00:03:27,150 So it was a straight here end and you know after you do this one that refers to the value to then you 32 00:03:27,150 --> 00:03:30,560 do this one you will get an engage of. 33 00:03:30,600 --> 00:03:31,950 So this is about the data. 34 00:03:32,610 --> 00:03:39,420 That's how it will happen after the input it could from the user if you will create the data offering 35 00:03:39,540 --> 00:03:47,820 and named this will as the f data input and this will be the data frame created according to this particular 36 00:03:47,820 --> 00:03:48,460 data. 37 00:03:48,480 --> 00:03:56,780 So for that we will do here is something like create data and pass the value data. 38 00:03:56,850 --> 00:04:01,010 So this one is a function we are going to define this one in a separate function. 39 00:04:01,080 --> 00:04:03,440 I hope you get the idea up to this point. 40 00:04:03,510 --> 00:04:04,410 This is very easy for us. 41 00:04:04,500 --> 00:04:08,040 We have taken just that what kind of data he or she is required. 42 00:04:08,360 --> 00:04:14,930 And then I input all the data and positive data to a function of a working will being the dysfunction. 43 00:04:14,940 --> 00:04:18,780 This all is about just the interface that how these things work. 44 00:04:18,780 --> 00:04:20,720 So now let me move to the function here. 45 00:04:22,470 --> 00:04:32,710 So we will define this create data by Def given and here create and then data so that we have the sun 46 00:04:33,920 --> 00:04:40,910 then we will pass here a pattern we don't see data all you can pass any barometer like that I'm going 47 00:04:40,910 --> 00:04:47,810 for data and this one and this one is not related to each of them. 48 00:04:47,870 --> 00:04:53,720 This one is just a value boss to this variable then it will get in this particular function. 49 00:04:53,750 --> 00:04:56,860 Now here let me begin. 50 00:04:56,900 --> 00:05:04,470 If that particular data that is this one equal to one make sure equal duplicitous. 51 00:05:05,270 --> 00:05:08,910 Like if the users want some random data. 52 00:05:09,260 --> 00:05:11,660 So creating random data is very easy. 53 00:05:11,660 --> 00:05:13,820 You can create that one very easily. 54 00:05:13,820 --> 00:05:23,770 Like just if I have X is it will do and B or random and then use ran method not used. 55 00:05:23,780 --> 00:05:34,200 And here just are Endy no friend and then past like Dan do if I've been move then I had this one so 56 00:05:34,200 --> 00:05:36,460 just do the same here go on. 57 00:05:36,470 --> 00:05:45,240 See this one here we have bit of random but hundred dollars and five pullups then we will create a data 58 00:05:45,240 --> 00:05:54,360 frame using this random value and that will be of a different definition here we have also taken a phone. 59 00:05:56,280 --> 00:06:01,110 So here we have this one DeHaven because the function variables are independent of variables that are 60 00:06:01,290 --> 00:06:03,300 outside the function. 61 00:06:03,300 --> 00:06:09,520 So this day everyone would be equal to Beebe then we have data from. 62 00:06:09,630 --> 00:06:18,400 I hope you remember how we can create the do defense first past the X or the values we can see you again 63 00:06:18,410 --> 00:06:21,620 just percent pure random then a hundred five here. 64 00:06:21,830 --> 00:06:25,460 But in this case it's a little systematic. 65 00:06:25,460 --> 00:06:27,640 After that Bostic columns. 66 00:06:27,650 --> 00:06:41,550 So here we have the columns and in that one copy delay capital B capital C capital D and the last one. 67 00:06:42,540 --> 00:06:44,360 David go with that one. 68 00:06:44,540 --> 00:06:47,130 So here of a data frame is key. 69 00:06:48,020 --> 00:06:55,340 If I use these two commands make sure your commands are evoking by taking these one in separate lines 70 00:06:55,340 --> 00:06:57,560 and checking whether they are working or not. 71 00:06:58,490 --> 00:07:11,330 So this one shifted down and if I've been to have fun got the debt but so completely working fine. 72 00:07:11,630 --> 00:07:17,390 So now we have created our first date in there. 73 00:07:18,920 --> 00:07:23,130 So no random data created that will move custom data. 74 00:07:23,150 --> 00:07:26,680 Now how to create the customized data for that. 75 00:07:26,690 --> 00:07:36,560 First of all we require as if data equal to equal to to what will happen in that case. 76 00:07:36,590 --> 00:07:45,890 So to create anything so a customized data request input from the user like we posted some rules then 77 00:07:45,890 --> 00:07:47,920 we need some columns. 78 00:07:47,930 --> 00:07:57,040 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 79 00:07:58,090 --> 00:08:04,280 and if I remember by turn in Python the variable values can be changed like in this list here these 80 00:08:04,280 --> 00:08:05,750 are all integers. 81 00:08:05,750 --> 00:08:11,220 And if I do something like x of to equal to a. 82 00:08:11,570 --> 00:08:17,400 And now if I print x I have this on a string and here this one is a number. 83 00:08:17,820 --> 00:08:22,070 So Python values can be changed from one day to day to another one. 84 00:08:22,890 --> 00:08:29,380 And this is how we are going to create a list here that will be customizable according to users. 85 00:08:29,380 --> 00:08:37,200 Well you know if I do hear something like take inputs from a user for this index to up to this index. 86 00:08:37,260 --> 00:08:44,310 So I need to have a loop there and that loop will begin from eyes equal to zero and I will do something 87 00:08:44,310 --> 00:08:55,890 like for I come in and pass a list here according to the number of because it index in that particular 88 00:08:55,890 --> 00:08:59,000 list like hey I have 0 1 2 3 and 4. 89 00:08:59,610 --> 00:09:05,320 So I will do 0 1 2 3 and 4 but no. 90 00:09:05,340 --> 00:09:07,320 But it's also gaining from 0. 91 00:09:07,620 --> 00:09:08,620 Maybe go with that one. 92 00:09:08,640 --> 00:09:17,160 And then what will we do we will do something like X at that particular I like four plus four I's equal 93 00:09:17,160 --> 00:09:24,920 to zero then for fun net for two then for three then four for this will be equal to first we will take 94 00:09:25,040 --> 00:09:34,690 a simple example like eight and make the I equal to a plus what should be done and if I print x. 95 00:09:34,700 --> 00:09:36,380 Now I have this. 96 00:09:37,310 --> 00:09:45,110 So if you noticed here I have manipulated the list completely by just using a loop and at least in that 97 00:09:45,110 --> 00:09:52,850 case and if I just change this one in two input shift it on that one and it will ask me for the values 98 00:09:53,180 --> 00:09:56,050 like two three four five six. 99 00:09:56,720 --> 00:10:06,080 If I paint that one I have two three four five and six next it is if you need this one in digital form 100 00:10:07,350 --> 00:10:14,080 then you need to here it shifted on two three four five six. 101 00:10:14,400 --> 00:10:23,540 And if you print x now you have an integer on values list so that's not how we are going to create customized 102 00:10:23,540 --> 00:10:24,070 data here. 103 00:10:25,190 --> 00:10:26,860 So let's be in that one. 104 00:10:27,200 --> 00:10:33,230 We will first boss already at least that is 0 0 0 in zero. 105 00:10:33,230 --> 00:10:35,930 This one is four columns. 106 00:10:36,000 --> 00:10:42,770 Then we have often fun just bust this complete here. 107 00:10:42,800 --> 00:10:46,650 Then we have wrote to this will be like that. 108 00:10:46,700 --> 00:10:53,600 Also then we have all three in last we have rofl. 109 00:10:53,840 --> 00:10:54,750 David go with that one. 110 00:10:55,250 --> 00:11:02,030 So here now we have five columns four rows. 111 00:11:02,140 --> 00:11:12,550 Now we will convert this data according to the user's input and we will begin with like print enter 112 00:11:12,580 --> 00:11:14,930 the values for all. 113 00:11:15,060 --> 00:11:24,550 So columns that we had this on and then we will apply before loop by taking a variable ie equal to zero 114 00:11:24,610 --> 00:11:35,250 initially then for I in this list that is 0 1 2 3 and 4. 115 00:11:35,260 --> 00:11:41,380 Make sure you are only passing up to four if you pass here like five you will get input in the beginning 116 00:11:41,710 --> 00:11:49,140 but in last you will get error that is denoting index error because the list has only up to 0 2 4 not 117 00:11:49,150 --> 00:11:50,200 the 50 next. 118 00:11:50,200 --> 00:11:51,560 In that case. 119 00:11:51,700 --> 00:11:57,310 So make sure you are passing the exact number of values as in the list. 120 00:11:57,780 --> 00:12:00,730 Then what will we do here. 121 00:12:00,730 --> 00:12:02,370 Like x of I. 122 00:12:02,800 --> 00:12:06,270 And this will became input. 123 00:12:07,360 --> 00:12:12,170 And one more thing if you leave this thing like you do not incremental value. 124 00:12:12,640 --> 00:12:20,140 Then whenever you enter the values here you will always get and if you try to print x when you have 125 00:12:20,140 --> 00:12:20,550 this t 126 00:12:23,300 --> 00:12:29,210 so be sure you are also incrementing the I advise you may get it. 127 00:12:29,870 --> 00:12:38,810 So I equal to a plus one and how this loop is working like its beginning with zero and it will go for 128 00:12:38,810 --> 00:12:47,470 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 129 00:12:47,660 --> 00:12:55,400 change the value of X at particular index I like first on zero to the user's input and then it will 130 00:12:55,400 --> 00:12:56,260 increment i. 131 00:12:56,270 --> 00:13:00,030 So when the increment come back to the initialization of loop. 132 00:13:00,120 --> 00:13:02,080 Now here we have is equal to 1. 133 00:13:02,660 --> 00:13:04,970 So it will again check here what is present. 134 00:13:04,970 --> 00:13:05,830 Again same thing. 135 00:13:05,840 --> 00:13:06,950 It will become 2. 136 00:13:06,980 --> 00:13:11,880 Similarly when it became 4 it will provide the data and then it will became here. 137 00:13:11,900 --> 00:13:19,300 5 that is 4 plus 1 and then it will check here for 5 in 0 1 2 2 4 5 is not there. 138 00:13:19,310 --> 00:13:23,430 So in that it will get out of that particular group. 139 00:13:23,510 --> 00:13:29,780 I hope you get the idea after that we need to do the same thing. 140 00:13:29,790 --> 00:13:30,570 Come on. 141 00:13:31,830 --> 00:13:44,940 Come on V here and to the value for first to maybe had the sun and instead of x we have here of one. 142 00:13:45,000 --> 00:13:46,870 Be sure you are here. 143 00:13:46,890 --> 00:13:52,950 Dinging I's equal to again zero because at this point Isaac will do five right now and a five game here 144 00:13:53,280 --> 00:13:58,560 then it will not take the input then you need to again initialize the I's equal to zero or you can use 145 00:13:58,590 --> 00:14:00,530 any other variable like eight. 146 00:14:00,660 --> 00:14:03,690 Just change it a also in here also. 147 00:14:03,690 --> 00:14:12,590 But I'm just taking a simple I in all the cases because that will also work in that particular situation. 148 00:14:12,680 --> 00:14:20,850 Now this value that are taken here and here are strings as I have shown you in that particular case 149 00:14:20,870 --> 00:14:23,690 that the input is a string. 150 00:14:23,690 --> 00:14:27,250 If I take input from user like X it will do input. 151 00:14:27,680 --> 00:14:37,450 It will always be a string three and when I bring three this encodes so columns are needed to in string 152 00:14:37,520 --> 00:14:42,950 but these values that are the integer values must be converted into. 153 00:14:43,640 --> 00:14:47,690 So here I need to create this one into integer values. 154 00:14:48,260 --> 00:14:53,100 And I hope you get the idea why I did that after that. 155 00:14:53,150 --> 00:15:05,240 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 156 00:15:05,240 --> 00:15:07,870 this one into our fourth. 157 00:15:08,150 --> 00:15:14,180 So this is Van user is selecting customized data. 158 00:15:14,540 --> 00:15:21,410 Let me tell you that how again it's working random is the easy one will go with the customized first 159 00:15:21,470 --> 00:15:28,020 I have taken five rows so the five list here that all have value initially 0 0 0 0. 160 00:15:28,160 --> 00:15:29,980 You can change any value to them. 161 00:15:30,170 --> 00:15:33,040 Just make sure you are not passing an empty list. 162 00:15:33,220 --> 00:15:41,090 Then we would ask the user for the columns and we will use we have used a loop here for inputting the 163 00:15:41,090 --> 00:15:47,670 values at every point in this list you can also do something like first for X of 0 then X of 1 x or 164 00:15:47,680 --> 00:15:55,840 do X of three X and for just taking input simply like this thing X of zero. 165 00:15:55,970 --> 00:16:05,210 Then you are digging out of X or 1 and doing here something like input and they've had input that thing 166 00:16:05,240 --> 00:16:07,140 also work like two. 167 00:16:07,310 --> 00:16:13,010 And it's a string object but leave that I think of all the idea what I need to tell you at that particular 168 00:16:13,010 --> 00:16:16,130 point but that thing will become too large. 169 00:16:16,130 --> 00:16:21,150 You need to define again and again and that is something like less efficient. 170 00:16:21,650 --> 00:16:26,270 So here we have used a boy in which all the things are more systematized. 171 00:16:27,740 --> 00:16:33,650 And I also hope that you go this thing that how this is working it will evolve from zero to 40 the input 172 00:16:33,680 --> 00:16:39,620 and similar thing is happening for all the values we just need to add up and come on there like this 173 00:16:39,620 --> 00:16:42,450 one after this thing. 174 00:16:42,950 --> 00:16:52,780 Here we have for the second row and then after this point we had the third row. 175 00:16:53,060 --> 00:16:58,280 This one third after this one we had the photo 176 00:17:01,560 --> 00:17:02,640 for you ought to. 177 00:17:02,680 --> 00:17:04,950 David Gold at that point. 178 00:17:05,080 --> 00:17:08,780 So now we have also created the customized data. 179 00:17:08,980 --> 00:17:14,380 You can also check this complete just by copying and turning to compete in this epic set so that you 180 00:17:14,380 --> 00:17:22,540 will get the idea that is it working on now after taking this thing from user what you need to do you 181 00:17:22,540 --> 00:17:26,690 no need to Jeez this complete data into what data. 182 00:17:26,980 --> 00:17:33,970 So here I have a data MTF and same decision but if loop is coming for data is equal to do then this 183 00:17:33,970 --> 00:17:41,170 value is not initialized and this will be BD don't data from. 184 00:17:41,320 --> 00:17:52,360 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 185 00:17:52,360 --> 00:17:57,720 pass the columns and the columns we have are x. 186 00:17:57,880 --> 00:18:05,460 So here we have columns this on and is equal to x. 187 00:18:05,590 --> 00:18:11,190 So here we have no then the customized data. 188 00:18:11,240 --> 00:18:22,490 Last thing we need to do and if not else and if what's the barometer the data data equally will treat 189 00:18:23,900 --> 00:18:28,700 like user need to select a file from his computer and on to upload that one here. 190 00:18:29,570 --> 00:18:32,280 So what should be done in that case. 191 00:18:32,300 --> 00:18:33,660 So this will be very simple. 192 00:18:33,890 --> 00:18:45,590 You just take a file variable that will be input and that input will be like and the file name. 193 00:18:45,650 --> 00:18:47,060 Simple as that. 194 00:18:47,540 --> 00:18:56,130 And then we will use that file to upload here just BBDO greed underscored CSC. 195 00:18:56,510 --> 00:19:00,730 They we had the sun and bust that particular name. 196 00:19:01,570 --> 00:19:03,180 So actually what we are doing here. 197 00:19:03,190 --> 00:19:07,940 We are just simply passing this thing tape stops. 198 00:19:08,050 --> 00:19:09,670 We like when we are uploading this one. 199 00:19:09,820 --> 00:19:18,360 What we have done we have first taken this input like that we should anticipate sell here. 200 00:19:18,760 --> 00:19:24,110 We have just first taken an input that is fighting like Vonage and that one. 201 00:19:24,190 --> 00:19:35,350 And here I have tapes dope CSP hit enter and when you've been fine you will have disk dips NCIC and 202 00:19:35,350 --> 00:19:37,070 this one is now a screen. 203 00:19:37,430 --> 00:19:46,750 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 204 00:19:46,900 --> 00:19:54,790 I have X dot head I have deep stored CSB what I can also do here I can just pass this thing that is 205 00:19:54,790 --> 00:19:56,020 fine. 206 00:19:56,020 --> 00:19:58,600 Run run I will again get the output. 207 00:19:59,980 --> 00:20:01,860 So I hope you get it. 208 00:20:01,870 --> 00:20:02,700 What I have done here. 209 00:20:03,040 --> 00:20:05,480 I have just lost now find it. 210 00:20:05,950 --> 00:20:12,670 It will take the user's input that is defiling to store CSB then it will pass this one into a variable 211 00:20:12,730 --> 00:20:18,850 X that is BD to crude s we find that file will be deleted from the computer. 212 00:20:19,180 --> 00:20:26,320 Now we have that file in no variable X we will create our data frame with that file no that is D 7 and 213 00:20:26,320 --> 00:20:35,410 then BD don't data frame make sure the end f of capital that adviser will get data and then pass just 214 00:20:35,480 --> 00:20:42,330 X now defined is created into data offering baby had this and also data. 215 00:20:42,580 --> 00:20:43,540 So done with that. 216 00:20:44,680 --> 00:20:49,830 So this is how you can create the data now. 217 00:20:49,880 --> 00:20:58,960 Last thing in case you can use it and does something else like 4 5 6 7 and in that case just print data 218 00:20:59,030 --> 00:21:21,770 frame creation failed please and to some thing oh please enter in between 1 2 3 and try again. 219 00:21:22,090 --> 00:21:26,940 So this time I'm not using any random syntax like that a sector. 220 00:21:26,980 --> 00:21:30,900 We are going to do something on all the things properly. 221 00:21:31,090 --> 00:21:34,050 So try again maybe go with that one. 222 00:21:34,090 --> 00:21:43,710 Now we have created this one no data famous created so it will just return that D7 to the functions 223 00:21:43,710 --> 00:21:44,000 out. 224 00:21:44,630 --> 00:21:45,500 So then we determine 225 00:21:48,370 --> 00:21:51,110 shifted on the vehicle the descent funding. 226 00:21:51,130 --> 00:21:53,440 So what created the function is running now. 227 00:21:53,590 --> 00:21:58,080 We can test that one also does Tia shifted. 228 00:21:58,150 --> 00:22:00,380 If I choose one and it random. 229 00:22:00,940 --> 00:22:09,450 And here if I print the F1 shifted and David go with that one he have a fight. 230 00:22:09,630 --> 00:22:11,530 Make sure to check everything. 231 00:22:11,620 --> 00:22:13,270 Otherwise it will get added in the lost end. 232 00:22:13,300 --> 00:22:14,250 It's hard to find it. 233 00:22:14,770 --> 00:22:19,810 So step by stick check the edges first random is working fine. 234 00:22:19,810 --> 00:22:28,210 Now we go for the customized one a B C D E columns have taken successfully. 235 00:22:28,210 --> 00:22:35,020 Now the values 2 3 3 2 2 plus joystick unsuccessfully second is again taken. 236 00:22:35,140 --> 00:22:39,230 Toad is again ticked on Dave we have the fourth one. 237 00:22:39,330 --> 00:22:40,850 Close the fingers. 238 00:22:40,860 --> 00:22:42,350 We didn't know to get any into here. 239 00:22:42,480 --> 00:22:45,180 David go with that Ben Dedmon. 240 00:22:45,180 --> 00:22:50,120 David go with Declan so a second step is also working fine. 241 00:22:50,130 --> 00:22:54,980 That is the customized data now the third and the last one. 242 00:22:55,150 --> 00:22:56,700 Keep stored CSP. 243 00:22:56,870 --> 00:22:59,930 DAVID GOODWIN No it's asking for the input. 244 00:23:01,140 --> 00:23:08,400 And this time every note CSC because that file is also at that location shifted on. 245 00:23:08,460 --> 00:23:09,170 David go. 246 00:23:09,230 --> 00:23:18,720 Declan so a data cell or and declared data function both are completely working fine and congratulations 247 00:23:18,720 --> 00:23:20,560 for building up to this point. 248 00:23:20,910 --> 00:23:29,410 Remove the unnecessary files and let me move to the next video creating the second step after this one. 249 00:23:29,490 --> 00:23:32,100 We have done to create data failure. 250 00:23:32,100 --> 00:23:35,850 Just input correctly now so thanks for watching. 251 00:23:35,850 --> 00:23:39,390 Soon the next video and I hope you enjoyed this video creating the data. 252 00:23:39,420 --> 00:23:44,910 This one is a little big video but I believe you are very excited and this is very interesting what 253 00:23:45,510 --> 00:23:46,450 you are not get. 254 00:23:47,200 --> 00:23:48,090 So thanks for watching. 255 00:23:48,190 --> 00:23:50,300 In the next video.