I am using python 3.9 for below task. I have text file with following contents(input file);
heading1, heading2, heading3, heading4, heading5,
10, 15, 20, 30, 40
10, 14, 20, 20, 39
10, 15, 20, 10, 29
9, 3, 13, 12, 13
10, 14, 20, 2, 3
10, 15, 20, 10, 10
Now using python I am trying to make following new file(output file)
heading1, heading2, heading3, heading4, heading5,
10, 15, 20, 50, 79
10, 14, 20, 22, 42
9, 3, 13, 12, 13
Here in the second file(output file) I am comparing first three column(heading1,heading2 and heading3) and if these same values are presented in other rows I added the heading 4 and heading 5 and make unique row.