Move from Excel to Python with Pandas Transcripts
Chapter: Case study walk through: Sales commissions
Lecture: Product commission variable amounts

Login or purchase this course to watch this video and the rest of the course contents.
0:00 up until now, we've just used one commission re.
0:02 But since we know our business,
0:04 we know that we don't need to do as much work to sell products through the
0:08 partner and reseller spaces. So maybe we should adjust those commissions down.
0:13 So let's set a new partner rate these air to starting values,
0:17 and we'll do some analysis to see how this impacts air total commissions.
0:25 Now we've added the commission rates so that we can modify it for each transaction.
0:30 And here's the commission rate. Now we want to update it where the customers are
0:34 partners or resellers. It's a type of there where their partners or resellers and apply
0:45 that lower commission rate and see how it changes the total commissions we need to build
0:50 a Boolean. Siri's identify which transactions are partners in which our resellers,
0:55 in which a reto. So let's start with that.
1:03 So to refresh your memory about what we've done here.
1:05 If you look at partners, we now have a true false list of all of
1:10 those values that our partners are all those transactions,
1:13 their partners. So now that we have that true false list,
1:16 let's go ahead and update our data frame so that those transactions can have the lower
1:23 commission rate. Now we have the new rates,
1:28 and because all of these top transactions are retail,
1:32 it's not showing up. But it is in there.
1:34 If we want to see what the rates are,
1:36 let's just do a quick check.
1:38 So now we can see that we do have variable rates in here.
1:42 The final step is we need to actually calculate the commission's.
1:46 So now we have a commission rate and we multiply that by the invoice total to
1:51 get the new commission. So we have a dynamic model now that will give us
1:57 a different calculation for the commission.
1:59 So let's check that. See now or commissions are 565,000 versus one million,
2:07 which makes sense because we lower those rates.
2:09 Now let's see what the impact was on our total commissions paid.
2:14 We already did that calculation. Copy this down here.
2:21 I'm also gonna add margins equal true to show totals.
2:28 So now we can see that the commission's have come down for Tiner and sudden,
2:33 but they've also come down quite a bit for Malcolm immunised.
2:36 So we still have this discrepancy.
2:38 So we've created some room in our commission values,