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:
| Diag   |   Clinic | p-value-good       | p-value-bad        |
|:-------|---------:|:-------------------|:-------------------|
| FC     |        0 |                    | 0.6859999999999999 |
|        |        1 | 0.0464             |                    |
|        |        2 | 0.1046             |                    |
|        |        3 | 0.0409999999999999 |                    |
|        |        4 | 0.0467             |                    |
| DFSP   |        0 | 0.8092             |                    |
|        |        1 | 0.0154             |                    |
|        |        2 | 0.8461999999999998 |                    |
|        |        3 | 0.0134             |                    |
|        |        4 | 0.0083             |                    |
| DTF    |        0 | 0.9114000000000002 |                    |
|        |        1 | 0.9786             |                    |
|        |        2 | 0.3112             |                    |
|        |        3 | 0.9195             |                    |
|        |        4 | 0.3677             |                    |
| EF     |        0 | 0.9589             |                    |
|        |        1 | 0.3511             |                    |
|        |        2 | 0.0678             |                    |
|        |        3 | 0.2497             |                    |
|        |        4 | 0.0015             |                    |
| PF     |        0 | 0.1169             |                    |
|        |        1 | 0.0274             |                    |
|        |        2 | 0.0944             |                    |
|        |        3 | 0.0166             |                    |
|        |        4 | 0.0066             |                    |
| FOTS   |        0 |                    | 0.1599             |
|        |        1 |                    | 0.0002             |
|        |        2 |                    | 0.9467000000000002 |
|        |        3 |                    | 0.0002             |
|        |        4 |                    | 0.0                |
| IF     |        0 |                    | 0.7306             |
|        |        1 |                    | 0.5802             |
|        |        2 |                    | 0.8215             |
|        |        3 |                    | 0.6136             |
|        |        4 |                    | 0.0002             |
| NF     |        0 |                    | 0.1356             |
|        |        1 |                    | 0.0007             |
|        |        2 |                    | 0.7865             |
|        |        3 |                    | 0.0027             |
|        |        4 |                    | 0.0                |
| NPAF   |        0 |                    | 0.6578             |
|        |        1 |                    | 0.065              |
|        |        2 | 0.9188             |                    |
|        |        3 |                    | 0.0437             |
|        |        4 |                    | 0.0                |
| SFT    |        0 |                    | 0.8589             |
|        |        1 |                    | 0.1555             |
|        |        2 |                    | 0.9543             |
|        |        3 |                    | 0.1405             |
|        |        4 |                    | 0.0                |

## Output:


source: excel_file
label: operator: ffill
ffill_end_idx: 0
operator: stack
stack_start_idx: 2
stack_end_idx: 3
alternative_label: operator: stack
stack_start_idx: 2
stack_end_idx: 3
operator: ffill
ffill_end_idx: 0