BaşlayınÜcretsiz Başlayın

Replace missing values with a fixed value

Given a basetable that has a predictive variable "total_donations", indicate the total amount of donations made by each donor in the population. If a value is missing for this predictive variable, it means that this is a new donor that did not make any donations yet. In this case, logical reasoning can be used to know by which value we should replace missing values.

Bu egzersiz

Intermediate Predictive Analytics in Python

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Assign the replacement value for missing values to replacement.
  • Replace missing values in the column total_donations by this replacement.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Missing values replacement
replacement = ____

# Replace missing values by the appropriate value
basetable["total_donations"] = ____["____"].____(____)
Kodu Düzenle ve Çalıştır