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
From the course: Data Analysis with Python and Pandas
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
DataFrame basics4m 20s
-
(Locked)
Creating a DataFrame4m 59s
-
(Locked)
Challenge: DataFrame basics53s
-
(Locked)
Solution: DataFrame basics1m 46s
-
(Locked)
Exploring DataFrames: Heads, tails, and sample3m 35s
-
(Locked)
Exploring DataFrames: Info and describe8m 20s
-
(Locked)
Challenge: Exploring a DataFrame3m 12s
-
(Locked)
Solution: Exploring a DataFrame4m 3s
-
(Locked)
Accessing DataFrame columns4m 53s
-
(Locked)
Accessing DataFrame data with .iloc and .loc6m 6s
-
(Locked)
Challenge: Accessing DataFrame data1m 18s
-
(Locked)
Solution: Accessing DataFrame data3m 23s
-
(Locked)
Dropping columns and rows5m 54s
-
(Locked)
Identifying and dropping duplicates7m
-
(Locked)
Challenge: Dropping data1m 1s
-
(Locked)
Solution: Dropping data2m 38s
-
(Locked)
Missing data3m 17s
-
(Locked)
Challenge: Missing data51s
-
(Locked)
Solution: Missing data2m 13s
-
(Locked)
Filtering DataFrames4m 29s
-
(Locked)
Pro tip: The query() method4m 15s
-
(Locked)
Challenge: Filtering DataFrames1m 29s
-
(Locked)
Solution: Filtering DataFrames6m 46s
-
(Locked)
Sorting DataFrames6m 53s
-
(Locked)
Challenge: Sorting DataFrames44s
-
(Locked)
Solution: Sorting DataFrames2m 45s
-
(Locked)
Renaming and reordering columns3m 10s
-
(Locked)
Challenge: Renaming and reordering columns54s
-
(Locked)
Solution: Renaming and reordering columns3m 18s
-
(Locked)
Arithmetic and Boolean column creation6m 22s
-
(Locked)
Challenge: Arithmetic and Boolean columns1m 40s
-
(Locked)
Solution: Arithmetic and Boolean columns3m 58s
-
(Locked)
Pro tip: Advanced conditional columns with select()5m 59s
-
(Locked)
Challenge: The select() function1m 46s
-
(Locked)
Solution: The select() function3m 34s
-
(Locked)
The map() method4m 24s
-
(Locked)
Pro tip: Multiple column creation with assign()8m 19s
-
(Locked)
Challenge: map() and assign()1m 24s
-
(Locked)
Solution: map() and assign()2m 38s
-
(Locked)
The categorical data type5m 31s
-
(Locked)
Type conversion1m 37s
-
(Locked)
Pro tip: Memory usage and data types6m 2s
-
(Locked)
Pro tip: Downcasting numeric data types4m 58s
-
(Locked)
Challenge: DataFrame data types1m 24s
-
(Locked)
Solution: DataFrame data types3m 19s
-
(Locked)
Key takeaways1m 33s
-
(Locked)
-
-
-
-
-
-
-