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:
|     id | title                                                          | cast_0                | cast_1               | cast_2             |
|-------:|:---------------------------------------------------------------|:----------------------|:---------------------|:-------------------|
|  19995 | Avatar                                                         | Sam Worthington       | Zoe Saldana          | Sigourney Weaver   |
|    285 | Pirates of the Caribbean: At World's End                       | Johnny Depp           | Orlando Bloom        | Keira Knightley    |
| 206647 | Spectre                                                        | Daniel Craig          | Christoph Waltz      | Léa Seydoux        |
|  49026 | The Dark Knight Rises                                          | Christian Bale        | Michael Caine        | Gary Oldman        |
|  49529 | John Carter                                                    | Taylor Kitsch         | Lynn Collins         | Samantha Morton    |
|    559 | Spider-Man 3                                                   | Tobey Maguire         | Kirsten Dunst        | James Franco       |
|  38757 | Tangled                                                        | Zachary Levi          | Mandy Moore          | Donna Murphy       |
|  99861 | Avengers: Age of Ultron                                        | Robert Downey Jr.     | Chris Hemsworth      | Mark Ruffalo       |
|    767 | Harry Potter and the Half-Blood Prince                         | Daniel Radcliffe      | Rupert Grint         | Emma Watson        |
| 209112 | Batman v Superman: Dawn of Justice                             | Ben Affleck           | Henry Cavill         | Gal Gadot          |
|   1452 | Superman Returns                                               | Brandon Routh         | Kevin Spacey         | Kate Bosworth      |
|  10764 | Quantum of Solace                                              | Daniel Craig          | Olga Kurylenko       | Mathieu Amalric    |
|     58 | Pirates of the Caribbean: Dead Man's Chest                     | Johnny Depp           | Orlando Bloom        | Keira Knightley    |
|  57201 | The Lone Ranger                                                | Johnny Depp           | Armie Hammer         | William Fichtner   |
|  49521 | Man of Steel                                                   | Henry Cavill          | Amy Adams            | Michael Shannon    |
|   2454 | The Chronicles of Narnia: Prince Caspian                       | Ben Barnes            | William Moseley      | Anna Popplewell    |
|  24428 | The Avengers                                                   | Robert Downey Jr.     | Chris Evans          | Mark Ruffalo       |
|   1865 | Pirates of the Caribbean: On Stranger Tides                    | Johnny Depp           | Penélope Cruz        | Ian McShane        |
|  41154 | Men in Black 3                                                 | Will Smith            | Tommy Lee Jones      | Josh Brolin        |
| 122917 | The Hobbit: The Battle of the Five Armies                      | Martin Freeman        | Ian McKellen         | Richard Armitage   |
|   1930 | The Amazing Spider-Man                                         | Andrew Garfield       | Emma Stone           | Rhys Ifans         |
|  20662 | Robin Hood                                                     | Russell Crowe         | Cate Blanchett       | Max von Sydow      |
|  57158 | The Hobbit: The Desolation of Smaug                            | Martin Freeman        | Ian McKellen         | Richard Armitage   |
|   2268 | The Golden Compass                                             | Dakota Blue Richards  | Nicole Kidman        | Daniel Craig       |
|    254 | King Kong                                                      | Naomi Watts           | Jack Black           | Adrien Brody       |
|    597 | Titanic                                                        | Kate Winslet          | Leonardo DiCaprio    | Frances Fisher     |
| 271110 | Captain America: Civil War                                     | Chris Evans           | Robert Downey Jr.    | Scarlett Johansson |
|  44833 | Battleship                                                     | Taylor Kitsch         | Alexander Skarsgård  | Rihanna            |
| 135397 | Jurassic World                                                 | Chris Pratt           | Bryce Dallas Howard  | Irrfan Khan        |
|  37724 | Skyfall                                                        | Daniel Craig          | Judi Dench           | Javier Bardem      |
|    558 | Spider-Man 2                                                   | Tobey Maguire         | Kirsten Dunst        | James Franco       |
|  68721 | Iron Man 3                                                     | Robert Downey Jr.     | Gwyneth Paltrow      | Don Cheadle        |
|  12155 | Alice in Wonderland                                            | Mia Wasikowska        | Johnny Depp          | Anne Hathaway      |
|  36668 | X-Men: The Last Stand                                          | Hugh Jackman          | Halle Berry          | Ian McKellen       |
|  62211 | Monsters University                                            | Billy Crystal         | John Goodman         | Steve Buscemi      |
|   8373 | Transformers: Revenge of the Fallen                            | Shia LaBeouf          | Megan Fox            | Josh Duhamel       |
|  91314 | Transformers: Age of Extinction                                | Mark Wahlberg         | Stanley Tucci        | Kelsey Grammer     |
|  68728 | Oz: The Great and Powerful                                     | James Franco          | Mila Kunis           | Rachel Weisz       |
| 102382 | The Amazing Spider-Man 2                                       | Andrew Garfield       | Emma Stone           | Jamie Foxx         |
|  20526 | TRON: Legacy                                                   | Garrett Hedlund       | Jeff Bridges         | Olivia Wilde       |
|  49013 | Cars 2                                                         | Owen Wilson           | Larry the Cable Guy  | Michael Caine      |
|  44912 | Green Lantern                                                  | Ryan Reynolds         | Blake Lively         | Peter Sarsgaard    |
|  10193 | Toy Story 3                                                    | Tom Hanks             | Tim Allen            | Ned Beatty         |
|    534 | Terminator Salvation                                           | Christian Bale        | Sam Worthington      | Anton Yelchin      |
| 168259 | Furious 7                                                      | Vin Diesel            | Paul Walker          | Dwayne Johnson     |
|  72190 | World War Z                                                    | Brad Pitt             | Mireille Enos        | Abigail Hargrove   |
| 127585 | X-Men: Days of Future Past                                     | Hugh Jackman          | James McAvoy         | Michael Fassbender |
|  54138 | Star Trek Into Darkness                                        | Chris Pine            | Zachary Quinto       | Zoe Saldana        |
|  81005 | Jack the Giant Slayer                                          | Nicholas Hoult        | Eleanor Tomlinson    | Ewan McGregor      |
|  64682 | The Great Gatsby                                               | Leonardo DiCaprio     | Tobey Maguire        | Carey Mulligan     |
|   9543 | Prince of Persia: The Sands of Time                            | Jake Gyllenhaal       | Gemma Arterton       | Ben Kingsley       |
|  68726 | Pacific Rim                                                    | Idris Elba            | Charlie Hunnam       | Charlie Day        |
|  38356 | Transformers: Dark of the Moon                                 | Shia LaBeouf          | John Malkovich       | Ken Jeong          |
|    217 | Indiana Jones and the Kingdom of the Crystal Skull             | Harrison Ford         | Cate Blanchett       | Shia LaBeouf       |
| 105864 | The Good Dinosaur                                              | Raymond Ochoa         | Jack Bright          | Jeffrey Wright     |
|  62177 | Brave                                                          | Kelly Macdonald       | Julie Walters        | Billy Connolly     |
| 188927 | Star Trek Beyond                                               | Chris Pine            | Zachary Quinto       | Karl Urban         |
|  10681 | WALL·E                                                         | Ben Burtt             | Elissa Knight        | Jeff Garlin        |
|   5174 | Rush Hour 3                                                    | Chris Tucker          | Jackie Chan          | Hiroyuki Sanada    |
|  14161 | 2012                                                           | John Cusack           | Amanda Peet          | Chiwetel Ejiofor   |
|  17979 | A Christmas Carol                                              | Gary Oldman           | Jim Carrey           | Steve Valentine    |
|  76757 | Jupiter Ascending                                              | Mila Kunis            | Channing Tatum       | Sean Bean          |
| 258489 | The Legend of Tarzan                                           | Alexander Skarsgård   | Margot Robbie        | Christoph Waltz    |
|    411 | The Chronicles of Narnia: The Lion, the Witch and the Wardrobe | William Moseley       | Anna Popplewell      | Skandar Keynes     |
| 246655 | X-Men: Apocalypse                                              | James McAvoy          | Michael Fassbender   | Jennifer Lawrence  |
|    155 | The Dark Knight                                                | Christian Bale        | Heath Ledger         | Aaron Eckhart      |
|  14160 | Up                                                             | Ed Asner              | Christopher Plummer  | Jordan Nagai       |
|  15512 | Monsters vs Aliens                                             | Seth Rogen            | Reese Witherspoon    | Hugh Laurie        |
|   1726 | Iron Man                                                       | Robert Downey Jr.     | Terrence Howard      | Jeff Bridges       |
|  44826 | Hugo                                                           | Ben Kingsley          | Sacha Baron Cohen    | Asa Butterfield    |
|   8487 | Wild Wild West                                                 | Will Smith            | Kevin Kline          | Kenneth Branagh    |
|   1735 | The Mummy: Tomb of the Dragon Emperor                          | Brendan Fraser        | Jet Li               | John Hannah        |
| 297761 | Suicide Squad                                                  | Will Smith            | Margot Robbie        | Joel Kinnaman      |
|   2698 | Evan Almighty                                                  | Steve Carell          | Lauren Graham        | John Goodman       |
| 137113 | Edge of Tomorrow                                               | Tom Cruise            | Emily Blunt          | Brendan Gleeson    |
|   9804 | Waterworld                                                     | Kevin Costner         | Chaim Girafi         | Rick Aviles        |
|  14869 | G.I. Joe: The Rise of Cobra                                    | Dennis Quaid          | Channing Tatum       | Marlon Wayans      |
| 150540 | Inside Out                                                     | Amy Poehler           | Phyllis Smith        | Richard Kind       |
| 278927 | The Jungle Book                                                | Neel Sethi            | Bill Murray          | Ben Kingsley       |
|  10138 | Iron Man 2                                                     | Robert Downey Jr.     | Gwyneth Paltrow      | Don Cheadle        |
|  58595 | Snow White and the Huntsman                                    | Kristen Stewart       | Charlize Theron      | Chris Hemsworth    |
| 102651 | Maleficent                                                     | Angelina Jolie        | Elle Fanning         | Sharlto Copley     |
| 119450 | Dawn of the Planet of the Apes                                 | Andy Serkis           | Jason Clarke         | Gary Oldman        |
|  79698 | The Lovers                                                     | Josh Hartnett         | Simone Kessell       | Tamsin Egerton     |
|  64686 | 47 Ronin                                                       | Keanu Reeves          | Hiroyuki Sanada      | Kou Shibasaki      |
| 100402 | Captain America: The Winter Soldier                            | Chris Evans           | Samuel L. Jackson    | Scarlett Johansson |
|  10192 | Shrek Forever After                                            | Mike Myers            | Eddie Murphy         | Cameron Diaz       |
| 158852 | Tomorrowland                                                   | Britt Robertson       | George Clooney       | Raffey Cassidy     |
| 177572 | Big Hero 6                                                     | Scott Adsit           | Ryan Potter          | Daniel Henney      |
|  82690 | Wreck-It Ralph                                                 | John C. Reilly        | Sarah Silverman      | Jack McBrayer      |
|   5255 | The Polar Express                                              | Tom Hanks             | Michael Jeter        | Nona Gaye          |
|  47933 | Independence Day: Resurgence                                   | Liam Hemsworth        | Jeff Goldblum        | Bill Pullman       |
|  10191 | How to Train Your Dragon                                       | Jay Baruchel          | Gerard Butler        | Craig Ferguson     |
|    296 | Terminator 3: Rise of the Machines                             | Arnold Schwarzenegger | Nick Stahl           | Claire Danes       |
| 118340 | Guardians of the Galaxy                                        | Chris Pratt           | Zoe Saldana          | Dave Bautista      |
| 157336 | Interstellar                                                   | Matthew McConaughey   | Jessica Chastain     | Anne Hathaway      |
|  27205 | Inception                                                      | Leonardo DiCaprio     | Joseph Gordon-Levitt | Ellen Page         |
| 315011 | Shin Godzilla                                                  | Hiroki Hasegawa       | Yutaka Takenouchi    | Satomi Ishihara    |
|  49051 | The Hobbit: An Unexpected Journey                              | Ian McKellen          | Martin Freeman       | Richard Armitage   |
|   9799 | The Fast and the Furious                                       | Paul Walker           | Vin Diesel           | Michelle Rodriguez |

## Output:


source: notebook
label: operator: stack
stack_start_idx: 2
stack_end_idx: 4