(upbeat music)
- [Instructor] Let's finish up this chapter with,
yep, you guessed it, a programming challenge.
For this challenge, we're going to use pandas along
with the data in the financial sample Excel file
to create a summary of some of the data.
So I'm going to run my finished code to show you
what the result should look like.
So here in my finished folder,
I'm going to run this in my terminal,
and when I do that,
we can see that financial sample has now been modified.
So let's go ahead and open that in Excel.
All right, so you can see that the SalesData sheet
and Sheet2 are still there,
but there's a new summary sheet
that contains the gross sales
and profits for each product in the main worksheet.
So each of these cells is the sum of these columns here.
So we have the gross sales,
and then we have profit right here.
So for each one of the products,
I'm summing up all the gross sales
and the profits for each one
and summarizing the data in this summary sheet.
So for your challenge,
you're going to write a Python program
to calculate these values
and then add the new worksheet to the existing example file,
all using pandas.
And we covered pretty much everything you need to know
how to do this during the chapter,
so feel free to refer to the earlier videos
if you need a refresher on how to do this.
I will give you some small hint.
You'll need to look at the documentation
for data frame on how to specify column headers.
So that's your hint.
So go ahead and take some time here
to try out this challenge
and I'll be back in the next video to explain my solution.