# How to deal with missing data for only some categories

Or in other words, data for category A is irrelevant for category B. So it is not present, how can imputing missing data distort/effect learning models broadly. I can't find any logic how to deal with this relative data. So I am sorry that I don't show any effort.

In the following example, geographical zone is only present for Gaz entries.

Data sample:

• Depends on what's your task. What do you want to do with the data? Add more info in the question! – Francesco Pegoraro Sep 20 '18 at 21:36
• show cross-table produit and zone. because your problem is not clear yet. – parvij Oct 21 '18 at 4:56

This means that the presence or not of entries in zone can be derived from the column Produit.
Because the values aren't missing completely at random, normal imputation techniques (e.g. fill with the most common value) shouldn't be applied. Instead I'd recommend treating the missing values as their own category. Just create a category (let's say not available) and fill the missing with this value. From a data science view this makes more sense.
• Missing Not At Random (MNAR) really makes sense, but in this specific case, I'm afraid making "not available" adds information, which distort real life state that learning data is trying to represent, because of the following: Zone is saying something about Produit, when it's gaz, but saying nothing about it when it's elec. Saying not available creates another categorical value that says something, in the same level of importance of other values. So I am not fully agreeing on how to deal with Missing Not At Random (MNAR) in this case – bacloud14 Sep 19 '18 at 23:02