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 | imdb_id   | cast                                                                                  |
|--------:|:----------|:--------------------------------------------------------------------------------------|
|       0 | tt0369610 | Chris Pratt, Bryce Dallas Howard, Irrfan Khan, Vincent D'Onofrio, Nick Robinson       |
|       0 | tt0369610 | Chris Pratt, Bryce Dallas Howard, Irrfan Khan, Vincent D'Onofrio, Nick Robinson       |
|       0 | tt0369610 | Chris Pratt, Bryce Dallas Howard, Irrfan Khan, Vincent D'Onofrio, Nick Robinson       |
|       0 | tt0369610 | Chris Pratt, Bryce Dallas Howard, Irrfan Khan, Vincent D'Onofrio, Nick Robinson       |
|       0 | tt0369610 | Chris Pratt, Bryce Dallas Howard, Irrfan Khan, Vincent D'Onofrio, Nick Robinson       |
|       1 | tt1392190 | Tom Hardy, Charlize Theron, Hugh Keays-Byrne, Nicholas Hoult, Josh Helman             |
|       1 | tt1392190 | Tom Hardy, Charlize Theron, Hugh Keays-Byrne, Nicholas Hoult, Josh Helman             |
|       1 | tt1392190 | Tom Hardy, Charlize Theron, Hugh Keays-Byrne, Nicholas Hoult, Josh Helman             |
|       1 | tt1392190 | Tom Hardy, Charlize Theron, Hugh Keays-Byrne, Nicholas Hoult, Josh Helman             |
|       1 | tt1392190 | Tom Hardy, Charlize Theron, Hugh Keays-Byrne, Nicholas Hoult, Josh Helman             |
|       2 | tt2908446 | Shailene Woodley, Theo James, Kate Winslet, Ansel Elgort, Miles Teller                |
|       2 | tt2908446 | Shailene Woodley, Theo James, Kate Winslet, Ansel Elgort, Miles Teller                |
|       2 | tt2908446 | Shailene Woodley, Theo James, Kate Winslet, Ansel Elgort, Miles Teller                |
|       2 | tt2908446 | Shailene Woodley, Theo James, Kate Winslet, Ansel Elgort, Miles Teller                |
|       2 | tt2908446 | Shailene Woodley, Theo James, Kate Winslet, Ansel Elgort, Miles Teller                |
|       3 | tt2488496 | Harrison Ford, Mark Hamill, Carrie Fisher, Adam Driver, Daisy Ridley                  |
|       3 | tt2488496 | Harrison Ford, Mark Hamill, Carrie Fisher, Adam Driver, Daisy Ridley                  |
|       3 | tt2488496 | Harrison Ford, Mark Hamill, Carrie Fisher, Adam Driver, Daisy Ridley                  |
|       3 | tt2488496 | Harrison Ford, Mark Hamill, Carrie Fisher, Adam Driver, Daisy Ridley                  |
|       3 | tt2488496 | Harrison Ford, Mark Hamill, Carrie Fisher, Adam Driver, Daisy Ridley                  |
|       4 | tt2820852 | Vin Diesel, Paul Walker, Jason Statham, Michelle Rodriguez, Dwayne Johnson            |
|       4 | tt2820852 | Vin Diesel, Paul Walker, Jason Statham, Michelle Rodriguez, Dwayne Johnson            |
|       4 | tt2820852 | Vin Diesel, Paul Walker, Jason Statham, Michelle Rodriguez, Dwayne Johnson            |
|       4 | tt2820852 | Vin Diesel, Paul Walker, Jason Statham, Michelle Rodriguez, Dwayne Johnson            |
|       4 | tt2820852 | Vin Diesel, Paul Walker, Jason Statham, Michelle Rodriguez, Dwayne Johnson            |
|       5 | tt1663202 | Leonardo DiCaprio, Tom Hardy, Will Poulter, Domhnall Gleeson, Paul Anderson           |
|       5 | tt1663202 | Leonardo DiCaprio, Tom Hardy, Will Poulter, Domhnall Gleeson, Paul Anderson           |
|       5 | tt1663202 | Leonardo DiCaprio, Tom Hardy, Will Poulter, Domhnall Gleeson, Paul Anderson           |
|       5 | tt1663202 | Leonardo DiCaprio, Tom Hardy, Will Poulter, Domhnall Gleeson, Paul Anderson           |
|       5 | tt1663202 | Leonardo DiCaprio, Tom Hardy, Will Poulter, Domhnall Gleeson, Paul Anderson           |
|       6 | tt1340138 | Arnold Schwarzenegger, Jason Clarke, Emilia Clarke, Jai Courtney, J.K. Simmons        |
|       6 | tt1340138 | Arnold Schwarzenegger, Jason Clarke, Emilia Clarke, Jai Courtney, J.K. Simmons        |
|       6 | tt1340138 | Arnold Schwarzenegger, Jason Clarke, Emilia Clarke, Jai Courtney, J.K. Simmons        |
|       6 | tt1340138 | Arnold Schwarzenegger, Jason Clarke, Emilia Clarke, Jai Courtney, J.K. Simmons        |
|       6 | tt1340138 | Arnold Schwarzenegger, Jason Clarke, Emilia Clarke, Jai Courtney, J.K. Simmons        |
|       7 | tt3659388 | Matt Damon, Jessica Chastain, Kristen Wiig, Jeff Daniels, Michael PeÃ±a               |
|       7 | tt3659388 | Matt Damon, Jessica Chastain, Kristen Wiig, Jeff Daniels, Michael PeÃ±a               |
|       7 | tt3659388 | Matt Damon, Jessica Chastain, Kristen Wiig, Jeff Daniels, Michael PeÃ±a               |
|       7 | tt3659388 | Matt Damon, Jessica Chastain, Kristen Wiig, Jeff Daniels, Michael PeÃ±a               |
|       7 | tt3659388 | Matt Damon, Jessica Chastain, Kristen Wiig, Jeff Daniels, Michael PeÃ±a               |
|       8 | tt2293640 | Sandra Bullock, Jon Hamm, Michael Keaton, Allison Janney, Steve Coogan                |
|       8 | tt2293640 | Sandra Bullock, Jon Hamm, Michael Keaton, Allison Janney, Steve Coogan                |
|       8 | tt2293640 | Sandra Bullock, Jon Hamm, Michael Keaton, Allison Janney, Steve Coogan                |
|       8 | tt2293640 | Sandra Bullock, Jon Hamm, Michael Keaton, Allison Janney, Steve Coogan                |
|       8 | tt2293640 | Sandra Bullock, Jon Hamm, Michael Keaton, Allison Janney, Steve Coogan                |
|       9 | tt2096673 | Amy Poehler, Phyllis Smith, Richard Kind, Bill Hader, Lewis Black                     |
|       9 | tt2096673 | Amy Poehler, Phyllis Smith, Richard Kind, Bill Hader, Lewis Black                     |
|       9 | tt2096673 | Amy Poehler, Phyllis Smith, Richard Kind, Bill Hader, Lewis Black                     |
|       9 | tt2096673 | Amy Poehler, Phyllis Smith, Richard Kind, Bill Hader, Lewis Black                     |
|       9 | tt2096673 | Amy Poehler, Phyllis Smith, Richard Kind, Bill Hader, Lewis Black                     |
|      10 | tt2379713 | Daniel Craig, Christoph Waltz, LÃ©a Seydoux, Ralph Fiennes, Monica Bellucci           |
|      10 | tt2379713 | Daniel Craig, Christoph Waltz, LÃ©a Seydoux, Ralph Fiennes, Monica Bellucci           |
|      10 | tt2379713 | Daniel Craig, Christoph Waltz, LÃ©a Seydoux, Ralph Fiennes, Monica Bellucci           |
|      10 | tt2379713 | Daniel Craig, Christoph Waltz, LÃ©a Seydoux, Ralph Fiennes, Monica Bellucci           |
|      10 | tt2379713 | Daniel Craig, Christoph Waltz, LÃ©a Seydoux, Ralph Fiennes, Monica Bellucci           |
|      11 | tt1617661 | Mila Kunis, Channing Tatum, Sean Bean, Eddie Redmayne, Douglas Booth                  |
|      11 | tt1617661 | Mila Kunis, Channing Tatum, Sean Bean, Eddie Redmayne, Douglas Booth                  |
|      11 | tt1617661 | Mila Kunis, Channing Tatum, Sean Bean, Eddie Redmayne, Douglas Booth                  |
|      11 | tt1617661 | Mila Kunis, Channing Tatum, Sean Bean, Eddie Redmayne, Douglas Booth                  |
|      11 | tt1617661 | Mila Kunis, Channing Tatum, Sean Bean, Eddie Redmayne, Douglas Booth                  |
|      12 | tt0470752 | Domhnall Gleeson, Alicia Vikander, Oscar Isaac, Sonoya Mizuno, Corey Johnson          |
|      12 | tt0470752 | Domhnall Gleeson, Alicia Vikander, Oscar Isaac, Sonoya Mizuno, Corey Johnson          |
|      12 | tt0470752 | Domhnall Gleeson, Alicia Vikander, Oscar Isaac, Sonoya Mizuno, Corey Johnson          |
|      12 | tt0470752 | Domhnall Gleeson, Alicia Vikander, Oscar Isaac, Sonoya Mizuno, Corey Johnson          |
|      12 | tt0470752 | Domhnall Gleeson, Alicia Vikander, Oscar Isaac, Sonoya Mizuno, Corey Johnson          |
|      13 | tt2120120 | Adam Sandler, Michelle Monaghan, Peter Dinklage, Josh Gad, Kevin James                |
|      13 | tt2120120 | Adam Sandler, Michelle Monaghan, Peter Dinklage, Josh Gad, Kevin James                |
|      13 | tt2120120 | Adam Sandler, Michelle Monaghan, Peter Dinklage, Josh Gad, Kevin James                |
|      13 | tt2120120 | Adam Sandler, Michelle Monaghan, Peter Dinklage, Josh Gad, Kevin James                |
|      13 | tt2120120 | Adam Sandler, Michelle Monaghan, Peter Dinklage, Josh Gad, Kevin James                |
|      14 | tt2395427 | Robert Downey Jr., Chris Hemsworth, Mark Ruffalo, Chris Evans, Scarlett Johansson     |
|      14 | tt2395427 | Robert Downey Jr., Chris Hemsworth, Mark Ruffalo, Chris Evans, Scarlett Johansson     |
|      14 | tt2395427 | Robert Downey Jr., Chris Hemsworth, Mark Ruffalo, Chris Evans, Scarlett Johansson     |
|      14 | tt2395427 | Robert Downey Jr., Chris Hemsworth, Mark Ruffalo, Chris Evans, Scarlett Johansson     |
|      14 | tt2395427 | Robert Downey Jr., Chris Hemsworth, Mark Ruffalo, Chris Evans, Scarlett Johansson     |
|      15 | tt3460252 | Samuel L. Jackson, Kurt Russell, Jennifer Jason Leigh, Walton Goggins, DemiÃ¡n Bichir |
|      15 | tt3460252 | Samuel L. Jackson, Kurt Russell, Jennifer Jason Leigh, Walton Goggins, DemiÃ¡n Bichir |
|      15 | tt3460252 | Samuel L. Jackson, Kurt Russell, Jennifer Jason Leigh, Walton Goggins, DemiÃ¡n Bichir |
|      15 | tt3460252 | Samuel L. Jackson, Kurt Russell, Jennifer Jason Leigh, Walton Goggins, DemiÃ¡n Bichir |
|      15 | tt3460252 | Samuel L. Jackson, Kurt Russell, Jennifer Jason Leigh, Walton Goggins, DemiÃ¡n Bichir |
|      16 | tt2446042 | Liam Neeson, Forest Whitaker, Maggie Grace, Famke Janssen, Dougray Scott              |
|      16 | tt2446042 | Liam Neeson, Forest Whitaker, Maggie Grace, Famke Janssen, Dougray Scott              |
|      16 | tt2446042 | Liam Neeson, Forest Whitaker, Maggie Grace, Famke Janssen, Dougray Scott              |
|      16 | tt2446042 | Liam Neeson, Forest Whitaker, Maggie Grace, Famke Janssen, Dougray Scott              |
|      16 | tt2446042 | Liam Neeson, Forest Whitaker, Maggie Grace, Famke Janssen, Dougray Scott              |
|      17 | tt0478970 | Paul Rudd, Michael Douglas, Evangeline Lilly, Corey Stoll, Bobby Cannavale            |
|      17 | tt0478970 | Paul Rudd, Michael Douglas, Evangeline Lilly, Corey Stoll, Bobby Cannavale            |
|      17 | tt0478970 | Paul Rudd, Michael Douglas, Evangeline Lilly, Corey Stoll, Bobby Cannavale            |
|      17 | tt0478970 | Paul Rudd, Michael Douglas, Evangeline Lilly, Corey Stoll, Bobby Cannavale            |
|      17 | tt0478970 | Paul Rudd, Michael Douglas, Evangeline Lilly, Corey Stoll, Bobby Cannavale            |
|      18 | tt1661199 | Lily James, Cate Blanchett, Richard Madden, Helena Bonham Carter, Holliday Grainger   |
|      18 | tt1661199 | Lily James, Cate Blanchett, Richard Madden, Helena Bonham Carter, Holliday Grainger   |
|      18 | tt1661199 | Lily James, Cate Blanchett, Richard Madden, Helena Bonham Carter, Holliday Grainger   |
|      18 | tt1661199 | Lily James, Cate Blanchett, Richard Madden, Helena Bonham Carter, Holliday Grainger   |
|      18 | tt1661199 | Lily James, Cate Blanchett, Richard Madden, Helena Bonham Carter, Holliday Grainger   |
|      19 | tt1951266 | Jennifer Lawrence, Josh Hutcherson, Liam Hemsworth, Woody Harrelson, Elizabeth Banks  |
|      19 | tt1951266 | Jennifer Lawrence, Josh Hutcherson, Liam Hemsworth, Woody Harrelson, Elizabeth Banks  |
|      19 | tt1951266 | Jennifer Lawrence, Josh Hutcherson, Liam Hemsworth, Woody Harrelson, Elizabeth Banks  |
|      19 | tt1951266 | Jennifer Lawrence, Josh Hutcherson, Liam Hemsworth, Woody Harrelson, Elizabeth Banks  |
|      19 | tt1951266 | Jennifer Lawrence, Josh Hutcherson, Liam Hemsworth, Woody Harrelson, Elizabeth Banks  |

## Output:


source: notebook
label: explode