I have a dataset where I have column fund/account/purchase/sell etc is the first line but I have to arrange the values below.
Input:
| Fund | account | amount | purchase | sell | buy |
| ABC | 123 | 489 | 562 | 58 | 456 |
| NLM | 154 | 456 | 314 | 54 | 23 |
| BC | 145 | 562 | 23 | 156 | 489 |
| Fund | account | purchase | buy | | |
| ABC | 1456 | 789 | 456 | | |
| GHL | 48 | 145 | 56 | | |
| Fund | account | amount | sell | | |
| HLK | 1546 | 231 | 235 | | |
The fund column will always be there while others will keep changing
Output:
| Fund | account | amount | purchase | sell | buy |
| ABC | 123 | 489 | 562 | 58 | 456 |
| NLM | 154 | 456 | 314 | 54 | 23 |
| BC | 145 | 562 | 23 | 156 | 489 |
| ABC | 1456 | | 789 | | 456 |
| GHL | 48 | | 145 | | 56 |
| HLK | 1546 | 231 | | 235 | |