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:
| name                                               |    pop |
|:---------------------------------------------------|-------:|
| Claremont, Bathgate                                |  28149 |
| Eastchester, Edenwald, Baychester                  |  35422 |
| Bedford Park, Fordham North                        |  55329 |
| Belmont                                            |  25967 |
| Bronxdale                                          |  34309 |
| West Farms, Bronx River                            |  34542 |
| Soundview, Castle Hill, Clason Point, Harding Park |  50753 |
| Pelham Bay, Country Club, City Island              |  27140 |
| Co, Op City                                        |  40676 |
| East Concourse, Concourse Village                  |  58961 |
| East Tremont                                       |  39280 |
| North Riverdale, Fieldston, Riverdale              |  28013 |
| Highbridge                                         |  33844 |
| Hunts Point                                        |  25142 |
| Van Cortlandt Village                              |  50607 |
| Spuyten Duyvil, Kingsbridge                        |  29872 |
| Kingsbridge Heights                                |  33286 |
| Allerton, Pelham Gardens                           |  28510 |
| Longwood                                           |  23082 |
| Melrose South, Mott Haven North                    |  33195 |
| Morrisania, Melrose                                |  29797 |
| University Heights, Morris Heights                 |  54335 |
| Van Nest, Morris Park, Westchester Square          |  27135 |
| Mott Haven, Port Morris                            |  49030 |
| Fordham South                                      |  26880 |
| Mount Hope                                         |  52649 |
| Norwood                                            |  40817 |
| Williamsbridge, Olinville                          |  57420 |
| Parkchester                                        |  29353 |
| Pelham Parkway                                     |  30006 |
| Schuylerville, Throgs Neck, Edgewater Park         |  43712 |
| Soundview, Bruckner                                |  35137 |
| Westchester, Unionport                             |  25768 |
| Woodlawn, Wakefield                                |  43583 |
| West Concourse                                     |  39557 |
| Crotona Park East                                  |  18072 |
| Rikers Island                                      |  12780 |
| park, cemetery, etc, Bronx                         |    540 |
| Brooklyn Heights, Cobble Hill                      |  22548 |
| Sheepshead Bay, Gerritsen Beach, Manhattn Bch      |  64596 |
| Brighton Beach                                     |  35244 |
| Seagate, Coney Island                              |  34267 |
| West Brighton                                      |  17370 |
| Homecrest                                          |  45679 |
| Gravesend                                          |  29257 |
| Bath Beach                                         |  28572 |
| Bensonhurst West                                   |  84640 |
| Bensonhurst East                                   |  58566 |
| Dyker Heights                                      |  39332 |
| Bay Ridge                                          |  80539 |
| Sunset Park West                                   |  52312 |
| Carroll Gardens, Columbia Street, Red Hook         |  38327 |
| Sunset Park East                                   |  66150 |
| Stuyvesant Heights                                 |  61827 |
| Park Slope, Gowanus                                |  67263 |
| DUMBO, Vinegar Hill, Downtown Brklyn, Boerum Hill  |  30847 |
| Windsor Terrace                                    |  20779 |
| Kensington, Ocean Parkway                          |  36937 |
| Flatbush                                           | 110875 |
| Midwood                                            |  55440 |
| Madison                                            |  39076 |
| Georgetown, Marine Park, Bergen Beach, Mill Basin  |  42940 |
| Ocean Parkway South                                |  20556 |
| Canarsie                                           |  85058 |
| Flatlands                                          |  66726 |
| Prospect Lefferts Gardens, Wingate                 |  70300 |
| Crown Heights North                                | 103462 |
| Crown Heights South                                |  42370 |
| Prospect Heights                                   |  19655 |
| Fort Greene                                        |  28335 |
| Clinton Hill                                       |  33292 |
| Williamsburg                                       |  32269 |
| North Side, South Side                             |  40130 |
| Bedford                                            |  59227 |
| Greenpoint                                         |  37821 |
| Bushwick North                                     |  56093 |
| Bushwick South                                     |  64617 |
| Ocean Hill                                         |  30067 |
| Brownsville                                        |  59099 |
| East New York                                      |  83275 |
| Cypress Hills, City Line                           |  48961 |
| East New York (Pennsylvania Ave)                   |  27624 |
| Borough Park                                       | 101055 |
| East Williamsburg                                  |  31878 |
| East Flatbush, Farragut                            |  56033 |
| Starrett City                                      |  14621 |
| Erasmus                                            |  31392 |
| Rugby, Remsen Village                              |  57934 |
| park, cemetery, etc, Brooklyn                      |     93 |
| Marble Hill, Inwood                                |  49087 |
| Central Harlem North, Polo Grounds                 |  70016 |
| Hamilton Heights                                   |  50555 |
| Manhattanville                                     |  24772 |
| Morningside Heights                                |  54208 |
| Central Harlem South                               |  39075 |
| Upper West Side                                    | 136954 |
| Hudson Yards, Chelsea, Flat Iron, Union Square     |  55839 |
| Lincoln Square                                     |  55239 |
| Clinton                                            |  40595 |
| Midtown, Midtown South                             |  25807 |

## Output:


source: notebook
label: explode