Aan de slagBegin gratis

Filling missing values

Finally, you can replace specific values directly. The finance team needs complete pricing data, but some products have missing prices marked as "N/A". Based on historical data, the average product costs around "10,99".

Deze oefening maakt deel uit van de cursus

Data Transformation with Polars

Bekijk cursus

Oefeninstructies

  • Replace "N/A" values in the "price" column with "10,99".

Interactieve oefening met praktijkervaring

Probeer deze oefening door deze voorbeeldcode aan te vullen.

# Replace missing prices with the estimated value
reviews.with_columns(
    pl.col("____").____("____","10,99")
)
Code bewerken en uitvoeren