Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Handling Nulls | Strings, Dates, Missing Data
Data Wrangling with Polars
Section 3. Chapter 6
single

single

Challenge: Handling Nulls

Swipe to show menu

Task

Swipe to start coding

Implement the function handle_missing_scores(df: pl.DataFrame) -> pl.DataFrame.

  • Use the .with_columns() method to target the existing column named exactly "Price".

  • Apply the .fill_null(0) method to the column expression to swap missing entries with an explicit 0.

  • Return the updated Polars DataFrame.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 3. Chapter 6
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

some-alt