1 00:00:00,330 --> 00:00:05,430 Welcome back for another class of our course about the complete introduction to science with the use 2 00:00:05,430 --> 00:00:07,510 of Python and many other tools. 3 00:00:07,990 --> 00:00:13,380 So in this class, we are going to learn some really interesting things that are khaleda that is called 4 00:00:13,380 --> 00:00:13,800 minging. 5 00:00:14,070 --> 00:00:19,400 So basically, this is an operation that you guys can perform with Banda's when you use it with Python 6 00:00:19,650 --> 00:00:21,480 and what it does exactly, it's pretty simple. 7 00:00:21,480 --> 00:00:29,370 It will simply convert your animal plenty of foul types into some other five steps. 8 00:00:29,370 --> 00:00:35,280 For example, for the purpose of this course, we are going to convert HTML and e-mail file as we file 9 00:00:35,580 --> 00:00:37,550 into an HTML file. 10 00:00:37,770 --> 00:00:39,400 So you'll see it's pretty simple. 11 00:00:40,170 --> 00:00:43,020 So before we even start, we need to create our CSB file. 12 00:00:43,710 --> 00:00:48,090 So I'll ask you guys to open up Excel and just create a small table that looks like this. 13 00:00:48,120 --> 00:00:53,070 So basically you need numbers, letters and you can write any words that you want. 14 00:00:53,670 --> 00:01:00,720 Just create a basic table and we can start like this to create Ursy as you file when it's all done really 15 00:01:00,720 --> 00:01:01,250 important. 16 00:01:01,260 --> 00:01:06,930 You need to see this file in kesby, so don't give it into Excel because if you do, it's not going 17 00:01:06,930 --> 00:01:08,130 to work so really important. 18 00:01:08,140 --> 00:01:09,120 Save it in C. 19 00:01:10,500 --> 00:01:10,870 All right. 20 00:01:11,280 --> 00:01:14,600 So when everything is done simply create yourself a folder. 21 00:01:14,610 --> 00:01:16,560 So be before even creating your file. 22 00:01:16,560 --> 00:01:22,920 You need to create a folder that you will see on your desktop because you will need to know where exactly 23 00:01:22,920 --> 00:01:26,580 your file is stored so that you can see the file is stored right here. 24 00:01:27,750 --> 00:01:28,140 All right. 25 00:01:28,150 --> 00:01:30,750 So what I want to do right now is pretty simple. 26 00:01:30,960 --> 00:01:36,980 We want to write down the lines of code that will help us convert this file into an e-mail file. 27 00:01:37,020 --> 00:01:39,720 So before we even start, we need to import Pande. 28 00:01:39,990 --> 00:01:41,250 So really important. 29 00:01:41,250 --> 00:01:47,010 Import this as all right when it's on. 30 00:01:47,010 --> 00:01:52,620 And the next thing that we need to do is a week or so before converting it, we need to ask Python to 31 00:01:52,620 --> 00:01:55,680 read our file and in this case, let's name it color. 32 00:01:55,860 --> 00:01:57,780 So we want to read color. 33 00:01:58,560 --> 00:01:58,890 All right. 34 00:01:58,890 --> 00:01:59,870 So treat our file. 35 00:01:59,880 --> 00:02:05,810 We're going to ask PDU panders to it, and here we can choose what type of file we want to. 36 00:02:06,030 --> 00:02:10,400 So here we have CLV, Excel and plenty of other file types that we can read. 37 00:02:10,950 --> 00:02:12,870 But we want to read a C as well. 38 00:02:13,140 --> 00:02:14,550 So it's going to be the first one. 39 00:02:15,600 --> 00:02:18,590 And then we need to write down the location of our file. 40 00:02:18,900 --> 00:02:22,000 So we need to know exactly where your file is located. 41 00:02:22,020 --> 00:02:26,490 So as I said, the file location should be somewhere, right? 42 00:02:26,620 --> 00:02:28,790 Should look something like this like here. 43 00:02:28,800 --> 00:02:34,470 So basically something like this, basically, as you can see there, it should look something like 44 00:02:34,470 --> 00:02:34,640 this. 45 00:02:34,890 --> 00:02:35,220 All right. 46 00:02:35,230 --> 00:02:36,950 So your file location should be here. 47 00:02:36,960 --> 00:02:39,150 So you just open up your folder here. 48 00:02:39,150 --> 00:02:45,390 You have your file location, then you simply add another tab like this and you write down your file 49 00:02:45,390 --> 00:02:45,600 name. 50 00:02:45,610 --> 00:02:47,280 So in this in my case, it's work. 51 00:02:47,400 --> 00:02:49,650 And don't forget at the end, right, Dot? 52 00:02:50,340 --> 00:02:54,100 Because if you don't do that, it's not going to work so really important. 53 00:02:54,120 --> 00:02:55,720 I forget that is idea. 54 00:02:56,670 --> 00:03:00,450 All right, then to be sure that everything works fine, you just need to run everything. 55 00:03:00,900 --> 00:03:06,690 And as you can see, if the process finished with exit code zero, this means that everything works 56 00:03:06,690 --> 00:03:07,230 perfectly. 57 00:03:07,770 --> 00:03:08,160 All right. 58 00:03:08,160 --> 00:03:13,000 So the next step would be converting our file into an HTML file. 59 00:03:13,080 --> 00:03:14,270 So how exactly do this? 60 00:03:14,280 --> 00:03:15,140 It's pretty simple. 61 00:03:15,450 --> 00:03:17,390 So we will write down our color. 62 00:03:17,400 --> 00:03:22,760 So basically, this is the name of our file dot to to what we want to convert it. 63 00:03:22,770 --> 00:03:27,150 So here we can choose what exactly what we want to convert it to HTML. 64 00:03:27,300 --> 00:03:31,880 So we'll write down to each HTML and how exactly want to name it. 65 00:03:31,890 --> 00:03:34,080 Let's say we want to name it nice colors. 66 00:03:34,260 --> 00:03:38,270 So in this case we'll just name it nice color. 67 00:03:39,060 --> 00:03:39,510 Here we go. 68 00:03:39,840 --> 00:03:46,080 Then we can run our file and if everything works fine, you guys should receive a text file right here. 69 00:03:46,530 --> 00:03:53,130 If you open up the text file, you will see here you will have all the HTML code linked with your file. 70 00:03:53,130 --> 00:03:58,340 So you can see if we go right there, you will find your HDMI, you will find your file. 71 00:03:58,350 --> 00:03:59,220 That should look like this. 72 00:03:59,460 --> 00:04:02,610 And this is the code that is linked with your file. 73 00:04:03,510 --> 00:04:03,840 All right. 74 00:04:03,850 --> 00:04:08,580 Next thing that we want to do, want to create a file, because this is a text file. 75 00:04:09,030 --> 00:04:14,580 So we will create an HTML filename it nice color one. 76 00:04:16,860 --> 00:04:19,960 When it's done will simply take all the code that we have here. 77 00:04:19,980 --> 00:04:24,060 So basically this is the code in each e-mail, we will copy everything. 78 00:04:25,510 --> 00:04:27,500 And will simply passed it here. 79 00:04:28,960 --> 00:04:32,170 So here we go, we have our e-mail file here. 80 00:04:32,980 --> 00:04:37,770 So basically when it's all done, you guys can run your code so you can choose your Web browser. 81 00:04:37,780 --> 00:04:40,360 In this case, I'm going to run it with Magilla. 82 00:04:42,850 --> 00:04:48,870 So you can see I run it right here and I have my top right there, so everything works fine and perfect. 83 00:04:49,300 --> 00:04:53,680 So let's just compare the two files, so let's compare the two tafsir. 84 00:04:53,920 --> 00:04:58,420 So basically, I have my top right here that I created and this is the top that have been generated 85 00:04:58,420 --> 00:04:59,680 as a cook. 86 00:05:00,220 --> 00:05:02,710 So as you can see, it's pretty much it's really cool. 87 00:05:02,860 --> 00:05:09,910 And I'm able to convert my CSB file into an HTML file with a simple line of code. 88 00:05:10,320 --> 00:05:10,840 Just can see. 89 00:05:10,840 --> 00:05:11,860 It's pretty interesting. 90 00:05:12,050 --> 00:05:15,340 Once again, what I'm doing right now is really basic level. 91 00:05:15,350 --> 00:05:17,830 So you guys should be able to do it. 92 00:05:18,130 --> 00:05:24,370 And that if this is just basic level, usually you can do some really cool stuff when you get more advanced 93 00:05:24,370 --> 00:05:25,510 and when you practice more. 94 00:05:26,300 --> 00:05:28,740 So I hope you guys like the band part. 95 00:05:29,080 --> 00:05:30,570 So it's a really good tool. 96 00:05:30,580 --> 00:05:34,840 And if you guys learn how to master it, you'll see there is really interesting things that you can 97 00:05:34,840 --> 00:05:35,220 do with it. 98 00:05:35,560 --> 00:05:35,910 So that's it. 99 00:05:35,910 --> 00:05:39,010 First class guys and see all in our next class.