1 00:00:00,000 --> 00:00:05,001 (upbeat music) 2 00:00:05,001 --> 00:00:06,009 - [Instructor] Let's finish up this chapter with, 3 00:00:06,009 --> 00:00:09,007 yep, you guessed it, a programming challenge. 4 00:00:09,007 --> 00:00:12,003 For this challenge, we're going to use pandas along 5 00:00:12,003 --> 00:00:15,007 with the data in the financial sample Excel file 6 00:00:15,007 --> 00:00:19,001 to create a summary of some of the data. 7 00:00:19,001 --> 00:00:21,003 So I'm going to run my finished code to show you 8 00:00:21,003 --> 00:00:23,006 what the result should look like. 9 00:00:23,006 --> 00:00:26,006 So here in my finished folder, 10 00:00:26,006 --> 00:00:31,008 I'm going to run this in my terminal, 11 00:00:31,008 --> 00:00:32,007 and when I do that, 12 00:00:32,007 --> 00:00:36,007 we can see that financial sample has now been modified. 13 00:00:36,007 --> 00:00:42,000 So let's go ahead and open that in Excel. 14 00:00:42,000 --> 00:00:45,004 All right, so you can see that the SalesData sheet 15 00:00:45,004 --> 00:00:47,001 and Sheet2 are still there, 16 00:00:47,001 --> 00:00:49,005 but there's a new summary sheet 17 00:00:49,005 --> 00:00:53,008 that contains the gross sales 18 00:00:53,008 --> 00:00:59,001 and profits for each product in the main worksheet. 19 00:00:59,001 --> 00:01:03,005 So each of these cells is the sum of these columns here. 20 00:01:03,005 --> 00:01:06,005 So we have the gross sales, 21 00:01:06,005 --> 00:01:09,005 and then we have profit right here. 22 00:01:09,005 --> 00:01:13,000 So for each one of the products, 23 00:01:13,000 --> 00:01:15,006 I'm summing up all the gross sales 24 00:01:15,006 --> 00:01:17,005 and the profits for each one 25 00:01:17,005 --> 00:01:21,004 and summarizing the data in this summary sheet. 26 00:01:21,004 --> 00:01:23,003 So for your challenge, 27 00:01:23,003 --> 00:01:25,004 you're going to write a Python program 28 00:01:25,004 --> 00:01:28,000 to calculate these values 29 00:01:28,000 --> 00:01:32,000 and then add the new worksheet to the existing example file, 30 00:01:32,000 --> 00:01:33,006 all using pandas. 31 00:01:33,006 --> 00:01:36,006 And we covered pretty much everything you need to know 32 00:01:36,006 --> 00:01:39,000 how to do this during the chapter, 33 00:01:39,000 --> 00:01:42,002 so feel free to refer to the earlier videos 34 00:01:42,002 --> 00:01:44,009 if you need a refresher on how to do this. 35 00:01:44,009 --> 00:01:47,002 I will give you some small hint. 36 00:01:47,002 --> 00:01:48,007 You'll need to look at the documentation 37 00:01:48,007 --> 00:01:52,009 for data frame on how to specify column headers. 38 00:01:52,009 --> 00:01:54,001 So that's your hint. 39 00:01:54,001 --> 00:01:55,007 So go ahead and take some time here 40 00:01:55,007 --> 00:01:57,001 to try out this challenge 41 00:01:57,001 --> 00:02:01,000 and I'll be back in the next video to explain my solution.