1 00:00:00,120 --> 00:00:08,090 Halaal, before going ahead into the session, let's have a quick recap of what we all have until now 2 00:00:08,280 --> 00:00:13,740 from data importing to data preprocessing, doing lots of analysis and doing lots of cleaning. 3 00:00:13,980 --> 00:00:18,450 And these all are meaningful inside this group that this box. 4 00:00:19,200 --> 00:00:20,640 What exactly is a trend? 5 00:00:20,820 --> 00:00:24,960 Or I can see what is a trend of the room prices per night or the year. 6 00:00:24,960 --> 00:00:27,120 And this is a departure that we have find. 7 00:00:27,420 --> 00:00:31,250 And this is a relationship which is exactly in the form of a pivot table. 8 00:00:31,620 --> 00:00:34,410 So we have performed all this analysis on data. 9 00:00:34,410 --> 00:00:36,420 So intersession we have this assignment. 10 00:00:36,840 --> 00:00:42,630 The very first part of the statement is how long do people prefer to stay at the hotel? 11 00:00:42,810 --> 00:00:47,830 You have to analyze this policy statement and at the end you have to come up with some visa. 12 00:00:47,850 --> 00:00:49,520 You have to come up with some insight. 13 00:00:49,830 --> 00:00:55,920 So I'm just going to say, let's see if I'm going to check what exactly is a preview of. 14 00:00:56,340 --> 00:01:03,030 And you will see this is my entire data, but you need some clean data because in this data, you have 15 00:01:03,030 --> 00:01:10,710 your valid booking as well as some cancel booking, but you just need your valid bookings to perform 16 00:01:10,710 --> 00:01:11,550 your analysis. 17 00:01:11,920 --> 00:01:13,620 So I'm going to say data. 18 00:01:13,620 --> 00:01:20,430 All let's say is underscore cancel equally close to zero. 19 00:01:20,430 --> 00:01:23,550 And let's say I'm going to say this is my fault. 20 00:01:23,760 --> 00:01:30,240 What I have to do, I have to just pass this filter in my data frame and let's say I have to store this 21 00:01:30,240 --> 00:01:30,750 in my data. 22 00:01:30,750 --> 00:01:36,360 Assume that's a digital frame is nothing but my clean underscore data that just executed. 23 00:01:36,600 --> 00:01:41,340 And if I am going to call my head over there now, you will also. 24 00:01:41,640 --> 00:01:45,980 This is the data frame that you have to consider for your analysis. 25 00:01:46,080 --> 00:01:49,110 Let's say in this data frame, I'm going to create a new column. 26 00:01:49,110 --> 00:01:55,710 You will see here you have a column as it stays in the Cannex and it stays in weeknight, let's say 27 00:01:56,340 --> 00:02:01,920 here I'm going to say clean underscore data. 28 00:02:02,310 --> 00:02:04,740 All this is stays. 29 00:02:05,820 --> 00:02:13,380 Let me say that it stays in we can night and I have to do some summation or here's four that I have 30 00:02:13,380 --> 00:02:15,210 to use this operator after it. 31 00:02:15,210 --> 00:02:21,530 I'm going to say this is nothing but my staes underscore this week nights. 32 00:02:22,080 --> 00:02:26,130 Let's say very first I have to define some data frame. 33 00:02:26,130 --> 00:02:31,440 So I'm just going to say clean Alesco data of total nights. 34 00:02:31,980 --> 00:02:33,980 It is not total of special request. 35 00:02:34,230 --> 00:02:38,220 You have to define that column, so you have to just remove this. 36 00:02:38,220 --> 00:02:42,990 And here you have to say it is my total underscore nights. 37 00:02:43,230 --> 00:02:45,300 It's all up to you, whatever you want to create. 38 00:02:45,660 --> 00:02:48,810 And after it, what I'm going to do, I'm just going to execute it. 39 00:02:48,900 --> 00:02:50,250 And this is that warning. 40 00:02:50,250 --> 00:02:51,540 Just ignore this warning. 41 00:02:51,540 --> 00:02:57,420 This warning makes no sense at all because it just may be due to some anakonda issues or maybe some 42 00:02:57,420 --> 00:02:58,470 liability issues. 43 00:02:58,470 --> 00:03:04,350 And if you want to ignore this morning, you guys can import your warning module. 44 00:03:04,680 --> 00:03:06,360 And in this warning. 45 00:03:06,540 --> 00:03:15,200 So I would say from this warning, I have something which is known as I think of my filter warning. 46 00:03:15,210 --> 00:03:19,230 I have to import this filter warning. 47 00:03:19,410 --> 00:03:24,830 And in this filter warning, you have to say whatever warning that will come across your cell. 48 00:03:25,080 --> 00:03:28,350 You have to just ignore all this warning. 49 00:03:28,350 --> 00:03:31,320 So you have to just follow this, ignore here. 50 00:03:31,350 --> 00:03:33,810 Now all this stuff gets executed. 51 00:03:33,810 --> 00:03:41,010 And again, if you are going to again execute this now, you will see all your warning that disappeared 52 00:03:41,280 --> 00:03:41,930 after it. 53 00:03:41,940 --> 00:03:47,460 What we have to do, let's say I'm just going to say my cleaner's code DataDot had over there. 54 00:03:47,760 --> 00:03:54,500 Now you will observe over here a new column has been created, which is exactly my total on it. 55 00:03:54,530 --> 00:03:58,140 It is just because of these blocks of code that you have written over here. 56 00:03:58,350 --> 00:04:06,570 And let's say in this data frame, I need a count here with respect to different different total light. 57 00:04:06,720 --> 00:04:09,000 What exactly the count so far? 58 00:04:09,010 --> 00:04:12,510 This what I have to do, I have to call our group by. 59 00:04:12,520 --> 00:04:17,250 So I'm going to say clean the school data dot group by. 60 00:04:17,520 --> 00:04:23,760 And basically I have to call this group by on the basis of very first this total. 61 00:04:23,770 --> 00:04:24,020 Right. 62 00:04:24,030 --> 00:04:27,960 So here very first, I have to pass this to the line. 63 00:04:27,970 --> 00:04:31,500 So I'm going to say to nothing, but my daughter lives after it. 64 00:04:31,500 --> 00:04:36,930 What I have to do, I have to say it is exactly my hotel and I will do all this stuff. 65 00:04:36,930 --> 00:04:43,230 Then I have to aggregate something, let's say in this application I'm just going to call my counter 66 00:04:43,230 --> 00:04:43,890 operation. 67 00:04:43,890 --> 00:04:50,020 So just like you did, you will get all these text over here with respect to different, different or 68 00:04:50,020 --> 00:04:54,390 the light and all your different different types of city hotel or resort hotel. 69 00:04:54,660 --> 00:04:58,260 You all have some kind of stacks over here. 70 00:04:58,500 --> 00:04:59,790 Let's say I have to convert. 71 00:05:00,050 --> 00:05:00,740 Into some data. 72 00:05:01,310 --> 00:05:08,540 So for this, I'm just going to call my reset and the score index over here, and this is that data 73 00:05:08,540 --> 00:05:08,870 frame. 74 00:05:09,920 --> 00:05:12,570 Now, let's say I'm going to store it somewhere else. 75 00:05:12,600 --> 00:05:14,540 Let's say store it in ystem. 76 00:05:14,780 --> 00:05:17,900 And after it, let's see what I'm going to do. 77 00:05:17,900 --> 00:05:22,340 Let's say in this estate, I just need three columns for this. 78 00:05:22,340 --> 00:05:25,580 I have to call this I log in next location. 79 00:05:25,580 --> 00:05:30,380 And in this index location, I'm going to say I need my all the rules. 80 00:05:30,650 --> 00:05:38,180 And column wise, I am going to say I need zeroth index, false index and second index all the time, 81 00:05:38,180 --> 00:05:41,960 which says zero to three because three is excluded over here. 82 00:05:42,570 --> 00:05:44,140 So I have to store it somewhere else. 83 00:05:44,140 --> 00:05:46,020 So I'm going to say do nothing but my state. 84 00:05:46,580 --> 00:05:52,010 And on this day, I'm just going to call this had or they are just executed. 85 00:05:52,310 --> 00:05:59,030 And this is that beautiful texts, meaningful steps that you need, but still but still there is a hackle. 86 00:05:59,030 --> 00:06:01,670 Did you have to rename your column name? 87 00:06:02,060 --> 00:06:04,100 So you have to rename this. 88 00:06:04,460 --> 00:06:08,180 This is cancel to let's say some number of it says. 89 00:06:08,390 --> 00:06:13,130 So here I am going to say is t dot rename. 90 00:06:13,130 --> 00:06:20,720 You have a function for this and here you have to say columns and here you have to pass a dictionary 91 00:06:21,260 --> 00:06:22,640 and here it is. 92 00:06:22,640 --> 00:06:25,210 Nothing but mine is cancer. 93 00:06:25,340 --> 00:06:33,150 I have to rename it to basically number of is stays number of the states. 94 00:06:33,540 --> 00:06:39,530 Now what I have to do, I have to store it in let's say it's ten so just execute it. 95 00:06:39,540 --> 00:06:47,570 Now if again I'm going to call my head over here, you will see all of this stuff gets modified and 96 00:06:47,870 --> 00:06:49,260 manipulated over here. 97 00:06:49,370 --> 00:06:55,630 Now you just need some proper visual to represent this data frame to represent this data. 98 00:06:55,940 --> 00:07:03,620 So for this what I am going to do, I'm just going to say asanas dot dot plot over there and basically 99 00:07:03,620 --> 00:07:08,330 on x axis, I have to just pass this feature over. 100 00:07:08,630 --> 00:07:10,310 I have to just pass this one. 101 00:07:10,730 --> 00:07:19,170 Then I'm going to say on y axis, I have to pass this number of estates, which is exactly this one. 102 00:07:19,170 --> 00:07:21,260 And I have to pass this number of this test. 103 00:07:21,770 --> 00:07:25,720 And let's say I have to assign some parameter. 104 00:07:25,730 --> 00:07:29,870 It means on what basis I have to split my back plot. 105 00:07:30,470 --> 00:07:37,760 So in this WHU, I'm going to say I have to assign this one hand, if you will press shiftless over 106 00:07:37,760 --> 00:07:40,460 here, you will get the documentation of this function. 107 00:07:40,460 --> 00:07:44,590 Here you have a parameter, which is exactly how you order. 108 00:07:44,840 --> 00:07:47,300 So let's say my you order is nothing. 109 00:07:47,300 --> 00:07:51,950 But let's say very first I need my city hotel. 110 00:07:51,950 --> 00:07:57,940 So I'm going to say do nothing but my city underscore hotel after it. 111 00:07:57,950 --> 00:08:00,830 Let's say I just need my resort hotel. 112 00:08:00,830 --> 00:08:05,800 So I'm going to say it is nothing but my resort hotel. 113 00:08:06,470 --> 00:08:10,790 Make sure you don't have this underscore or they're in a similar way. 114 00:08:10,790 --> 00:08:14,720 You have to provide this in quotes as well. 115 00:08:15,140 --> 00:08:21,480 And similarly over here and after that you have to provide your data. 116 00:08:22,130 --> 00:08:28,160 So in this data frame, I'm going to say my data of nothing but just a step and just execute it and 117 00:08:28,160 --> 00:08:31,630 you will get your beautiful Barbot or whatever. 118 00:08:31,820 --> 00:08:35,300 But still, it looks some complex over here. 119 00:08:35,750 --> 00:08:38,630 So for this what you guys can do, you guys can. 120 00:08:38,630 --> 00:08:40,940 Let's just play with your window side. 121 00:08:40,980 --> 00:08:44,750 So I'm going to say VLT dot figure. 122 00:08:44,810 --> 00:08:47,960 And here you have a parameter, which is my fixie. 123 00:08:48,230 --> 00:08:50,000 And your phagocytes will be. 124 00:08:50,000 --> 00:08:50,780 Exactly. 125 00:08:50,780 --> 00:08:51,440 It's all up to you. 126 00:08:51,440 --> 00:08:52,580 Whatever witnesses you want. 127 00:08:52,590 --> 00:08:55,250 Next, I want the witness age of 20 Crossett. 128 00:08:55,520 --> 00:08:56,940 So just executed. 129 00:08:56,960 --> 00:09:00,260 So this is exactly the plot that we need. 130 00:09:00,440 --> 00:09:02,280 You will observe over here. 131 00:09:03,050 --> 00:09:10,190 This this blue this blue bar with respect to City Hotel, where is this orange is exactly with respect 132 00:09:10,190 --> 00:09:11,710 to your resort hotel. 133 00:09:11,720 --> 00:09:18,410 And you will see whenever you have this total number of 93, your city hotel is going to, then it means 134 00:09:18,710 --> 00:09:26,000 there are more number of people who are going to Baffler to stay in this in this city hotel, having 135 00:09:26,000 --> 00:09:27,250 that much number of nights. 136 00:09:27,680 --> 00:09:31,130 So that's the type of conclusion you can get from data. 137 00:09:31,550 --> 00:09:39,690 Since the second statement, we have to analyze what is exactly why bookings by my market segment. 138 00:09:39,980 --> 00:09:49,610 So here, let's say in this clean underscore data, if I'm going to call my column here, you have a 139 00:09:49,610 --> 00:09:56,610 column name as a market underscore segment, which is exactly this one. 140 00:09:56,620 --> 00:09:59,060 So let's see what I'm going to do. 141 00:09:59,060 --> 00:09:59,630 I'm just going. 142 00:09:59,700 --> 00:10:11,130 To say this clean underscore data, all this one dot value underscore code to get a count of each and 143 00:10:11,130 --> 00:10:15,600 every category available inside this market segment, you will observe over here. 144 00:10:15,930 --> 00:10:19,600 This online has the highest count available over here. 145 00:10:20,010 --> 00:10:23,430 So let's say I have to represent the state in the form of pie charts. 146 00:10:23,780 --> 00:10:26,490 So for this, I'm just going to say be stopped by. 147 00:10:26,700 --> 00:10:28,740 Either you can you do the math or what? 148 00:10:28,860 --> 00:10:29,660 It's all up to you. 149 00:10:30,000 --> 00:10:38,670 And in this pie, I'm going to say my data frame is nothing but my Penasco data and my values will be 150 00:10:38,670 --> 00:10:44,250 nothing but just this one, because this will exactly be my values. 151 00:10:44,640 --> 00:10:47,340 So here I am going to say this will determine my values. 152 00:10:47,700 --> 00:10:51,420 And after it, I have a named parameter in this name. 153 00:10:51,870 --> 00:10:54,630 I just need my name to access names. 154 00:10:54,630 --> 00:10:59,640 You have to call this index order after it, you have to assign some title. 155 00:10:59,670 --> 00:11:09,450 So I'm going to say my title is nothing, but let's say Bookings per Marcato segment, bookings per 156 00:11:09,450 --> 00:11:10,530 market segment. 157 00:11:11,160 --> 00:11:16,890 And what you have to do, let's say I'm just going to execute it now. 158 00:11:16,890 --> 00:11:21,810 You will see this is that beautiful stats that you exactly need. 159 00:11:22,050 --> 00:11:29,610 You will observe, hear this already is going to dominate on each and every category of market segment. 160 00:11:29,610 --> 00:11:38,730 And almost almost 50 percent, almost 50 percent of the bookings are going to be fulfilled in this online 161 00:11:38,730 --> 00:11:38,930 rate. 162 00:11:38,980 --> 00:11:45,660 So that's the type of analysis, that type of conclusion and inferences you can fact from this Veysel 163 00:11:45,660 --> 00:11:46,420 annual data. 164 00:11:47,070 --> 00:11:48,730 So that's all about the session. 165 00:11:48,750 --> 00:11:50,430 Hope you love the session very much. 166 00:11:50,730 --> 00:11:51,420 Thank you. 167 00:11:51,540 --> 00:11:53,430 How nice to keep learning. 168 00:11:53,430 --> 00:11:54,210 Keep growing. 169 00:11:54,390 --> 00:11:55,170 Keep practicing.