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:
| League     | Season    | Date      |   game_id | Team_Home       |   Goal_Home |   Win_Home |   o_rating_Home |   d_rating_Home | Team_Away       |   Goal_Away |   Win_Away |   o_rating_Away |   d_rating_Away |
|:-----------|:----------|:----------|----------:|:----------------|------------:|-----------:|----------------:|----------------:|:----------------|------------:|-----------:|----------------:|----------------:|
| Ligue1     | 2017-2018 | 8/4/2017  |      2662 | Monaco          |           3 |          1 |      0.899448   |        1.08814  | Toulouse        |           2 |          0 |       0.557707  |        0.776176 |
| Ligue1     | 2017-2018 | 8/5/2017  |      2663 | Paris S-G       |           2 |          1 |      2.42868    |        1.24902  | Amiens          |           0 |          0 |       0.40276   |        1.0676   |
| Ligue1     | 2017-2018 | 8/5/2017  |      2664 | Saint-Étienne   |           1 |          1 |      0.928417   |        1.19934  | Nice            |           0 |          0 |       1.92282   |        1.45513  |
| Ligue1     | 2017-2018 | 8/5/2017  |      2665 | Montpellier     |           1 |          1 |      0.0501418  |        1.17574  | Caen            |           0 |          0 |       0.310047  |        1.28607  |
| Ligue1     | 2017-2018 | 8/5/2017  |      2666 | Metz            |           1 |          0 |      0.525351   |        1.11716  | Guingamp        |           3 |          1 |       0.736396  |        0.797166 |
| Ligue1     | 2017-2018 | 8/5/2017  |      2667 | Lyon            |           4 |          1 |      1.35247    |        1.26614  | Strasbourg      |           0 |          0 |       0.317029  |        1.13102  |
| Ligue1     | 2017-2018 | 8/5/2017  |      2668 | Troyes          |           1 |          0 |      1.20716    |        0.963734 | Rennes          |           1 |          0 |       0.185586  |        1.35901  |
| Ligue1     | 2017-2018 | 8/6/2017  |      2670 | Angers          |           2 |          0 |      0.291645   |        0.967193 | Bordeaux        |           2 |          0 |       0.262587  |        0.827341 |
| Ligue1     | 2017-2018 | 8/6/2017  |      2671 | Marseille       |           3 |          1 |      1.78204    |        1.09928  | Dijon           |           0 |          0 |       0.950887  |        1.22763  |
| Ligue1     | 2017-2018 | 8/6/2017  |      2669 | Lille           |           3 |          1 |      0.455937   |        1.21018  | Nantes          |           0 |          0 |       0.542783  |        0.908713 |
| Ligue1     | 2017-2018 | 8/11/2017 |      2672 | Nice            |           1 |          0 |      1.18808    |        2.03947  | Troyes          |           2 |          1 |       0.866969  |        0.776176 |
| Ligue1     | 2017-2018 | 8/11/2017 |      2673 | Rennes          |           1 |          0 |      0          |        0.776176 | Lyon            |           2 |          1 |       0.690865  |        1.14268  |
| EPL        | 2017-2018 | 8/11/2017 |      1140 | Arsenal         |           4 |          1 |      0.950284   |        1.14293  | Leicester City  |           3 |          0 |       0.046093  |        0.888199 |
| EPL        | 2017-2018 | 8/12/2017 |      1146 | Crystal Palace  |           0 |          0 |      0          |        0.838823 | Huddersfield    |           3 |          1 |       0.353431  |        0.776176 |
| EPL        | 2017-2018 | 8/12/2017 |      1145 | Chelsea         |           2 |          0 |      0.587193   |        1.36469  | Burnley         |           3 |          1 |       0         |        0.962341 |
| EPL        | 2017-2018 | 8/12/2017 |      1143 | Everton         |           1 |          1 |      0.238078   |        1.10994  | Stoke City      |           0 |          0 |       0         |        0.776176 |
| EPL        | 2017-2018 | 8/12/2017 |      1142 | West Brom       |           1 |          1 |      0.474355   |        0.776176 | Bournemouth     |           0 |          0 |       1.20019   |        1.78699  |
| EPL        | 2017-2018 | 8/12/2017 |      1141 | Watford         |           3 |          0 |      0          |        0.984341 | Liverpool       |           3 |          0 |       0.452137  |        1.19073  |
| EPL        | 2017-2018 | 8/12/2017 |      1144 | Southampton     |           0 |          0 |      0.419163   |        1.0696   | Swansea City    |           0 |          0 |       0.323973  |        1.22265  |
| Ligue1     | 2017-2018 | 8/12/2017 |      2676 | Toulouse        |           1 |          1 |      0.273919   |        0.776176 | Montpellier     |           0 |          0 |       0.143067  |        0.776176 |
| Ligue1     | 2017-2018 | 8/12/2017 |      2675 | Amiens          |           0 |          0 |      0.924957   |        1.52365  | Angers          |           2 |          1 |       0.345089  |        0.825931 |
| Ligue1     | 2017-2018 | 8/12/2017 |      2674 | Nantes          |           0 |          0 |      0.267488   |        0.776176 | Marseille       |           1 |          1 |       0.573514  |        1.37762  |
| Ligue1     | 2017-2018 | 8/12/2017 |      2677 | Caen            |           0 |          0 |      0          |        0.891263 | Saint-Étienne   |           1 |          1 |       0.4362    |        0.777431 |
| Ligue1     | 2017-2018 | 8/12/2017 |      2678 | Bordeaux        |           2 |          1 |      1.99903    |        1.07234  | Metz            |           0 |          0 |       0.565466  |        0.967162 |
| EPL        | 2017-2018 | 8/12/2017 |      1147 | Brighton        |           0 |          0 |      0.526002   |        0.883135 | Manchester City |           2 |          1 |       1.29284   |        1.48477  |
| Ligue1     | 2017-2018 | 8/13/2017 |      2680 | Dijon           |           1 |          0 |      0.136476   |        0.830273 | Monaco          |           4 |          1 |       0.38028   |        0.938622 |
| Ligue1     | 2017-2018 | 8/13/2017 |      2679 | Strasbourg      |           3 |          1 |      0.85697    |        0.823879 | Lille           |           0 |          0 |       0.0402431 |        0.920397 |
| EPL        | 2017-2018 | 8/13/2017 |      1149 | Manchester Utd  |           4 |          1 |      2.24086    |        1.56127  | West Ham        |           0 |          0 |       0.0989048 |        1.21321  |
| Ligue1     | 2017-2018 | 8/13/2017 |      2681 | Guingamp        |           0 |          0 |      0.338532   |        0.981446 | Paris S-G       |           3 |          1 |       3.79006   |        1.99808  |
| EPL        | 2017-2018 | 8/13/2017 |      1148 | Newcastle Utd   |           0 |          0 |      0.0438933  |        0.776176 | Tottenham       |           2 |          1 |       4.1308    |        2.00515  |
| LaLiga     | 2017-2018 | 8/18/2017 |      6935 | Valencia        |           1 |          1 |      0.515248   |        1.01107  | Las Palmas      |           0 |          0 |       0.761338  |        1.60752  |
| LaLiga     | 2017-2018 | 8/18/2017 |      6934 | Leganés         |           1 |          1 |      0.223285   |        0.935478 | Alavés          |           0 |          0 |       0.0623195 |        0.776176 |
| Bundesliga | 2017-2018 | 8/18/2017 |      3966 | Bayern Munich   |           3 |          1 |      1.23416    |        0.91093  | Leverkusen      |           1 |          0 |       1.30555   |        1.18817  |
| Ligue1     | 2017-2018 | 8/18/2017 |      2682 | Metz            |           0 |          0 |      0.695274   |        0.776176 | Monaco          |           1 |          1 |       0.755334  |        0.880814 |
| EPL        | 2017-2018 | 8/19/2017 |      1151 | Southampton     |           3 |          1 |      0.949804   |        1.23736  | West Ham        |           2 |          0 |       0.0789687 |        0.939098 |
| Bundesliga | 2017-2018 | 8/19/2017 |      3967 | Hoffenheim      |           1 |          1 |      1.19769    |        1.47431  | Werder Bremen   |           0 |          0 |       0.372416  |        1.1236   |
| SerieA     | 2017-2018 | 8/19/2017 |      5414 | Juventus        |           3 |          1 |      2.9512     |        1.17873  | Cagliari        |           0 |          0 |       0.616531  |        1.49079  |
| EPL        | 2017-2018 | 8/19/2017 |      1156 | Stoke City      |           1 |          1 |      0.495139   |        0.794823 | Arsenal         |           0 |          0 |       0.949545  |        1.21087  |
| EPL        | 2017-2018 | 8/19/2017 |      1155 | Liverpool       |           1 |          1 |      1.08373    |        0.977865 | Crystal Palace  |           0 |          0 |       0         |        0.776176 |
| SerieA     | 2017-2018 | 8/19/2017 |      5415 | Hellas Verona   |           1 |          0 |      0          |        1.13179  | Napoli          |           3 |          1 |       2.2641    |        1.37124  |
| Bundesliga | 2017-2018 | 8/19/2017 |      3969 | Wolfsburg       |           0 |          0 |      0.301562   |        0.776176 | Dortmund        |           3 |          1 |       0.939102  |        0.870216 |
| Bundesliga | 2017-2018 | 8/19/2017 |      3968 | Mainz 05        |           0 |          0 |      0          |        0.730986 | Hannover 96     |           1 |          1 |       0         |        0.86577  |
| EPL        | 2017-2018 | 8/19/2017 |      1150 | Swansea City    |           0 |          0 |      0          |        0.96782  | Manchester Utd  |           4 |          1 |       2.63822   |        1.37434  |
| Ligue1     | 2017-2018 | 8/19/2017 |      2688 | Rennes          |           2 |          0 |      0.91914    |        0.864597 | Dijon           |           2 |          0 |       0.348851  |        1.27407  |
| EPL        | 2017-2018 | 8/19/2017 |      1153 | Bournemouth     |           0 |          0 |      0          |        1.10887  | Watford         |           2 |          1 |       1.674     |        0.852974 |
| EPL        | 2017-2018 | 8/19/2017 |      1152 | Leicester City  |           2 |          1 |      1.49158    |        1.24194  | Brighton        |           0 |          0 |       0.456981  |        1.15673  |
| Ligue1     | 2017-2018 | 8/19/2017 |      2687 | Nice            |           2 |          1 |      1.38713    |        1.0385   | Guingamp        |           0 |          0 |       1.29292   |        1.21215  |
| EPL        | 2017-2018 | 8/19/2017 |      1154 | Burnley         |           0 |          0 |      0.741167   |        0.90804  | West Brom       |           1 |          1 |       0.600388  |        0.776176 |
| Ligue1     | 2017-2018 | 8/19/2017 |      2684 | Montpellier     |           1 |          0 |      0          |        0.940706 | Strasbourg      |           1 |          0 |       0.754059  |        0.778534 |
| Ligue1     | 2017-2018 | 8/19/2017 |      2685 | Troyes          |           0 |          0 |      0.466573   |        1.1549   | Nantes          |           1 |          1 |       0.143475  |        1.05634  |
| Bundesliga | 2017-2018 | 8/19/2017 |      3972 | Schalke 04      |           2 |          1 |      1.18953    |        1.98274  | RB Leipzig      |           0 |          0 |       0.0929678 |        1.25691  |
| Bundesliga | 2017-2018 | 8/19/2017 |      3971 | Hertha BSC      |           2 |          1 |      0.0569103  |        1.54614  | Stuttgart       |           0 |          0 |       0.410074  |        1.39116  |
| Ligue1     | 2017-2018 | 8/19/2017 |      2683 | Lyon            |           3 |          0 |      0.516623   |        1.12409  | Bordeaux        |           3 |          0 |       0.0698658 |        1.32337  |
| LaLiga     | 2017-2018 | 8/19/2017 |      6938 | Sevilla         |           1 |          0 |      0.806989   |        1.49951  | Espanyol        |           1 |          0 |       0.289455  |        1.1109   |
| LaLiga     | 2017-2018 | 8/19/2017 |      6937 | Girona          |           2 |          0 |      0.140928   |        0.798315 | Atlético Madrid |           2 |          0 |       0.393757  |        1.17372  |
| LaLiga     | 2017-2018 | 8/19/2017 |      6936 | Celta Vigo      |           2 |          0 |      0.53728    |        1.33561  | Real Sociedad   |           3 |          1 |       0         |        1.25862  |
| Ligue1     | 2017-2018 | 8/19/2017 |      2686 | Saint-Étienne   |           3 |          1 |      0.165156   |        0.931236 | Amiens          |           0 |          0 |       0.22531   |        0.88181  |
| Bundesliga | 2017-2018 | 8/19/2017 |      3970 | Hamburger SV    |           1 |          1 |      0.84358    |        0.776176 | Augsburg        |           0 |          0 |       0         |        0.778668 |
| Ligue1     | 2017-2018 | 8/20/2017 |      2691 | Paris S-G       |           6 |          1 |      2.27638    |        1.39088  | Toulouse        |           2 |          0 |       0.454     |        0.872777 |
| LaLiga     | 2017-2018 | 8/20/2017 |      6941 | La Coruña       |           0 |          0 |      0.313622   |        0.994479 | Real Madrid     |           3 |          1 |       3.31941   |        1.14532  |
| LaLiga     | 2017-2018 | 8/20/2017 |      6939 | Athletic Club   |           0 |          0 |      0.409444   |        1.22887  | Getafe          |           0 |          0 |       3.03816   |        1.25715  |
| Bundesliga | 2017-2018 | 8/20/2017 |      3973 | Freiburg        |           0 |          0 |      0.378904   |        1.04898  | Eint Frankfurt  |           0 |          0 |       1.32477   |        0.809807 |
| Bundesliga | 2017-2018 | 8/20/2017 |      3974 | M'Gladbach      |           1 |          1 |      1.58325    |        1.03041  | Köln            |           0 |          0 |       0.513796  |        1.15543  |
| LaLiga     | 2017-2018 | 8/20/2017 |      6940 | Barcelona       |           2 |          1 |      1.17013    |        1.61827  | Betis           |           0 |          0 |       0.824446  |        1.64658  |
| Ligue1     | 2017-2018 | 8/20/2017 |      2690 | Marseille       |           1 |          0 |      0.70934    |        1.28387  | Angers          |           1 |          0 |       0.148034  |        0.776176 |
| SerieA     | 2017-2018 | 8/20/2017 |      5416 | Atalanta        |           0 |          0 |      0.0859603  |        0.786278 | Roma            |           1 |          1 |       0.110023  |        0.776176 |
| Ligue1     | 2017-2018 | 8/20/2017 |      2689 | Lille           |           0 |          0 |      0          |        0.889659 | Caen            |           2 |          1 |       1.13961   |        0.776176 |
| EPL        | 2017-2018 | 8/20/2017 |      1158 | Tottenham       |           1 |          0 |      0.107348   |        0.82153  | Chelsea         |           2 |          1 |       0.286329  |        0.776176 |
| SerieA     | 2017-2018 | 8/20/2017 |      5421 | Inter           |           3 |          1 |      1.92796    |        1.10486  | Fiorentina      |           0 |          0 |       0.812353  |        1.36591  |
| SerieA     | 2017-2018 | 8/20/2017 |      5422 | Sassuolo        |           0 |          0 |      0          |        0.781981 | Genoa           |           0 |          0 |       0.184793  |        1.1828   |
| SerieA     | 2017-2018 | 8/20/2017 |      5419 | Bologna         |           1 |          0 |      0.425776   |        1.30539  | Torino          |           1 |          0 |       0.869602  |        1.23654  |
| SerieA     | 2017-2018 | 8/20/2017 |      5418 | Crotone         |           0 |          0 |      0.31097    |        0.946088 | Milan           |           3 |          1 |       2.38916   |        0.763408 |
| SerieA     | 2017-2018 | 8/20/2017 |      5423 | Lazio           |           0 |          0 |      0.266016   |        0.952076 | SPAL            |           0 |          0 |       0.873094  |        0.99685  |
| SerieA     | 2017-2018 | 8/20/2017 |      5417 | Sampdoria       |           2 |          1 |      1.30049    |        1.21311  | Benevento       |           1 |          0 |       0.69168   |        0.88484  |
| SerieA     | 2017-2018 | 8/20/2017 |      5420 | Udinese         |           1 |          0 |      0.761107   |        0.871971 | Chievo          |           2 |          1 |       0.381432  |        0.824851 |
| EPL        | 2017-2018 | 8/20/2017 |      1157 | Huddersfield    |           1 |          1 |      2.06416    |        0.794807 | Newcastle Utd   |           0 |          0 |       0.173405  |        0.796872 |
| EPL        | 2017-2018 | 8/21/2017 |      1159 | Manchester City |           1 |          0 |      0.0857889  |        0.978433 | Everton         |           1 |          0 |       0.541894  |        0.960487 |
| LaLiga     | 2017-2018 | 8/21/2017 |      6942 | Levante         |           1 |          1 |      0.0322992  |        1.24921  | Villarreal      |           0 |          0 |       1.83267   |        1.32237  |
| LaLiga     | 2017-2018 | 8/21/2017 |      6943 | Málaga          |           0 |          0 |      0.12891    |        1.26378  | Eibar           |           1 |          1 |       0.127402  |        0.834391 |
| Ligue1     | 2017-2018 | 8/25/2017 |      2692 | Paris S-G       |           3 |          1 |      1.59854    |        1.38554  | Saint-Étienne   |           0 |          0 |       0.47625   |        1.14115  |
| LaLiga     | 2017-2018 | 8/25/2017 |      6944 | Real Sociedad   |           3 |          1 |      0.554233   |        1.23156  | Villarreal      |           0 |          0 |       0.201659  |        1.1704   |
| LaLiga     | 2017-2018 | 8/25/2017 |      6945 | Betis           |           2 |          1 |      0.659491   |        1.75614  | Celta Vigo      |           1 |          0 |       0.234202  |        1.04883  |
| Bundesliga | 2017-2018 | 8/25/2017 |      3975 | Köln            |           1 |          0 |      0.817823   |        0.798878 | Hamburger SV    |           3 |          1 |       0.32023   |        0.776176 |
| EPL        | 2017-2018 | 8/26/2017 |      1165 | Manchester Utd  |           2 |          1 |      1.98758    |        1.15086  | Leicester City  |           0 |          0 |       0.515432  |        0.985769 |
| EPL        | 2017-2018 | 8/26/2017 |      1162 | Watford         |           0 |          0 |      0          |        0.776176 | Brighton        |           0 |          0 |       1.50391   |        1.46752  |
| LaLiga     | 2017-2018 | 8/26/2017 |      6947 | Girona          |           1 |          1 |      0.286793   |        1.10102  | Málaga          |           0 |          0 |       0.238995  |        1.23331  |
| LaLiga     | 2017-2018 | 8/26/2017 |      6948 | Levante         |           2 |          0 |      0.491246   |        1.16293  | La Coruña       |           2 |          0 |       0.900431  |        0.970152 |
| EPL        | 2017-2018 | 8/26/2017 |      1161 | Crystal Palace  |           0 |          0 |      0.695512   |        0.971546 | Swansea City    |           2 |          1 |       0.0485696 |        0.872608 |
| SerieA     | 2017-2018 | 8/26/2017 |      5424 | Benevento       |           0 |          0 |      0.0259242  |        0.934097 | Bologna         |           1 |          1 |       0.0536546 |        0.680733 |
| SerieA     | 2017-2018 | 8/26/2017 |      5425 | Genoa           |           2 |          0 |      0.419517   |        1.36352  | Juventus        |           4 |          1 |       2.49863   |        0.796813 |
| SerieA     | 2017-2018 | 8/26/2017 |      5426 | Roma            |           1 |          0 |      0.304452   |        1.04076  | Inter           |           3 |          1 |       1.54026   |        1.11905  |
| LaLiga     | 2017-2018 | 8/26/2017 |      6949 | Las Palmas      |           1 |          0 |      2.18267    |        2.13621  | Atlético Madrid |           5 |          1 |       0.786689  |        1.40322  |
| EPL        | 2017-2018 | 8/26/2017 |      1163 | Huddersfield    |           0 |          0 |      0.233084   |        1.02075  | Southampton     |           0 |          0 |       0.421945  |        0.788609 |
| EPL        | 2017-2018 | 8/26/2017 |      1164 | Newcastle Utd   |           3 |          1 |      0.64571    |        0.851852 | West Ham        |           0 |          0 |       0.111658  |        1.53862  |
| EPL        | 2017-2018 | 8/26/2017 |      1160 | Bournemouth     |           1 |          0 |      0          |        0.936573 | Manchester City |           2 |          1 |       0.75978   |        1.00157  |
| LaLiga     | 2017-2018 | 8/26/2017 |      6946 | Alavés          |           0 |          0 |      0.808966   |        0.777028 | Barcelona       |           2 |          1 |       1.92562   |        1.50632  |
| Bundesliga | 2017-2018 | 8/26/2017 |      3980 | Leverkusen      |           2 |          0 |      0.00467929 |        0.901502 | Hoffenheim      |           2 |          0 |       0.19275   |        0.805915 |
| Bundesliga | 2017-2018 | 8/26/2017 |      3976 | Stuttgart       |           1 |          1 |      0.621737   |        1.34013  | Mainz 05        |           0 |          0 |       0.650402  |        0.822117 |
| Bundesliga | 2017-2018 | 8/26/2017 |      3977 | Eint Frankfurt  |           0 |          0 |      0.0249087  |        0.976743 | Wolfsburg       |           1 |          1 |       0.375417  |        0.777637 |
| Ligue1     | 2017-2018 | 8/26/2017 |      2693 | Nantes          |           0 |          0 |      0.747662   |        0.987024 | Lyon            |           0 |          0 |       0.981258  |        1.05934  |

## Output:


source: notebook
label: operator: wide_to_long
wide_to_long_start_idx: 4
wide_to_long_end_idx: 13