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   4m 53s
☷  Interactive readings   5m

Understanding Missing Data

In this example we make a small Series to see how missing data works. Note that missing data is represented by NaN.

Dropping Rows with Missing Values with Threshold

There are a few ways to filter out missing data. While you always have the option to do it by hand using isnull and boolean indexing, the dropna can be helpful. On a Series, it returns the Series with only the non-null data and index values.

Suppose you want to keep only rows containing a certain number of observations. You can indicate this with the thresh argument.

Filling in Missing Data

Rather than filtering out missing data, you may want to fill in the "holes" in any number of ways. Calling fillna with a constant replaces missing values with that value. You might also pass the mean or median value of a Series.

©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