CommencerCommencer gratuitement

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".

Cet exercice fait partie du cours

Data Transformation with Polars

Afficher le cours

Instructions

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

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Replace missing prices with the estimated value
reviews.with_columns(
    pl.col("____").____("____","10,99")
)
Modifier et exécuter le code