From the course: Complete Guide to Analytics Engineering
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
CoderPad solution: Calculate averages with Python window functions
From the course: Complete Guide to Analytics Engineering
CoderPad solution: Calculate averages with Python window functions
- [Instructor[ All Right, here's the solution to this assessment. We're going to leverage pandas here, and create a new function called Analyze Penguins. We're going to start out by dropping any rows that are missing data for the sex column. We'll group by the species column. Then we create a new data frame with several aggregations. We have the Unique Islands column, that counts the number of unique values. We have the average Coleman length column that takes the mean of the Coleman length. We have the median flipper length column, which takes the median of the flipper length, and then we have the total body mass column that takes the sum of the body mass column. If you got that right. Good job. If you missed it, keep practicing. You'll get it eventually.
Contents
-
-
-
-
-
-
(Locked)
Analytical functions in pandas1m 13s
-
Grouping data in pandas7m 51s
-
(Locked)
Merging multiple data frames with pandas5m 12s
-
(Locked)
Creating new custom calculated columns with pandas4m 29s
-
(Locked)
Creating rolling averages with window calculations4m 30s
-
(Locked)
CoderPad solution: Calculate averages with Python window functions48s
-
(Locked)
-
-
-
-
-
-