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:
| Site    | Business Unit   | Product   | Method   | Category   |   Apr Bud |   Apr Act-For |   May Bud |   May Act-For |   Jun Bud |   Jun Act-For |   Jul Bud |   Jul Act-For |   Aug Bud |   Aug Act-For |   Sep Bud |   Sep Act-For |   Oct Bud |   Oct Act-For |   Nov Bud |   Nov Act-For |   Dec Bud |   Dec Act-For |   Jan Bud |   Jan Act-For |   Feb Bud |   Feb Act-For |   Mar Bud |   Mar Act-For |   Apr Gap |   May Gap |   Jun Gap |   Jul Gap |   Aug Gap |   Sep Gap |   Oct Gap |   Nov Gap |   Dec Gap |   Jan Gap |   Feb Gap |   Mar Gap |
|:--------|:----------------|:----------|:---------|:-----------|----------:|--------------:|----------:|--------------:|----------:|--------------:|----------:|--------------:|----------:|--------------:|----------:|--------------:|----------:|--------------:|----------:|--------------:|----------:|--------------:|----------:|--------------:|----------:|--------------:|----------:|--------------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|
| Acme    | Toys            | Anvil     | Drop     | Roadrunner |     82.49 |         18.75 |     77.96 |         72.21 |     76.19 |         80.02 |     87.86 |        117.03 |     94.78 |        121.87 |     95.81 |        150.42 |     95.57 |         81.24 |     86.24 |          73.3 |      81.2 |         69.02 |    117.62 |        105.85 |    114.24 |        102.82 |    123.37 |        111.04 |    -63.74 |     59.21 |      7.84 |    -22.25 |    -26.06 |    -54.85 |       5   |       7.9 |     48.59 |      8.39 |     20.55 |    -12.34 |
| Amazon  | Toys            | Anvil     | Drop     | Roadrunner |     85.59 |         18.35 |     74.56 |         66.81 |     71.89 |         80.72 |     89.06 |        108.53 |     88.88 |        121.77 |     87.91 |        156.82 |     86.97 |         74.44 |     76.34 |          72.3 |      81.6 |         61.12 |    107.82 |        114.95 |    113.74 |        103.92 |    114.07 |        113.64 |    -56.44 |     60.41 |     -0.96 |    -13.25 |    -24.36 |    -53.75 |       9   |      -0.1 |     56.59 |      4.89 |     11.95 |    -12.24 |
| Walmart | Toys            | Anvil     | Drop     | Roadrunner |     91.19 |         18.45 |     66.56 |         74.41 |     68.89 |         79.12 |     88.06 |        114.83 |     96.18 |        121.77 |     83.31 |        153.42 |     84.67 |         78.14 |     83.34 |          63.7 |      86   |         57.32 |    117.52 |        112.85 |    120.04 |        101.52 |    120.77 |        105.84 |    -57.04 |     62.01 |      5.64 |     -7.85 |    -20.56 |    -53.75 |      18.7 |      -7.6 |     52.19 |     10.89 |      9.85 |     -4.14 |
| Target  | Toys            | Anvil     | Drop     | Roadrunner |     87.69 |         10.95 |     71.66 |         68.71 |     75.69 |         83.12 |     85.76 |        106.13 |     86.18 |        128.67 |     87.71 |        153.82 |     77.87 |         72.14 |     92.64 |          73.6 |      78.9 |         55.12 |    120.52 |        104.45 |    115.34 |         97.62 |    110.77 |        112.34 |    -47.04 |     55.31 |     13.24 |     -3.65 |    -27.86 |    -48.05 |       8.9 |      -7   |     46.79 |     10.99 |     14.35 |    -13.44 |
| Publix  | Toys            | Anvil     | Drop     | Roadrunner |     85.99 |          8.45 |     65.56 |         65.01 |     85.59 |         77.52 |     91.56 |         97.63 |     94.28 |        133.17 |     87.61 |        145.22 |     86.87 |         76.44 |     86.24 |          79.9 |      80.3 |         45.92 |    121.02 |        100.25 |    114.44 |         99.22 |    117.17 |        110.24 |    -52.54 |     48.21 |      5.04 |      2.25 |    -21.96 |    -48.55 |      18.8 |      -7.7 |     46.19 |     13.09 |      4.35 |    -16.14 |
| Safeway | Toys            | Anvil     | Drop     | Roadrunner |     93.39 |          9.95 |     64.36 |         55.31 |     79.49 |         87.42 |     85.26 |         88.33 |     96.48 |        123.87 |     82.91 |        145.72 |     78.67 |         74.74 |     87.24 |          82   |      70.4 |         42.02 |    115.82 |        105.85 |    115.94 |        106.62 |    121.57 |        103.44 |    -58.64 |     48.91 |     14.14 |     10.35 |    -26.46 |    -57.55 |      27.5 |     -17.3 |     44.59 |     15.89 |      2.25 |    -17.24 |

## Output:


source: excel_forum
label: operator: wide_to_long
wide_to_long_start_idx: 5
wide_to_long_end_idx: 40