Task: Data-transform-reshape (source dataset: Auto-Tables)

Given a table, predict what python pandas transformation may be needed on the given input table. Valid choices for transformation include: {"stack", "wide_to_long", "transpose", "pivot", "explode", "ffill", "subtitles"}. Note that each of these is a common Python Pandas operator. Some transformations can have parameters. Each transformation and its parameters are describe as follows.
 
- stack: collapse homogeneous cols into rows.
@param (int): stack_start_idx: zero-based starting column index of the homogeneous column-group.
@param (int): stack_end_idx: zero-based ending column index of the homogeneous column-group.
 
- wide_to_long: collapse repeating col-groups into rows.
@param (int): wide_to_long_start_idx: zero-based starting column index of the repeating col-groups.
@param (int): wide_to_long_end_idx: zero-based ending column index of the repeating col-groups.
 
- transpose: convert rows to columns and vice versa.
 
- pivot: pivot repeating row-groups into cols.
@param (int): pivot_row_frequency: frequency of repeating row-groups.
 
- ffill: fill structurally empty cells in tables.
@param (int): ffill_end_idx: zero-based ending column index of the columns to be filled.
 
- explode: convert composite cells into atomic values
@param (int): explode_column_idx: zero-based column index of the column to be exploded.
 
- subtitle: convert table subtitles into a column.
 
OUTPUT the predicted transformation name along with its parameters for the given INPUT table in a JSON, e.g., {"transformation": "stack", "stack_start_idx": 1, "stack_end_idx": 5}. If the input table needs multi-step transformations (e.g, ffill followed by stack), list JSON of each transformation sequentially in a list, e.g., [{"transformation": "ffill", "ffill_end_idx": 1}, {"transformation": "stack", "stack_start_idx": 1, "stack_end_idx": 5}]. No explanation is needed.

## Input:
| State/Loan Type               | Balance            | Interest Payments   | Principal Payments   | Total Payments     | Volume Weighted Avg Interest Rate     | Debt Waived   | Balance            |
|                               | 30/06/2017         |                     |                      |                    | (for 2017-18)                         |               | 29/06/2018         |
|                               |                    | '$'000              |                      |                    | %                                     |               |                    |
|                               | '$'000             |                     | '$'000               | '$'000             |                                       | '$'000        | '$'000             |
|:------------------------------|:-------------------|:--------------------|:---------------------|:-------------------|:--------------------------------------|:--------------|:-------------------|
| New South Wales Government    |                    |                     |                      |                    |                                       |               |                    |
| 0                             | 521047.68033000006 | 23231.52181         | 37418.22822          | 60649.75003        | 4.4586172603794259                    | 0.0           | 483629.4521100001  |
| 1                             | 1189.7793300000003 | 47.59117            | 112.42583            | 160.017            | 3.9999997310425606                    | 0.0           | 1077.3535000000006 |
| 2                             | 375999.35841       | 16919.971129999998  | 9791.89425           | 26711.865380000003 | 4.5000000004122347                    | 0.0           | 366207.46416       |
| 3                             | 898236.81807       | 40199.08411         | 47322.5483           | 87521.63240999998  | 4.4753324848533715                    | 0.0           | 850914.2697700001  |
| Queensland Government         |                    |                     |                      |                    |                                       |               |                    |
| 0                             | 152256.84152000005 | 6683.1175           | 10097.77933          | 16780.896829999998 | 4.3893709033246457                    | 0.0           | 142159.06219000006 |
| 1                             | 118.97822          | 4.75911             | 11.24259             | 16.0017            | 3.9999841987886522                    | 0.0           | 107.73563          |
| 2                             | 134752.80206999995 | 6063.8761           | 3602.4334200000003   | 9666.30952         | 4.5000000050833835                    | 0.0           | 131150.36864999993 |
| 3                             | 287128.62181       | 12751.75271         | 13711.45534          | 26463.20805        | 4.4411290764451019                    | 0.0           | 273417.16647000005 |
| South Australia Government    |                    |                     |                      |                    |                                       |               |                    |
| 0                             | 38192.16307000002  | 2002.81765          | 2883.0807600000003   | 4885.89841         | 5.2440539864923643                    | 0.0           | 35309.08231000001  |
| 1                             | 0.0                | 0.0                 | 0.0                  | 0.0                | ..                                    | 0.0           | 0.0                |
| 2                             | 163779.2486895259  | 7370.0662           | 4096.32305           | 11466.38925        | 4.5000000054776992                    | 0.0           | 159682.9256395259  |
| 3                             | 201971.411759526   | 9372.88385          | 6979.40381           | 16352.28766        | 4.6406982891022599                    | 0.0           | 194992.0079495259  |
| Western Australia Government  |                    |                     |                      |                    |                                       |               |                    |
| 0                             | 142421.76752000005 | 6365.1939600000005  | 9724.58473           | 16089.77869        | 4.4692564000837489                    | 0.0           | 132697.18279000005 |
| 1                             | 135.97477999999995 | 5.43899             | 12.84865             | 18.28764           | 3.9999991174834051                    | 0.0           | 123.12612999999996 |
| 2                             | 229864.31296       | 10343.89408         | 6245.72417           | 16589.61825        | 4.4999999986078745                    | 0.0           | 223618.58879       |
| 3                             | 372422.05526000005 | 16714.527029999994  | 15983.15755          | 32697.68458        | 4.4880604663252388                    | 0.0           | 356438.8977100001  |
| Tasmania Government           |                    |                     |                      |                    |                                       |               |                    |
| 0                             | 73607.10866000001  | 3241.68287          | 5140.974020000001    | 8382.65689         | 4.4040350572302982                    | 0.0           | 68466.13464000003  |
| 1                             | 101.98122          | 4.07925             | 9.63649              | 13.71574           | 4.0000011766872365                    | 0.0           | 92.34473           |
| 2                             | 99582.51227        | 4481.21305          | 2625.5371800000007   | 7106.75023         | 4.4999999978409848                    | 0.0           | 96956.97509        |
| 3                             | 173291.60215000005 | 7726.975169999998   | 7776.147690000001    | 15503.12286        | 4.4589438115481101                    | 0.0           | 165515.45446000007 |
| Northern Territory Government |                    |                     |                      |                    |                                       |               |                    |
| 0                             | 23973.87107        | 1078.8242           | 904.09792            | 1982.92212         | 4.5000000077167357                    | 0.0           | 23069.77315        |
| 2                             | 132070.58797999992 | 5943.17644          | 3259.595810000001    | 9202.77225         | 4.4999999855380395                    | 0.0           | 128810.99216999992 |
| 3                             | 156044.45904999992 | 7022.00064          | 4163.69373           | 11185.69437        | 4.4999999889454605                    | 0.0           | 151880.76531999992 |
| All State and NT Governments  |                    |                     |                      |                    |                                       |               |                    |
| 0                             | 951499.43217       | 42603.15799         | 66168.74497999999    | 108771.90297       | 4.4774759237468764                    | 0.0           | 885330.6871900002  |
| 1                             | 133617.30152999994 | 61.86852            | 146.15356            | 208.02208          | 4.630277613121022E-2                  | 0.0           | 130211.55215999992 |
| 2                             | 1003978.234399526  | 51122.197           | 29621.50788          | 80743.70487999999  | 5.0919626789096597                    | 0.0           | 977616.3223295256  |
| 3                             | 2089094.968099526  | 93787.22351         | 95936.40641999998    | 189723.62993       | 4.4893709928045702                    | 0.0           | 1993158.5616795253 |

## Output:


source: excel_file
label: subtitle