I've got a data set with the number of men and women in each country in the world.
"country","sex","amount"
"Afghanistan","men","number"
"Afghanistan","women","number"
"Albania","men","number"
"Albania","women","number"...
I want to add the merge every pair of country rows, and erase the sex column, so that I'd end up with:
"country","amount"
"Afghanistan","number"
"Albania","number"
How do I add rows together in this way in Google/Open Refine?
forEach(value.split(','),a,a.toNumber()).sum()