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:
| city       | cuisine_style                                                                                           |   ranking |   rating | reviews_number   |
|:-----------|:--------------------------------------------------------------------------------------------------------|----------:|---------:|:-----------------|
| Paris      | European, French, International                                                                         |      5570 |      3.5 | 194.0            |
| Stockholm  | unknown                                                                                                 |      1537 |      4   | 10.0             |
| London     | Japanese, Sushi, Asian, Grill, Vegetarian Friendly, Vegan Options, Gluten Free Options                  |       353 |      4.5 | 688.0            |
| Berlin     | unknown                                                                                                 |      3458 |      5   | 3.0              |
| Munich     | German, Central European, Vegetarian Friendly                                                           |       621 |      4   | 84.0             |
| Oporto     | unknown                                                                                                 |      1419 |      3   | 2.0              |
| Milan      | Italian, Pizza                                                                                          |      1722 |      4   | 50.0             |
| Bratislava | Italian                                                                                                 |       826 |      3   | 9.0              |
| Vienna     | unknown                                                                                                 |      2692 |      4   |                  |
| Rome       | Italian, Pizza, Fast Food                                                                               |      4210 |      4   | 55.0             |
| Barcelona  | unknown                                                                                                 |      6579 |      3   | 6.0              |
| London     | Italian, Pizza, Vegetarian Friendly                                                                     |      5321 |      4   | 42.0             |
| London     | Italian, Pizza, Vegetarian Friendly, Gluten Free Options                                                |      4073 |      3.5 | 286.0            |
| Berlin     | Vegetarian Friendly, Gluten Free Options                                                                |      4639 |      4.5 | 10.0             |
| Madrid     | Mediterranean, Spanish, Healthy                                                                         |      4776 |      4   | 7.0              |
| Dublin     | Cafe                                                                                                    |      1405 |      4   | 28.0             |
| Berlin     | Japanese, Asian, Thai, Vietnamese                                                                       |      5259 |      4   | 3.0              |
| London     | Bar, Pub                                                                                                |     11131 |      4.5 | 7.0              |
| Berlin     | German                                                                                                  |      3129 |      4   | 12.0             |
| Brussels   | Chinese                                                                                                 |      2792 |      3   | 12.0             |
| Munich     | German, Vegetarian Friendly                                                                             |       370 |      5   | 27.0             |
| Madrid     | unknown                                                                                                 |      5847 |      4   |                  |
| London     | Bar, British, Pub                                                                                       |     13026 |      3.5 | 52.0             |
| Zurich     | Asian, Thai, Vegetarian Friendly, Gluten Free Options, Vegan Options                                    |        73 |      4   | 371.0            |
| London     | Cafe, British                                                                                           |     14984 |      3   | 18.0             |
| Warsaw     | Polish, International, European, Fusion                                                                 |      1077 |      5   | 2.0              |
| Madrid     | unknown                                                                                                 |      2765 |      5   | 11.0             |
| Budapest   | unknown                                                                                                 |      2109 |      3.5 | 2.0              |
| Paris      | unknown                                                                                                 |     10059 |      4.5 | 4.0              |
| Madrid     | unknown                                                                                                 |      8356 |      2.5 | 16.0             |
| Copenhagen | unknown                                                                                                 |      1846 |      3   | 16.0             |
| Amsterdam  | Dutch, European                                                                                         |      2011 |      4.5 | 15.0             |
| Budapest   | unknown                                                                                                 |      1328 |      5   |                  |
| Lyon       | Vietnamese                                                                                              |      2435 |      3   | 4.0              |
| Rome       | Italian, Pizza                                                                                          |      2428 |      4.5 | 69.0             |
| Madrid     | Italian, Mexican, Venezuelan, South American                                                            |      2047 |      4.5 | 20.0             |
| Milan      | Italian                                                                                                 |      5845 |      3   | 104.0            |
| Rome       | Japanese, Sushi, Asian                                                                                  |      5210 |      5   | 2.0              |
| Paris      | French                                                                                                  |     11293 |      4.5 | 10.0             |
| Milan      | unknown                                                                                                 |      3133 |      4   | 7.0              |
| Madrid     | Bar, Cafe, Mediterranean, Pub                                                                           |      2713 |      4.5 | 9.0              |
| Paris      | Asian, Thai, Vegetarian Friendly                                                                        |      5460 |      3.5 | 132.0            |
| Hamburg    | Soups, Healthy, Vegetarian Friendly, Vegan Options, Gluten Free Options                                 |       165 |      4.5 | 73.0             |
| Paris      | Pub                                                                                                     |      9926 |      3.5 | 39.0             |
| Lisbon     | Japanese                                                                                                |      2195 |      4   | 7.0              |
| London     | Pizza                                                                                                   |     11955 |      4   | 3.0              |
| Madrid     | Italian                                                                                                 |      8467 |      2   | 4.0              |
| Brussels   | Belgian, European, Vegetarian Friendly, Vegan Options, Gluten Free Options                              |        76 |      4   | 484.0            |
| Barcelona  | Cafe, Mediterranean, Spanish, Vegetarian Friendly                                                       |      2099 |      4   | 41.0             |
| Paris      | French, European, Vegetarian Friendly                                                                   |      1049 |      4.5 | 281.0            |
| Copenhagen | Chinese, Fast Food                                                                                      |      1912 |      2.5 | 9.0              |
| London     | unknown                                                                                                 |     10151 |      4   | 5.0              |
| Paris      | French, Vietnamese                                                                                      |      9233 |      4   | 25.0             |
| Dublin     | Italian, Pizza, European, Vegetarian Friendly, Vegan Options, Gluten Free Options                       |       280 |      4   | 257.0            |
| Amsterdam  | Steakhouse, Latin, Barbecue, European, Argentinean, South American, Vegetarian Friendly                 |       156 |      4.5 | 482.0            |
| Prague     | Cafe                                                                                                    |      2628 |      4.5 | 4.0              |
| Lyon       | Italian                                                                                                 |      1586 |      4   | 25.0             |
| Madrid     | unknown                                                                                                 |      5513 |      4.5 | 6.0              |
| Milan      | Japanese, Sushi, Vegetarian Friendly                                                                    |       548 |      4   | 554.0            |
| Paris      | unknown                                                                                                 |     10034 |      4.5 | 2.0              |
| London     | unknown                                                                                                 |      8764 |      4.5 | 4.0              |
| Warsaw     | unknown                                                                                                 |      1622 |      4   | 2.0              |
| Barcelona  | Spanish                                                                                                 |      3663 |      4   | 26.0             |
| Budapest   | Healthy, Mediterranean, Vegetarian Friendly                                                             |       151 |      4.5 | 1317.0           |
| Dublin     | Irish, Seafood, European, Soups, Vegetarian Friendly, Gluten Free Options                               |        53 |      4.5 | 1820.0           |
| Budapest   | unknown                                                                                                 |      1982 |      3.5 | 8.0              |
| Barcelona  | Japanese, Asian, Fusion, Vegetarian Friendly, Gluten Free Options                                       |       534 |      4   | 1060.0           |
| Barcelona  | Seafood, Mediterranean, Spanish                                                                         |      2069 |      4   | 112.0            |
| Paris      | unknown                                                                                                 |      8650 |      4.5 | 3.0              |
| Paris      | Chinese, Asian                                                                                          |      2274 |      4   | 157.0            |
| Oslo       | Italian, Pizza                                                                                          |       644 |      4   | 19.0             |
| Zurich     | Swiss, European                                                                                         |       855 |      4.5 | 12.0             |
| Dublin     | French, Irish, European                                                                                 |       794 |      5   | 8.0              |
| Milan      | unknown                                                                                                 |      6032 |      2.5 | 2.0              |
| London     | Bar, International                                                                                      |      7131 |      4   | 79.0             |
| Dublin     | unknown                                                                                                 |      1250 |      5   | 3.0              |
| Lisbon     | European, Portuguese, Mediterranean, Contemporary, Wine Bar, Vegetarian Friendly                        |       888 |      4.5 | 66.0             |
| Amsterdam  | Italian, European, Vegetarian Friendly, Gluten Free Options                                             |       775 |      4   | 138.0            |
| Madrid     | Spanish, Cafe                                                                                           |      6028 |      3.5 | 20.0             |
| Budapest   | Seafood, Mediterranean, European, Greek, Soups, Vegetarian Friendly, Vegan Options, Gluten Free Options |        36 |      4.5 | 2340.0           |
| London     | Mexican, Fast Food, South American, Central American, Vegetarian Friendly                               |     13825 |      3.5 | 28.0             |
| Helsinki   | Japanese, Sushi, Asian                                                                                  |      1013 |      3   | 19.0             |
| Rome       | Italian, Pizza, Mediterranean, Barbecue, Grill, Vegetarian Friendly                                     |       362 |      4.5 | 288.0            |
| Berlin     | Sushi                                                                                                   |      3672 |      4.5 | 10.0             |
| Berlin     | Mediterranean, Grill, Italian, German, European, Vegetarian Friendly                                    |      2173 |      3.5 | 130.0            |
| Milan      | Chinese, Japanese, Seafood, Sushi, Vegetarian Friendly                                                  |      1463 |      3.5 | 283.0            |
| Amsterdam  | unknown                                                                                                 |      1485 |      5   | 12.0             |
| Zurich     | Italian                                                                                                 |      1370 |      3.5 | 25.0             |
| Oslo       | Indian, Asian, Vegetarian Friendly, Vegan Options, Gluten Free Options                                  |         9 |      4.5 | 956.0            |
| Brussels   | unknown                                                                                                 |      1019 |      4.5 | 45.0             |
| Lyon       | unknown                                                                                                 |       500 |      4.5 | 45.0             |
| Vienna     | Middle Eastern, Turkish                                                                                 |      1467 |      4   | 21.0             |
| London     | Fast Food, Healthy                                                                                      |      7823 |      4   | 21.0             |
| Vienna     | South American, Latin, Central American, Venezuelan                                                     |       690 |      4.5 | 29.0             |
| Edinburgh  | Pub, Bar                                                                                                |      1728 |      2   | 26.0             |
| Paris      | French, Seafood, European                                                                               |      3704 |      3.5 | 1135.0           |
| Prague     | unknown                                                                                                 |      3419 |      3.5 | 27.0             |
| Munich     | Healthy, Central European, Vegetarian Friendly                                                          |       542 |      4.5 | 59.0             |
| Munich     | Italian, Pizza                                                                                          |      1447 |      4   | 21.0             |
| Amsterdam  | Chinese                                                                                                 |      1842 |      4.5 | 17.0             |

## Output:


source: notebook
label: explode