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.

Key takeaways

Key takeaways

- [Instructor] Okay, so this concludes our section on aggregation. Aggregation is one of the critical things we need to do as analysts to generate summary reports and deliver insights. We want to use the .groupby() method to aggregate a DataFrame by specific columns. Remember, we can pass in a list of as many columns as we want. We also need to specify a column of values to aggregate and an aggregate function. We want to know how to work with multi-index DataFrames as well as reset them. Multi-index DataFrames are going to be created by default when grouping by more than a single column, or when we're starting to do multiple aggregations. It's also worth knowing how to access multi-index DataFrames, but they can add unnecessary complexity. So this is a bit of a preference of mine. Some analysts and data scientists swear by multi-index DataFrames, but I often find that for day-to-day analysis, they tend to just make things more difficult. Either way, it's good to have this knowledge…

Contents