+-------+----------+------+------+
| | | | |
| Pid | Points | X | y |
| | | | |
+-------+----------+------+------+
| | | | |
| 1 | 0 | 10 | 10 |
| | | | |
+-------+----------+------+------+
| | | | |
| 1 | 1 | 12 | 12 |
| | | | |
+-------+----------+------+------+
| | | | |
| 1 | 2 | 40 | 30 |
| | | | |
+-------+----------+------+------+
| | | | |
| 1 | 3 | 31 | 12 |
| | | | |
+-------+----------+------+------+
| | | | |
| 1 | 4 | 21 | 24 |
| | | | |
+-------+----------+------+------+
File Format:
xyz.txt ---->
10 12 40 31 21
10 12 30 12 24
So what I want a simple python script that can select X column values based on Points and insert them into text file as row 1 with space between then. similarly for Y column but place them in row 2.
Can someone help me with this. Thanks