From the course: Data Analysis with Python and Pandas

Unlock this course with a free trial

Join today to access over 25,600 courses taught by industry experts.

Challenge: Filtering DataFrames

Challenge: Filtering DataFrames

- [Narrator] All right, everybody. 2 We've got a new email in from Chandler. 3 The subject line is Store 25 Deep Dive. 4 He writes us, "I need some quick research on store 25. 5 First, calculate the percentage of times all stores 6 had more than 2000 transactions. 7 Then calculate the percentage of times store 25 8 had more than 2000 transactions, 9 and calculate the sum of transactions on these days. 10 Finally, sum the transactions for stores 25 and 31 11 that occurred in May or June 12 and had less than 2000 transactions." 13 And so if we take a look at our results preview, 14 the percentage of times all stores had more than 2000 15 transactions was about 27%. 16 The percentage of times store 25 had more than 2000 17 transactions was about 3.4, 3.5%. 18 The sum of transactions on those days was 144,900. 19 And then we have a pretty complex filter for our 20 third bullet, and the sum of those transactions was 644,910. 21…

Contents