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:
| Course             | Grade   | Freshmen   | Sophomores   | Juniors   | Seniors   |
|:-------------------|:--------|:-----------|:-------------|:----------|:----------|
| Biology 115        |         |            |              |           |           |
|                    | 0.0     | 23.0       | 14.0         | 9.0       | 4.0       |
|                    | 1.0     | 16.0       | 26.0         | 13.0      | 6.0       |
|                    | 2.0     | 42.0       | 33.0         | 19.0      | 3.0       |
|                    | 3.0     | 17.0       | 10.0         | 6.0       | 0.0       |
|                    | 4.0     | 9.0        | 5.0          | 2.0       | 1.0       |
| Chemistry 115      |         |            |              |           |           |
|                    | 0.0     | 15.0       | 22.0         | 10.0      | 3.0       |
|                    | 1.0     | 37.0       | 29.0         | 11.0      | 7.0       |
|                    | 2.0     | 55.0       | 41.0         | 25.0      | 9.0       |
|                    | 3.0     | 12.0       | 15.0         | 16.0      | 2.0       |
|                    | 4.0     | 10.0       | 7.0          | 4.0       | 8.0       |
| Communications 101 |         |            |              |           |           |
|                    | 0.0     | 15.0       | 19.0         | 22.0      | 17.0      |
|                    | 1.0     | 22.0       | 27.0         | 17.0      | 19.0      |
|                    | 2.0     | 49.0       | 58.0         | 31.0      | 24.0      |
|                    | 3.0     | 14.0       | 22.0         | 8.0       | 15.0      |
|                    | 4.0     | 6.0        | 11.0         | 7.0       | 3.0       |
| French 101         |         |            |              |           |           |
|                    | 0.0     | 23.0       | 39.0         | 11.0      | 12.0      |
|                    | 1.0     | 9.0        | 16.0         | 16.0      | 7.0       |
|                    | 2.0     | 36.0       | 22.0         | 13.0      | 5.0       |
|                    | 3.0     | 7.0        | 13.0         | 4.0       | 9.0       |
|                    | 4.0     | 12.0       | 9.0          | 5.0       | 2.0       |
| Spanish 101        |         |            |              |           |           |
|                    | 0.0     | 44.0       | 58.0         | 16.0      | 5.0       |
|                    | 1.0     | 25.0       | 23.0         | 11.0      | 9.0       |
|                    | 2.0     | 39.0       | 34.0         | 26.0      | 4.0       |
|                    | 3.0     | 10.0       | 7.0          | 3.0       | 1.0       |
|                    | 4.0     | 16.0       | 12.0         | 3.0       | 2.0       |

## Output:


source: excel_file
label: operator: subtitle
operator: stack
stack_start_idx: 2
stack_end_idx: 3
alternative_label: operator: stack
stack_start_idx: 2
stack_end_idx: 3
operator: subtitle