How can I count the number of the missing values in a row?
Find more posts tagged with
Sort by:
1 - 2 of
21

Telcontar120
New Altair Community Member
Here is one simple way to do this using loops.
But I seem to recall this coming up in a prior thread, @mschmitz was there a more elegant way of doing this? Did you create an operator or option in the toolbox for this? If so, I couldn't find it.
Hi @dodi55, @Telcontar120,
[edit: I just realized that this is totally wrong ;-). The operator does not calculate this attribute, it is just created in the tutorial process of the operator. The tutorial process also uses loop attributes as @Telcontar120 is using. So I don't know of a better method. You may still want to have a look into the operator if you want to filter Examples depending on the number of missings per Example.]
The "Filter Examples with Missing Values" operator from the Operator Toolbox extension does the trick. The actual goal of the operator is to remove Examples (=rows) with more than a specific number of missing attributes (this can be configured). But it also adds a new attribute with the number of missing attributes for each row. If you set the filter method to "keep all" (and maybe include special attributes, if you want to count them too), it is exactly what you are looking for.
Best regards,
Fabian
[edit: I just realized that this is totally wrong ;-). The operator does not calculate this attribute, it is just created in the tutorial process of the operator. The tutorial process also uses loop attributes as @Telcontar120 is using. So I don't know of a better method. You may still want to have a look into the operator if you want to filter Examples depending on the number of missings per Example.]
The "Filter Examples with Missing Values" operator from the Operator Toolbox extension does the trick. The actual goal of the operator is to remove Examples (=rows) with more than a specific number of missing attributes (this can be configured). But it also adds a new attribute with the number of missing attributes for each row. If you set the filter method to "keep all" (and maybe include special attributes, if you want to count them too), it is exactly what you are looking for.
Best regards,
Fabian