Section 3. Chapter 6
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 explicit0. -
Return the updated Polars DataFrame.
Solution
Everything was clear?
Thanks for your feedback!
Section 3. Chapter 6
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat