"Fill Missing Values Based on other Attributes"

joshhazel
joshhazel New Altair Community Member
edited November 5 in Community Q&A
I am in the data pre-processing stage still.
I have a data set like such:
age  class   sex
10     1st     male
25     2nd    female
40     3rd     male
There are other attributes that had missing values but I have used the missing operator "average" feature to fill them in.  However, the "age" attribute I would like to fill in missing data based on other columns, that is find out the average age of 1st class + male and apply that to to the missing,  or 2nd class + female, etc.   However using the missing operator there doesn't appear to be much leeway in options other than things like "average" etc.

How can I make my dream become reality?  

Answers

  • MariusHelf
    MariusHelf New Altair Community Member
    Use the Generate Attributes operator, and replace the age attribute with a formula similar to this: if(missing(age), replacement_expression, age)
    Replace replacement_expression with an expression matching your needs.

    Best regards,
    Marius