Replacing missing values with subgroup averages not total column averages
Hi all,
I would like to replace the missing values of attributes with their respective group average instead of
their column average, eg. : averages
state region widgets north south east west
florida south 5 8.5 3 9 8
california west 10
new york north 15
delaware east 8
georgia south 1
texas south ?
nevada west 6
arizona west ?
maryland east 10
mass. east ?
maine north ?
vermont north 2
Answers
Hello parisave,
You can aggregate by region and use the result to join back to the original where there are missing values.
Relatively complex - here's an example
regards,
Andrew
Hi,
an easier way to do it is to user Group Into Collection from operator toolbox extension. This enables you to do any subprocess with a group_by statement. An example is attached.
Cheers,
Martin
Dortmund, Germany