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:
| 0           | 1         | 2        |
|:------------|:----------|:---------|
| Animation   | Adventure | Comedy   |
| Action      | Adventure | Family   |
| Comedy      | Romance   |          |
| Comedy      | Drama     | Romance  |
| Comedy      | Family    | Romance  |
| Action      | Crime     | Drama    |
| Comedy      | Drama     |          |
| Adventure   | Comedy    | Drama    |
| Action      | Crime     | Thriller |
| Action      | Adventure | Thriller |
| Comedy      | Drama     | Romance  |
| Comedy      | Fantasy   | Horror   |
| Animation   | Adventure | Drama    |
| Biography   | Drama     | History  |
| Action      | Adventure | Comedy   |
| Crime       | Drama     |          |
| Drama       | Romance   |          |
| Comedy      |           |          |
| Adventure   | Comedy    | Crime    |
| Action      | Comedy    | Crime    |
| Comedy      | Crime     | Thriller |
| Crime       | Drama     | Mystery  |
| Action      | Crime     | Thriller |
| Drama       | Fantasy   | Mystery  |
| Drama       | Romance   |          |
| Drama       | Romance   |          |
| Comedy      | Drama     | Romance  |
| Drama       |           |          |
| Fantasy     | Sci-Fi    |          |
| Crime       | Drama     | Romance  |
| Biography   | Drama     |          |
| Mystery     | Sci-Fi    | Thriller |
| Adventure   | Romance   |          |
| Comedy      | Drama     | Family   |
| Biography   | Drama     | Romance  |
| Crime       | Drama     |          |
| Adventure   | Drama     | Family   |
| Comedy      | Family    | Romance  |
| Comedy      | Romance   |          |
| Drama       | Thriller  |          |
| Drama       | War       |          |
| Action      | Crime     | Drama    |
| Biography   | Drama     | History  |
| Action      | Adventure | Fantasy  |
| Comedy      | Crime     | Drama    |
| Comedy      | Drama     | Romance  |
| Crime       | Drama     | Mystery  |
| Animation   | Adventure | Drama    |
| Drama       | Romance   |          |
| Crime       | Drama     | Mystery  |
| Action      | Drama     | Thriller |
| Comedy      | Fantasy   | Romance  |
| Drama       |           |          |
| Comedy      | Family    | Sport    |
| Drama       | Music     |          |
| Adventure   | Comedy    | Family   |
| Comedy      | Drama     | Romance  |
| Biography   | Comedy    | Drama    |
| Drama       | Mystery   | Thriller |
| Drama       | Family    | Fantasy  |
| Crime       | Drama     | Thriller |
| Drama       | Music     |          |
| Comedy      | Crime     |          |
| Comedy      | Crime     | Romance  |
| Comedy      |           |          |
| Action      | Sci-Fi    | Thriller |
| Drama       |           |          |
| Comedy      |           |          |
| Comedy      | Drama     |          |
| Action      | Crime     | Horror   |
| Action      | Crime     | Romance  |
| Comedy      | Drama     | Romance  |
| Drama       | History   |          |
| Romance     | Drama     |          |
| Comedy      | Thriller  |          |
| Sci-Fi      | Thriller  |          |
| Documentary | Biography | Music    |
| Drama       | Thriller  |          |
| Drama       | Thriller  |          |
| Drama       | Family    |          |
| Crime       | Drama     |          |
| Comedy      | Drama     |          |
| Drama       | Romance   |          |
| Comedy      | Drama     |          |
| Drama       | Romance   |          |
| Adventure   | Drama     |          |
| Comedy      | Adventure | Family   |
| Comedy      |           |          |
| Action      | Crime     | Drama    |
| Drama       |           |          |
| Drama       | Horror    | Romance  |
| Comedy      | Fantasy   | Horror   |
| Comedy      | Drama     | Romance  |
| Action      | Crime     | Thriller |
| Comedy      |           |          |
| Crime       | Drama     |          |
| Action      | Crime     | Drama    |
| Documentary | Biography |          |
| Drama       |           |          |
| Comedy      | Crime     | Drama    |

## Output:


source: notebook
label: operator: stack
stack_start_idx: 0
stack_end_idx: 2