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:
|   Index | cast                                                                                       |    revenue | original_title                                  |
|--------:|:-------------------------------------------------------------------------------------------|-----------:|:------------------------------------------------|
|     970 | Robert Downey Jr., Chris Evans, Mark Ruffalo, Chris Hemsworth, Scarlett Johansson          | 1519557910 | The Avengers                                    |
|     971 | Kate Beckinsale, Stephen Rea, Michael Ealy, Theo James, India Eisley                       |  132400000 | Underworld: Awakening                           |
|     972 | Christian Bale, Michael Caine, Gary Oldman, Anne Hathaway, Tom Hardy                       | 1081041287 | The Dark Knight Rises                           |
|     973 | Jamie Foxx, Christoph Waltz, Leonardo DiCaprio, Kerry Washington, Samuel L. Jackson        |  425368238 | Django Unchained                                |
|     974 | Daniel Craig, Judi Dench, Javier Bardem, Ralph Fiennes, Naomie Harris                      | 1108561013 | Skyfall                                         |
|     975 | Jeremy Renner, Rachel Weisz, Edward Norton, Scott Glenn, Stacy Keach                       |  276572938 | The Bourne Legacy                               |
|     976 | Ian McKellen, Martin Freeman, Richard Armitage, Andy Serkis, Cate Blanchett                | 1017003568 | The Hobbit: An Unexpected Journey               |
|     977 | Noomi Rapace, Michael Fassbender, Charlize Theron, Idris Elba, Guy Pearce                  |  403170142 | Prometheus                                      |
|     978 | Bradley Cooper, Jennifer Lawrence, Robert De Niro, Jacki Weaver, Chris Tucker              |  205738714 | Silver Linings Playbook                         |
|     979 | Andrew Garfield, Emma Stone, Rhys Ifans, Denis Leary, Martin Sheen                         |  752215857 | The Amazing Spider-Man                          |
|     980 | Kelly Macdonald, Julie Walters, Billy Connolly, Emma Thompson, Kevin McKidd                |  538983207 | Brave                                           |
|     981 | Kristen Stewart, Charlize Theron, Chris Hemsworth, Sam Claflin, Ian McShane                |  396600000 | Snow White and the Huntsman                     |
|     982 | Channing Tatum, Jonah Hill, Brie Larson, Dave Franco, Ellie Kemper                         |  201585328 | 21 Jump Street                                  |
|     983 | Suraj Sharma, Irrfan Khan, Ayush Tandon, Gautam Belur, Adil Hussain                        |  609016565 | Life of Pi                                      |
|     984 | John Leguizamo, Ray Romano, Chris Wedge, Denis Leary, Seann William Scott                  |  877244782 | Ice Age: Continental Drift                      |
|     985 | Mark Wahlberg, Mila Kunis, Seth MacFarlane, Joel McHale, Giovanni Ribisi                   |  549368315 | Ted                                             |
|     986 | Tom Cruise, Rosamund Pike, Richard Jenkins, David Oyelowo, Werner Herzog                   |  218340595 | Jack Reacher                                    |
|     987 | Naomi Watts, Ewan McGregor, Tom Holland, Samuel Joslin, Oaklee Pendergast                  |  180274123 | Lo imposible                                    |
|     988 | John C. Reilly, Sarah Silverman, Jane Lynch, Jack McBrayer, Jamie Elman                    |  471222889 | Wreck-It Ralph                                  |
|     989 | Anna Kendrick, Skylar Astin, Brittany Snow, Anna Camp, Rebel Wilson                        |  115350426 | Pitch Perfect                                   |
|     990 | Will Smith, Tommy Lee Jones, Josh Brolin, Michael Stuhlbarg, Emma Thompson                 |  624026776 | Men in Black 3                                  |
|     991 | Jennifer Lawrence, Josh Hutcherson, Liam Hemsworth, Woody Harrelson, Elizabeth Banks       |  691210692 | The Hunger Games                                |
|     992 | Colin Farrell, Kate Beckinsale, Jessica Biel, Bryan Cranston, Bill Nighy                   |  198802074 | Total Recall                                    |
|     993 | Tom Hanks, Halle Berry, Jim Broadbent, Hugo Weaving, Jim Sturgess                          |  130482868 | Cloud Atlas                                     |
|     994 | Sylvester Stallone, Jason Statham, Dolph Lundgren, Bruce Willis, Arnold Schwarzenegger     |  312573423 | The Expendables 2                               |
|     995 | Liam Neeson, Maggie Grace, Famke Janssen, Rade Serbedzija, Luke Grimes                     |  376141306 | Taken 2                                         |
|     996 | Johnny Depp, Michelle Pfeiffer, Helena Bonham Carter, Jackie Earle Haley, Jonny Lee Miller |  245527149 | Dark Shadows                                    |
|     997 | Logan Lerman, Emma Watson, Ezra Miller, Paul Rudd, Nina Dobrev                             |   33400000 | The Perks of Being a Wallflower                 |
|     998 | Ben Affleck, Bryan Cranston, Alan Arkin, John Goodman, Victor Garber                       |  232324128 | Argo                                            |
|     999 | Jason Biggs, Alyson Hannigan, Seann William Scott, Chris Klein, Thomas Ian Nicholas        |  234989584 | American Reunion                                |
|    1000 | Channing Tatum, Matthew McConaughey, Olivia Munn, Cody Horn, Alex Pettyfer                 |  167221571 | Magic Mike                                      |
|    1001 | Kristen Connolly, Chris Hemsworth, Anna Hutchison, Fran Kranz, Jesse Williams              |   66486080 | The Cabin in the Woods                          |
|    1002 | Chris Pine, Alec Baldwin, Jude Law, Isla Fisher, Hugh Jackman                              |  306941670 | Rise of the Guardians                           |
|    1003 | Rachel McAdams, Channing Tatum, Sam Neill, Scott Speedman, Jessica Lange                   |  196114570 | The Vow                                         |
|    1004 | Dwayne Johnson, Josh Hutcherson, Kristin Davis, Vanessa Hudgens, Luis GuzmÃ¡n              |  355692760 | Journey 2: The Mysterious Island                |
|    1005 | Jason Statham, Chris Sarandon, James Hong, Catherine Chan, Robert John Burke               |   40346186 | Safe                                            |
|    1006 | Benjamin Walker, Dominic Cooper, Anthony Mackie, Mary Elizabeth Winstead, Rufus Sewell     |  112265139 | Abraham Lincoln: Vampire Hunter                 |
|    1007 | Kirsten Dunst, Jim Sturgess, Timothy Spall, James Kidnie, Heidi Hawkins                    |    8106475 | Upside Down                                     |
|    1008 | Zac Efron, Danny DeVito, Taylor Swift, Ed Helms, Rob Riggle                                |  348840316 | The Lorax                                       |
|    1009 | Bruce Willis, Edward Norton, Jared Gilman, Kara Hayward, Bill Murray                       |   68263166 | Moonrise Kingdom                                |
|    1010 | Karl Urban, Olivia Thirlby, Lena Headey, Wood Harris, Jason Cope                           |   41037742 | Dredd                                           |
|    1011 | Taylor Kitsch, Alexander SkarsgÃ¥rd, Rihanna, Brooklyn Decker, Tadanobu Asano              |  303025485 | Battleship                                      |
|    1012 | Hugh Jackman, Russell Crowe, Anne Hathaway, Amanda Seyfried, Sacha Baron Cohen             |  441809770 | Les MisÃ©rables                                 |
|    1013 | Julia Roberts, Lily Collins, Armie Hammer, Nathan Lane, Martin Klebba                      |  183018522 | Mirror Mirror                                   |
|    1014 | Taylor Kitsch, Lynn Collins, Mark Strong, Willem Dafoe, CiarÃ¡n Hinds                      |  284139100 | John Carter                                     |
|    1015 | Joseph Gordon-Levitt, Bruce Willis, Emily Blunt, Paul Dano, Noah Segan                     |   47042000 | Looper                                          |
|    1016 | Kristen Stewart, Robert Pattinson, Taylor Lautner, Peter Facinelli, Elizabeth Reaser       |  829000000 | The Twilight Saga: Breaking Dawn - Part 2       |
|    1017 | Jessica Chastain, Jason Clarke, Mark Strong, Joel Edgerton, Chris Pratt                    |  132820716 | Zero Dark Thirty                                |
|    1018 | Gina Carano, Ewan McGregor, Michael Fassbender, Bill Paxton, Channing Tatum                |   33372606 | Haywire                                         |
|    1019 | Sam Worthington, Liam Neeson, Ralph Fiennes, Rosamund Pike, Edgar RamÃ­rez                  |  301000000 | Wrath of the Titans                             |
|    1020 | Kathryn McCormick, Ryan Guzman, Stephen Boss, Megan Boone, Jessica Guadix                  |  140470746 | Step Up Revolution                              |
|    1021 | Dane DeHaan, Alex Russell, Michael B. Jordan, Michael Kelly, Anna Wood                     |  145000000 | Chronicle                                       |
|    1022 | Roselyn SÃ¡nchez, Emilio Rivera, Nestor Serrano, Gonzalo Menendez, Alexander Asefa         |   81272766 | Act of Valor                                    |
|    1023 | Adam Sandler, Steve Buscemi, David Spade, Kevin James, Selena Gomez                        |  358375603 | Hotel Transylvania                              |
|    1024 | Jake Gyllenhaal, Michael PeÃ±a, Natalie Martinez, Anna Kendrick, David Harbour             |   48126384 | End of Watch                                    |
|    1025 | Cameron Diaz, Jennifer Lopez, Elizabeth Banks, Anna Kendrick, Brooklyn Decker              |   79700000 | What to Expect When You're Expecting            |
|    1026 | Sacha Baron Cohen, Sayed Badreya, Aasif Mandvi, Megan Fox, Anna Faris                      |  179379533 | The Dictator                                    |
|    1027 | Oliver Cooper, Jonathan Daniel Brown, Thomas Mann, Dax Flame, Kirby Bliss Blanton          |  100000000 | Project X                                       |
|    1028 | Mark Wahlberg, Kate Beckinsale, Ben Foster, Giovanni Ribisi, J.K. Simmons                  |   63100000 | Contraband                                      |
|    1029 | Ben Stiller, Sacha Baron Cohen, David Schwimmer, Frances McDormand, Chris Rock             |  746921274 | Madagascar 3: Europe's Most Wanted              |
|    1030 | Shia LaBeouf, Tom Hardy, Guy Pearce, Jessica Chastain, Mia Wasikowska                      |   53676580 | Lawless                                         |
|    1031 | John Cusack, Luke Evans, Alice Eve, Brendan Gleeson, Kevin McNally                         |   29657751 | The Raven                                       |
|    1032 | Tom Cruise, Alec Baldwin, Diego Boneta, Julianne Hough, Bryan Cranston                     |   59418613 | Rock of Ages                                    |
|    1033 | Nicolas Cage, Malin Ã…kerman, Josh Lucas, Sami Gayle, Danny Huston                         |    2106557 | Stolen                                          |
|    1034 | Hugh Grant, Brendan Gleeson, Jeremy Piven, Brian Blessed, Salma Hayek                      |  118338361 | The Pirates! In an Adventure with Scientists!   |
|    1035 | Joaquin Phoenix, Philip Seymour Hoffman, Amy Adams, Laura Dern, Jesse Plemons              |   28258060 | The Master                                      |
|    1036 | Emily Blunt, Alison Brie, Jason Segel, Rhys Ifans, Chris Pratt                             |   53909751 | The Five-Year Engagement                        |
|    1037 | Paul Rudd, Leslie Mann, Jason Segel, Maude Apatow, Megan Fox                               |   88058786 | This Is 40                                      |
|    1038 | Guy Pearce, Maggie Grace, Joseph Gilgun, Lennie James, Peter Stormare                      |   32204030 | Lockout                                         |
|    1039 | Paul Rudd, Jennifer Aniston, Justin Theroux, Malin Ã…kerman, Lauren Ambrose                |   24159934 | Wanderlust                                      |
|    1040 | Daniel Radcliffe, CiarÃ¡n Hinds, Sidney Johnston, Alisa Khazanova, Mary Stockley           |  127730736 | The Woman in Black                              |
|    1041 | Charlie Tahan, Winona Ryder, Catherine O'Hara, Martin Short, Martin Landau                 |   81491068 | Frankenweenie                                   |
|    1042 | Adam Sandler, Susan Sarandon, Eva Amurri Martino, Leighton Meester, Andy Samberg           |   58058367 | That's My Boy                                   |
|    1043 | Denzel Washington, Ryan Reynolds, Vera Farmiga, Joel Kinnaman, Brendan Gleeson             |  208076205 | Safe House                                      |
|    1044 | Blake Lively, Taylor Kitsch, Aaron Taylor-Johnson, Benicio del Toro, Salma Hayek           |   47000000 | Savages                                         |
|    1045 | Sam Worthington, Elizabeth Banks, Jamie Bell, Ed Harris, Edward Burns                      |   46221189 | Man on a Ledge                                  |
|    1046 | Colin Farrell, Sam Rockwell, Christopher Walken, Woody Harrelson, Abbie Cornish            |   19422261 | Seven Psychopaths                               |
|    1047 | Drew Barrymore, John Krasinski, Kristen Bell, Vinessa Shaw, Dermot Mulroney                |   24719215 | Big Miracle                                     |
|    1048 | Jason Bateman, Hope Davis, Frank Grillo, Paula Patton, Michael Nyqvist                     |    3428048 | Disconnect                                      |
|    1049 | Chris Pine, Elizabeth Banks, Olivia Wilde, Michelle Pfeiffer, Mark Duplass                 |   12434778 | People Like Us                                  |
|    1050 | Danielle Panabaker, Matt Bush, Katrina Bowden, Jean-Luc Bilodeau, David Koechner           |    8493728 | Piranha 3DD                                     |
|    1051 | Jeffrey Dean Morgan, Natasha Calis, Madison Davenport, Kyra Sedgwick, Rob LaBelle          |   85446075 | The Possession                                  |
|    1052 | Adelaide Clemens, Kit Harington, Sean Bean, Carrie-Anne Moss, Radha Mitchell               |   52302796 | Silent Hill: Revelation 3D                      |
|    1053 | Brad Pitt, Scoot McNairy, Ben Mendelsohn, James Gandolfini, Ray Liotta                     |   37930465 | Killing Them Softly                             |
|    1054 | Henry Cavill, VerÃ³nica Echegui, Sigourney Weaver, Bruce Willis, Caroline Goodall          |   16863583 | The Cold Light of Day                           |
|    1055 | Richard Gere, Susan Sarandon, Tim Roth, Brit Marling, Monica Raymund                       |   35485056 | Arbitrage                                       |
|    1056 | Chris Hemsworth, Josh Hutcherson, Isabel Lucas, Adrianne Palicki, Jeffrey Dean Morgan      |   44806783 | Red Dawn                                        |
|    1057 | Sean Hayes, Will Sasso, Chris Diamantopoulos, SofÃ­a Vergara, Jane Lynch                    |   54819301 | The Three Stooges                               |
|    1058 | Meryl Streep, Steve Carell, Tommy Lee Jones, Jean Smart, Marin Ireland                     |  114281051 | Hope Springs                                    |
|    1059 | Eddie Murphy, Allison Janney, Cliff Curtis, Clark Duke, Kerry Washington                   |   22044277 | A Thousand Words                                |
|    1060 | Tyler Perry, Rachel Nichols, Jean Reno, Matthew Fox, Giancarlo Esposito                    |   30353232 | Alex Cross                                      |
|    1061 | Katherine Heigl, John Leguizamo, Debbie Reynolds, Sherri Shepherd, Patrick Fischler        |   36893721 | One for the Money                               |
|    1062 | Maggie Smith, Tom Courtenay, Billy Connolly, Pauline Collins, Michael Gambon               |   59520298 | Quartet                                         |
|    1063 | Kodi Smit-McPhee, Tucker Albrizzi, Jodelle Ferland, Anna Kendrick, Casey Affleck           |  107139399 | ParaNorman                                      |
|    1064 | Matt Damon, John Krasinski, Frances McDormand, Rosemarie DeWitt, Lucas Black               |    8138788 | Promised Land                                   |
|    1065 | Devon Bostick, Steve Zahn, Peyton List, Rachael Harris, Zachary Gordon                     |   77112176 | Diary of a Wimpy Kid: Dog Days                  |
|    1066 | Eva Longoria, Andy GarcÃ­a, Oscar Isaac, Peter O'Toole, RubÃ©n Blades                       |    9622846 | For Greater Glory - The True Story of Cristiada |
|    1067 | Bryan Cranston, David Oyelowo, Cuba Gooding Jr., Daniela Ruah, Terrence Howard             |   50365377 | Red Tails                                       |
|    1068 | Victoria Justice, Jackson Nicoll, Chelsea Handler, Josh Pence, Jane Levy                   |   11417362 | Fun Size                                        |
|    1069 | Joseph Gordon-Levitt, Michael Shannon, Dania Ramirez, Jamie Chung, WolÃ© Parks             |   31083599 | Premium Rush                                    |

## Output:


source: notebook
label: explode