I have column/feature in my dataset showing years a person has been married "years_married". Since not every person is married there are NaN fields.
It does not make sense to fillna(0) "years_married" since 0 would mean the person just married.A mean imputation also doesnt make sence.
What is the best way to use this feature?
I thought about creating a second feature like "is_married" and using fillna(0) on the "years_married" and then hoping that the decision tree would understand the combination is_married=0 and years_since_married=0
Is solution ok, are there good solutions?