Which is the most effective way to sum data in the DataTable by a given criteria?
I have the following table:
KEY_1
KEY_2,
VALUE_1,
VALUE_2
Input:
01101, P, 2, 3
01101, F, 1, 1
01101, P, 4, 4
10102, F, 5, 7
Desired output (new DataTable):
01101, P, 6, 7
01101, F, 1, 1
01101, SUM, 7, 8
10102, F, 5, 7
10102, SUM, 5, 7
I need efficient algorithm, because I have 10k rows and 18 columns in a DataTable.
Thank you.