How to combine numerical columnar data in Python?
<p>I am a beginner at Python and I have no idea how to do the following:</p>

<p>I have a text file of numerical data in this form:</p>

<pre>  
1461.5  5   9   -18 32
1462    21  5   -6  32
1462    5   4   -23 32
1462.5  17  6   -7  30
1464    11  6   -14 31
1464    8   2   -22 32
1464.5  9   5   -17 31
1465    6   16  -7  29
1467    9   6   -17 32
1467.5  14  9   -8  31
1469.5  13  5   -12 30
1469.5  14  10  -7  31
1471    15  7   -9  31
1471    12  8   -10 30
1471.5  13  11  -7  31
1472    27  4   -1  32
1472    7   13  -8  28
1472    8   8   -14 30</pre>

<p>I would like to find out how to identify rows that have the same value in the first column, add the corresponding items in the other columns, and remove the duplicate entries in the first column so that the resulting output looks like this:</p>

<pre>
1461.5  5   9   -18 32
1462    26  9   -29 64
1462.5  17  6   -7  30
1464    19  8   -36 63
1464.5  9   5   -17 31
1465    6   16  -7  29
1467    9   6   -17 32
1467.5  14  9   -8  31
1469.5  27  15  -19 61
1471    27  15  -19 61
1471.5  13  11  -7  31
1472    42  25  -23 90</pre>

<p>If it would make things less complicated, all the numbers in the first column could be rounded into integers ahead of time (it will have little effect on the subsequent computations).</p>

<p>Note: The actual text file contains 23,000 rows. The values in the first column are in ascending order.</p>

<p>Thanks,
Adam</p>
