Search this site
Embedded Files
AIMD GPDS Courses
  • Home
  • Courses
  • Contact
AIMD GPDS Courses
  • Home
  • Courses
  • Contact
  • More
    • Home
    • Courses
    • Contact

日本語  ❯

Lesson 3    ❮    Lesson List    ❮    Top Page

3.1  Arithmetic Operations

3.2  Handling Missing Data

3.3  Discretization

3.4  Statistics

❯  3.5  Filtering

⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺
EXPECTED COMPLETION TIME
❲▹❳  Video   7m 57s
☷  Interactive readings   5m

Filtering Out Using Boolean Functions and Aggregation

As we have learned before, boolean conditions can be used to filter out some conditions, both in DataFrame object and Groupby object.

We will combine that using aggregation function. 

In this example, we will find the 'AIRLINE' where its average 'DEP_DELAY' is higher than the average 'DEP_DELAY' of all flights.

Filtering Out DataFrame using filter on GroupBy object

In Lesson 1.4, we learned that filter can be used on DataFrame object to select the necessary columns. 

When the filter method is used on the GroupBy object, it will return a copy of a DataFrame excluding filtered elements. 

©2023. All rights reserved.  Samy Baladram,
Graduate Program in Data Science - GSIS - Tohoku University
Google Sites
Report abuse
Page details
Page updated
Google Sites
Report abuse