1 00:00:00,090 --> 00:00:07,080 Halaal, before we dive into this session, let's have a quick recap of what we all have done in all 2 00:00:07,100 --> 00:00:10,480 our previous session since the last session we have analyzed. 3 00:00:10,530 --> 00:00:17,190 This is exactly my trend for the room price per night for resort as well as for city hotels. 4 00:00:17,430 --> 00:00:21,830 And we have performed lots of analysis on data, which is exactly this box. 5 00:00:22,140 --> 00:00:28,410 We with nothing but my distribution of price of different different room categories with respect to 6 00:00:28,410 --> 00:00:31,560 my resort hotel as well as with respect to my city hotel. 7 00:00:32,010 --> 00:00:37,780 And we have this beautiful coral map as well and this beautiful pie chart as well. 8 00:00:38,160 --> 00:00:41,130 So in this session, what we have to do, we have this assignment. 9 00:00:41,490 --> 00:00:48,930 And the very first problem statement is we have to analyze a special request done by the customers. 10 00:00:49,290 --> 00:00:52,430 So let's hear let's see what I'm going to do over here. 11 00:00:52,740 --> 00:00:58,710 Let's say very first, I just need an overview of the frame, how exactly my data looks like. 12 00:00:58,710 --> 00:01:03,300 So I'm going to say nothing but just DataDot Haddo just executed. 13 00:01:03,300 --> 00:01:06,960 And this is exactly my data frame that I need. 14 00:01:07,330 --> 00:01:13,940 Now, what I am going to do, I'm just going to count the different different categories that exactly 15 00:01:13,950 --> 00:01:17,640 occurs in total number of special request for this. 16 00:01:17,640 --> 00:01:21,030 What I'm going to do, I'm just going to call this counterpart function. 17 00:01:21,030 --> 00:01:28,620 And here I have to just say data of total, which is exactly total underscore. 18 00:01:28,620 --> 00:01:30,390 You can press that as well. 19 00:01:30,690 --> 00:01:32,970 And this is exactly that feature that you need. 20 00:01:33,120 --> 00:01:38,730 And if you are going to execute it now, you will see this beautiful count plot over here. 21 00:01:38,760 --> 00:01:47,070 You will see five or has a list count, whereas the zero zero has the highest count. 22 00:01:47,070 --> 00:01:51,540 It means most of the customers are not going to give me some special request. 23 00:01:51,540 --> 00:01:57,050 Or you can say almost 50 percent of the bookings do not have any special request. 24 00:01:57,300 --> 00:02:00,200 So this is exactly that conclusion from this veto. 25 00:02:00,390 --> 00:02:07,260 So let's go ahead with our second problem, a statement in which we have to create a pivot table of 26 00:02:07,260 --> 00:02:14,700 our relationship between what exactly the relationship between this special request and this cancellation 27 00:02:14,700 --> 00:02:15,580 of the bookings. 28 00:02:16,080 --> 00:02:20,580 So what I'm going to do very first, let's hear let's say what I am going to do over here. 29 00:02:20,700 --> 00:02:28,050 I'm just going to say very first, I have to group my data on the basis of total number of especially 30 00:02:28,050 --> 00:02:29,160 good so far. 31 00:02:29,160 --> 00:02:33,090 This what I'm going to do, say I'm just going to check what definition columns you will see. 32 00:02:33,090 --> 00:02:35,140 These are all my different different columns. 33 00:02:35,580 --> 00:02:38,910 Now I'm just going to say data grabby. 34 00:02:39,120 --> 00:02:46,590 And here very first, I have to group my data on the basis of this total of special requests. 35 00:02:46,600 --> 00:02:47,940 I'm just going to copy paste. 36 00:02:47,940 --> 00:02:50,490 It's nothing fancy after it. 37 00:02:50,700 --> 00:02:56,850 I have to group my data again on the basis of this is cancel the feature here. 38 00:02:56,850 --> 00:03:00,000 I have to just pasted after it what I have to do. 39 00:03:00,000 --> 00:03:02,040 I have to aggregated for this. 40 00:03:02,040 --> 00:03:08,580 I'm going to say dot org and here whatever you have to pass, you have to pass in the form of dictionary. 41 00:03:08,940 --> 00:03:10,750 So I'm going to say here is my dictionary. 42 00:03:11,100 --> 00:03:17,820 So now what you need you need are what are my total number of customers, total number of customers 43 00:03:18,030 --> 00:03:25,950 that has this that has this zero special request that has this one number of special request with respect 44 00:03:25,950 --> 00:03:28,240 to this cancellation as well. 45 00:03:28,890 --> 00:03:32,300 So here I'm going to say let me let me just copy this. 46 00:03:32,310 --> 00:03:35,910 Let me just copy this and let me just based order. 47 00:03:36,240 --> 00:03:40,800 So on this, I have to basically call my column function. 48 00:03:40,810 --> 00:03:47,160 So here I'm going to say I have to just discount that said, if I'm going to execute it. 49 00:03:47,250 --> 00:03:52,850 Now, you see, this is a beautiful estates with respect to all of the things you will see when your 50 00:03:52,860 --> 00:03:59,070 total number of requests this month and why that is just cancel or not, then you have this much. 51 00:03:59,850 --> 00:04:03,720 Let's say let's say I have to create a pivot table of this. 52 00:04:04,170 --> 00:04:10,770 So what I'm going to do, I'm just going to select the very first I have to rename my column names. 53 00:04:11,220 --> 00:04:18,570 I have to rename my column names from this total of a special request to LATISM count. 54 00:04:18,570 --> 00:04:25,650 So for this, I'm going to say I have to just call this rhenium function, which is exactly in my PARNAS 55 00:04:25,650 --> 00:04:26,280 module. 56 00:04:26,430 --> 00:04:33,690 And here I have to say I have to pass my date in the form dictionary and I have to say a total of a 57 00:04:33,690 --> 00:04:35,190 special request. 58 00:04:35,490 --> 00:04:37,710 And after it you have to rename this. 59 00:04:37,830 --> 00:04:43,980 Let's say you have to rename it to my second column, whatever you want, whatever column name you want 60 00:04:43,980 --> 00:04:50,490 to assign, it's all up to you after what I'm going to do, like say I'm going to say I have to store 61 00:04:50,490 --> 00:04:51,570 all these things. 62 00:04:51,900 --> 00:04:59,070 So very first, I'm just going to say on this, I'm just going to call my honor stack over there to 63 00:04:59,070 --> 00:04:59,730 convert. 64 00:05:00,020 --> 00:05:07,470 All these trials in some type of pure, David, so just execute the sale and this is that beautiful 65 00:05:07,500 --> 00:05:14,750 steps that you exactly need that you will see over here, you will see over here with respect to that 66 00:05:14,750 --> 00:05:16,130 much number of customers. 67 00:05:16,130 --> 00:05:20,260 You have that much count who has this canceled booking. 68 00:05:20,270 --> 00:05:28,070 And this is those customers who did not have canceled booking and they did not give any special request 69 00:05:28,280 --> 00:05:29,910 to hotel staff. 70 00:05:30,020 --> 00:05:32,360 So this is exactly my relationship. 71 00:05:32,660 --> 00:05:33,800 What I need. 72 00:05:33,950 --> 00:05:36,170 Let's say I have to plot this data. 73 00:05:36,170 --> 00:05:38,900 So I'm going to say I have to store it somewhere else. 74 00:05:38,950 --> 00:05:40,970 I'm just going to store it and let it be looked. 75 00:05:41,250 --> 00:05:45,850 And if you are going to print your paper, you can print it as well after it. 76 00:05:45,870 --> 00:05:50,630 What I am going to do, I'm just going to say pivot, dot plot. 77 00:05:50,990 --> 00:05:55,100 And here I have a parameter which is exactly my kind parameter. 78 00:05:55,460 --> 00:06:01,100 And in this kind parameter I am going to say I just need my bar plot. 79 00:06:01,220 --> 00:06:03,680 So here you have to say just execute it. 80 00:06:03,860 --> 00:06:10,400 And this is that beautiful bar plot that you exactly need with respect to all these different, different 81 00:06:10,400 --> 00:06:14,210 special request and whether your booking is canceled or not. 82 00:06:14,750 --> 00:06:16,820 So this is that visual that you need. 83 00:06:16,820 --> 00:06:23,360 And from this visa, you can say it is just my relationship between my special request and my cancellation 84 00:06:23,720 --> 00:06:24,800 booking status. 85 00:06:25,010 --> 00:06:32,650 And you will observe over here almost half of the bookings without any special request have been canceled. 86 00:06:32,900 --> 00:06:38,340 And and in that half of them, almost another half of them have not been canceled. 87 00:06:38,810 --> 00:06:40,190 So that's a conclusion. 88 00:06:40,190 --> 00:06:44,810 That's a meaningful insight that you can get from this visual as well as from the stakeout. 89 00:06:45,230 --> 00:06:46,500 Hope you love the session. 90 00:06:46,520 --> 00:06:47,240 Thank you. 91 00:06:47,570 --> 00:06:49,460 How nice to keep learning. 92 00:06:49,460 --> 00:06:50,300 Keep growing. 93 00:06:50,720 --> 00:06:51,550 Keep practicing.