STAT C100 Lecture Notes - Lecture 3: Amortized Analysis, Aggregate Function

65 views2 pages
13 Oct 2018
School
Department
Course
Professor

Document Summary

Goals for today: discuss aggregation operations, groupby, pivot. Identifying/dealing with ugly data: operations for identifying with null or strange values, operations for modifying data frames, more case study. If we call groupby on a series: the resulting output is a seriesgroupby object, the series that are passed as arguments to groupby must share an index with the calling series. Seriesgroupby objects can then be aggregated back into a series using an aggregation method. If we call groupby on a dataframe: the resulting output is a dataframegroupby object. Dataframegroupby objects can then be aggregated back into a dataframe or a series using an aggregation method. Most of the built-in handy aggregation methods are just shorthand for a universal aggregation method called agg: example, . mean() is just . agg(np. mean). If we group a series (or dataframe) by multiple series and then perform an aggregation operation, the resulting series (or dataframe) will have a multiindex.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related textbook solutions