Adding row values for all colums

Hi guys

what is the best way how to add the vlues from the NumPix colums based on the value for the CentroidTime?

Example: The first 2 rows have the entry 0 --> the two values for the columns NumPix shlould be added together (sum) and places in a new table. The resulting table should habe the same columns, but only contain the summarized values.

image

Hi there!

Use GroupBy node. Group Column is CentroidTime and Aggregation is sum on Num Pix column. Also chose for Column Naming Keep original name(s). That should do the trick if I understood what are you trying to do.

Br,
Ivan

Hmmm …

So I want to have a table where Row1 and Row2 --> both Time=1 will be aggregated into on table, which two columns (CentroidTime and NumPix).

But the value for NumPix in the final table should be the sum of two values, where the CentroidTime = 0.

I tried to do that by GroupBy but could not figure it out.

Hi!

Here is workflow attached. Check it out. I took only first 6 rows from your input table.
2019_04_02_GroupBy_Example.knwf (8.3 KB)

If any questions feel free to ask.

Br,
Ivan

1 Like

Thx. Now I got it.

1 Like

Glad it helped :slight_smile:
Ivan

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.