1 00:00:00,980 --> 00:00:02,390 Welcome back. 2 00:00:02,390 --> 00:00:06,116 In this video, we will create our final dataset by merging and 3 00:00:06,116 --> 00:00:10,070 concatenating our original datasets into one large data frame. 4 00:00:11,120 --> 00:00:13,830 Let's look at our Ariana Grande data to see how to do it. 5 00:00:15,530 --> 00:00:21,815 We have one dataset with all Ariana's billboard data, 6 00:00:21,815 --> 00:00:25,297 ariana_bill_all.shape. 7 00:00:27,239 --> 00:00:33,467 We have one dataset with all of Ariana's Spotify data, 8 00:00:33,467 --> 00:00:36,919 ariana_spot_all.shape. 9 00:00:38,864 --> 00:00:43,428 So, let's merge these two combined datasets into our final dataset, 10 00:00:43,428 --> 00:00:45,720 which we'll name ariana_final. 11 00:00:46,870 --> 00:00:51,941 We want to perform a left outer join on the common columns name, 12 00:00:51,941 --> 00:00:54,056 artists and BB that week. 13 00:00:56,508 --> 00:01:00,100 Ariana_final 14 00:01:00,100 --> 00:01:08,940 = pd.merge(ariana_bill_all, 15 00:01:08,940 --> 00:01:15,569 ariana_spot_all, how = 16 00:01:15,569 --> 00:01:25,397 'left', On=['Name', 17 00:01:25,397 --> 00:01:32,686 'Artists', 'BB.Week'].) 18 00:01:36,250 --> 00:01:40,190 This final data frame should have the same number of rows as our left dataset. 19 00:01:41,270 --> 00:01:43,315 Let's run shape on the final data frame. 20 00:01:47,919 --> 00:01:50,735 Ariana_final.shape. 21 00:01:54,009 --> 00:01:55,390 And let's see the first few rows. 22 00:01:57,540 --> 00:02:01,024 Ariana_final.head (). 23 00:02:07,552 --> 00:02:08,770 Great. 24 00:02:08,770 --> 00:02:12,559 So my final challenge to you is to combine the full Billboard and 25 00:02:12,559 --> 00:02:15,140 Spotify datasets into one large dataset. 26 00:02:16,220 --> 00:02:22,180 Call this final data frame bill_spot_final. 27 00:02:22,180 --> 00:02:23,886 If you've completed the first two challenges, 28 00:02:23,886 --> 00:02:25,390 you're already more than halfway there. 29 00:02:26,660 --> 00:02:27,690 Try it. 30 00:02:27,690 --> 00:02:29,830 I'll show you my solution when you're done. 31 00:02:29,830 --> 00:02:30,330 See you soon.