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:
| Channel      | Product                 |   2018.Jan |   2018.Feb |   2018.Mar |   2018.Apr |   2018.May |   2018.Jun |   2018.Jul |   2018.Aug |   2018.Sep |   2018.Oct |   2018.Nov |   2018.Dec |
|:-------------|:------------------------|-----------:|-----------:|-----------:|-----------:|-----------:|-----------:|-----------:|-----------:|-----------:|-----------:|-----------:|-----------:|
| Agencies     | 0                       |        784 |        751 |        544 |        551 |        622 |        224 |         82 |        462 |        869 |        316 |        817 |        304 |
|              | 1                       |        387 |        342 |        851 |         75 |        663 |        325 |        532 |        508 |        418 |        441 |        881 |        460 |
|              | 2                       |        109 |        694 |        728 |        452 |        573 |        645 |        683 |        805 |        830 |        135 |        815 |        637 |
| Supermarkets | 3                       |        313 |        380 |        845 |        176 |        428 |        823 |        640 |        524 |        711 |        877 |        860 |        222 |
|              | Tamarind Juice 500Ml    |        353 |        681 |        358 |        244 |        719 |        727 |        859 |        228 |        844 |        245 |        304 |        361 |
|              | 4                       |        493 |        382 |        812 |        616 |        625 |        164 |        579 |        272 |        355 |        609 |        433 |        178 |
|              | Tropical Punch 1L       |        250 |        615 |        813 |        377 |        286 |        602 |        853 |        186 |        445 |        778 |        644 |        363 |
|              | Tropical Mix 1L         |        578 |        194 |        847 |        588 |        406 |        737 |        767 |        781 |        284 |        644 |        240 |        636 |
|              | 0                       |        485 |        779 |        363 |        202 |        216 |        548 |        206 |        373 |        268 |        479 |        335 |        622 |
| Dukas/Kiosks | 0                       |        107 |        113 |        112 |        113 |         51 |         95 |        108 |         64 |        107 |         78 |         71 |         89 |
|              | 3                       |        111 |         85 |         78 |        111 |         59 |         74 |         57 |         51 |        101 |         98 |         55 |         57 |
| Bars         | 3                       |        842 |        495 |        682 |        222 |        746 |       1206 |        655 |       1035 |        943 |        933 |        462 |        231 |
|              | 4                       |       1231 |        431 |        991 |       1284 |        432 |        251 |       1245 |        777 |       1268 |        449 |       1399 |        798 |
|              | 0                       |       1018 |        909 |        614 |        219 |        434 |        553 |        449 |        767 |        982 |        990 |        635 |        264 |
|              | 1                       |        215 |        531 |        619 |       1227 |        914 |        785 |        664 |        349 |        467 |       1326 |        618 |        620 |
|              | Singleton sunray 750 Ml |        818 |       1286 |        433 |        245 |       1036 |        909 |        526 |       1048 |        880 |        502 |       1136 |        241 |
|              | 2                       |        233 |        473 |       1137 |        377 |        591 |        223 |       1223 |       1010 |       1093 |        615 |        409 |        939 |
|              | Viceroy 750 Ml          |        406 |        866 |       1290 |        660 |        651 |        429 |       1018 |        654 |        724 |       1293 |       1243 |        939 |

## Output:


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