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:
|   Seq. | President              |   AC |   WR |   EAp |   OA |   Im |   DA |   Int |   EAb |   FPA |   LA |
|-------:|:-----------------------|-----:|-----:|------:|-----:|-----:|-----:|------:|------:|------:|-----:|
|      1 | George Washington      |    3 |    4 |     1 |    4 |    9 |    4 |     2 |     2 |     3 |    1 |
|      2 | John Adams             |   32 |   16 |    15 |   13 |   17 |   22 |     3 |    19 |    12 |   20 |
|      3 | Thomas Jefferson       |   11 |    8 |     5 |    5 |    3 |    6 |    14 |     5 |     7 |    6 |
|      4 | James Madison          |    7 |   15 |     9 |    6 |    8 |   12 |     5 |    14 |    20 |   17 |
|      5 | James Monroe           |    8 |   17 |     8 |   16 |   16 |    8 |    10 |    11 |     2 |   13 |
|      6 | John Quincy Adams      |   29 |   23 |    13 |   15 |   11 |   18 |     4 |    21 |    16 |   26 |
|      7 | Andrew Jackson         |   38 |    5 |    19 |   12 |   13 |   14 |    23 |     6 |    19 |    5 |
|      8 | Martin Van Buren       |   13 |   32 |    25 |   24 |   24 |   27 |    29 |    23 |    25 |   27 |
|      9 | William Henry Harrison |   35 |   30 |    24 |   37 |   35 |   36 |    30 |    33 |    39 |   24 |
|     10 | John Tyler             |   39 |   26 |    34 |   35 |   29 |   34 |    33 |    37 |    35 |   36 |
|     11 | James K. Polk          |   23 |    7 |    16 |   17 |   14 |   11 |    24 |     9 |     8 |   10 |
|     12 | Zachary Taylor         |   34 |   28 |    28 |   34 |   27 |   37 |    21 |    31 |    34 |   25 |
|     13 | Millard Fillmore       |   25 |   37 |    35 |   38 |   36 |   35 |    36 |    38 |    33 |   39 |
|     14 | Franklin Pierce        |   36 |   38 |    38 |   39 |   39 |   39 |    38 |    40 |    40 |   40 |
|     15 | James Buchanan         |   41 |   43 |    39 |   42 |   42 |   43 |    40 |    42 |    41 |   43 |
|     16 | Abraham Lincoln        |    1 |    2 |     2 |    1 |    2 |    1 |     1 |     1 |     5 |    2 |
|     17 | Andrew Johnson         |   43 |   34 |    42 |   41 |   41 |   42 |    37 |    41 |    38 |   42 |
|     18 | Ulysses S. Grant       |   22 |   22 |    40 |   28 |   26 |   26 |    27 |    34 |    24 |   21 |
|     19 | Rutherford B. Hayes    |   18 |   33 |    33 |   33 |   32 |   33 |    28 |    30 |    30 |   32 |
|     20 | James A. Garfield      |   27 |   31 |    29 |   25 |   28 |   25 |    25 |    26 |    31 |   23 |
|     21 | Chester A. Arthur      |   21 |   27 |    26 |   30 |   25 |   20 |    32 |    27 |    26 |   28 |
|     22 | Grover Cleveland       |   19 |   24 |    18 |   20 |   22 |   17 |    19 |    17 |    21 |   19 |
|     23 | Benjamin Harrison      |   30 |   39 |    36 |   36 |   34 |   32 |    31 |    35 |    28 |   34 |
|     25 | William McKinley       |   20 |   21 |    20 |   21 |   23 |   19 |    22 |    18 |    15 |   18 |
|     26 | Theodore Roosevelt     |   12 |    1 |     4 |    3 |    1 |    2 |     6 |     4 |     4 |    4 |
|     27 | William Howard Taft    |   24 |   36 |    22 |   23 |   30 |   21 |    18 |    25 |    23 |   31 |
|     28 | Woodrow Wilson         |   37 |    9 |    10 |    8 |    5 |    9 |    11 |    10 |    10 |   12 |
|     29 | Warren G. Harding      |   26 |   40 |    43 |   43 |   43 |   40 |    42 |    43 |    37 |   41 |
|     30 | Calvin Coolidge        |   28 |   41 |    30 |   32 |   37 |   31 |    17 |    28 |    32 |   33 |
|     31 | Herbert Hoover         |   40 |   42 |    32 |   26 |   38 |   41 |    13 |    29 |    36 |   37 |
|     32 | Franklin D. Roosevelt  |    2 |    3 |     3 |    2 |    4 |    3 |    16 |     3 |     1 |    3 |
|     33 | Harry S. Truman        |   15 |    6 |     7 |    7 |   15 |    7 |     8 |     8 |     6 |    9 |
|     34 | Dwight D. Eisenhower   |    5 |   20 |    17 |   11 |   20 |   13 |     9 |     7 |     9 |    7 |
|     35 | John F. Kennedy        |    6 |   10 |     6 |   14 |    7 |   15 |    35 |    13 |    17 |   11 |
|     36 | Lyndon B. Johnson      |    9 |   12 |    12 |    9 |   12 |    5 |    34 |    12 |    43 |   15 |
|     37 | Richard Nixon          |   33 |   14 |    37 |   22 |   19 |   24 |    43 |    24 |    11 |   29 |
|     38 | Gerald Ford            |   17 |   35 |    23 |   31 |   33 |   30 |    15 |    32 |    27 |   30 |
|     39 | Jimmy Carter           |   31 |   25 |    21 |   29 |   21 |   29 |     7 |    36 |    29 |   35 |
|     40 | Ronald Reagan          |   14 |   11 |    31 |   19 |   18 |   23 |    26 |    20 |    13 |    8 |
|     41 | George H. W. Bush      |   16 |   29 |    27 |   27 |   31 |   28 |    20 |    22 |    14 |   22 |
|     42 | Bill Clinton           |    4 |   18 |    11 |   10 |   10 |   10 |    41 |    15 |    18 |   14 |
|     43 | George W. Bush         |   42 |   19 |    41 |   40 |   40 |   38 |    39 |    39 |    42 |   38 |
|     44 | Barack Obama           |   10 |   13 |    14 |   18 |    6 |   16 |    12 |    16 |    22 |   16 |

## Output:


source: web
label: operator: stack
stack_start_idx: 2
stack_end_idx: 11