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:
|   popularity | release_date   | title                                             |   year | pg_rating   |   imdb_id |   runtime | genre                        |   imdb_rating |   votes |   gross_us |   month |
|-------------:|:---------------|:--------------------------------------------------|-------:|:------------|----------:|----------:|:-----------------------------|--------------:|--------:|-----------:|--------:|
|       43.166 | 9/23/1994      | The Shawshank Redemption                          |   1994 | R           |    111161 |       142 | Drama                        |           9.3 | 2353109 |      28.34 |       9 |
|       37.301 | 3/14/1972      | The Godfather                                     |   1972 | R           |     68646 |       175 | Crime, Drama                 |           9.2 | 1628373 |     134.97 |       3 |
|       27.598 | 11/30/1993     | Schindler's List                                  |   1993 | R           |    108052 |       195 | Biography, Drama, History    |           8.9 | 1218144 |      96.9  |      11 |
|      108.69  | 8/26/2016      | Your Name.                                        |   2016 | PG          |   5311514 |       106 | Animation, Drama, Fantasy    |           8.4 |  197768 |       5.02 |       8 |
|       29.973 | 12/20/1974     | The Godfather: Part II                            |   1974 | R           |     71562 |       202 | Crime, Drama                 |           9   | 1134978 |      57.3  |      12 |
|       54.282 | 7/20/2001      | Spirited Away                                     |   2001 | PG          |    245429 |       125 | Animation, Adventure, Family |           8.6 |  655442 |      10.06 |       7 |
|      152.609 | 5/30/2019      | Parasite                                          |   2019 | R           |   6751668 |       132 | Comedy, Drama, Thriller      |           8.6 |  565186 |      53.37 |       5 |
|       40.079 | 12/10/1999     | The Green Mile                                    |   1999 | R           |    120689 |       189 | Crime, Drama, Fantasy        |           8.6 | 1153309 |     136.8  |      12 |
|       43.495 | 9/10/1994      | Pulp Fiction                                      |   1994 | R           |    110912 |       154 | Crime, Drama                 |           8.9 | 1834079 |     107.93 |       9 |
|       35.865 | 12/20/1997     | Life Is Beautiful                                 |   1997 | PG-13       |    118799 |       116 | Comedy, Drama, Romance       |           8.6 |  626485 |      57.6  |      12 |
|       19.167 | 4/10/1957      | 12 Angry Men                                      |   1957 | Approved    |     50083 |        96 | Crime, Drama                 |           9   |  693432 |       4.36 |       4 |
|       66.327 | 7/16/2008      | The Dark Knight                                   |   2008 | PG-13       |    468569 |       152 | Action, Crime, Drama         |           9   | 2312777 |     534.86 |       7 |
|       35.922 | 7/6/1994       | Forrest Gump                                      |   1994 | PG-13       |    109830 |       142 | Drama, Romance               |           8.8 | 1818171 |     330.25 |       7 |
|       64.529 | 12/1/2003      | The Lord of the Rings: The Return of the King     |   2003 | PG-13       |    167260 |       201 | Action, Adventure, Drama     |           8.9 | 1648942 |     377.85 |      12 |
|       16.117 | 11/17/1988     | Cinema Paradiso                                   |   1988 | R           |     95765 |       155 | Drama, Romance               |           8.5 |  231978 |      11.99 |      11 |
|       22.647 | 12/23/1966     | The Good, the Bad and the Ugly                    |   1966 | R           |     60196 |       178 | Western                      |           8.8 |  691045 |       6.1  |      12 |
|       19.46  | 5/23/1984      | Once Upon a Time in America                       |   1984 | R           |     87843 |       229 | Crime, Drama                 |           8.4 |  312931 |       5.32 |       5 |
|       16.169 | 4/26/1954      | Seven Samurai                                     |   1954 | Not Rated   |     47478 |       207 | Action, Adventure, Drama     |           8.6 |  316958 |       0.27 |       4 |
|       25.461 | 6/22/1960      | Psycho                                            |   1960 | R           |     54215 |       109 | Horror, Mystery, Thriller    |           8.5 |  606660 |      32    |       6 |
|       42.781 | 10/15/1999     | Fight Club                                        |   1999 | R           |    137523 |       139 | Drama                        |           8.8 | 1862752 |      37.03 |      10 |
|       17.527 | 11/18/1975     | One Flew Over the Cuckoo's Nest                   |   1975 | R           |     73486 |       133 | Drama                        |           8.7 |  921481 |     112    |      11 |
|       21.329 | 2/5/2002       | City of God                                       |   2002 | R           |    317248 |       130 | Crime, Drama                 |           8.6 |  701447 |       7.56 |       2 |
|       81.71  | 12/6/2018      | Spider-Man: Into the Spider-Verse                 |   2018 | PG          |   4633694 |       117 | Animation, Action, Adventure |           8.4 |  379677 |     190.24 |      12 |
|       40.944 | 11/19/2004     | Howl's Moving Castle                              |   2004 | PG          |    347149 |       119 | Animation, Adventure, Family |           8.2 |  336275 |       4.71 |      11 |
|       16.843 | 10/23/1940     | The Great Dictator                                |   1940 | Passed      |     32553 |       125 | Comedy, Drama, War           |           8.4 |  203999 |       0.29 |      10 |
|       42.871 | 10/10/2014     | Whiplash                                          |   2014 | R           |   2582802 |       106 | Drama, Music                 |           8.5 |  721830 |      13.09 |      10 |
|       24.117 | 10/30/1998     | American History X                                |   1998 | R           |    120586 |       119 | Drama                        |           8.5 | 1037979 |       6.72 |      10 |
|       10.841 | 10/9/1952      | Ikiru                                             |   1952 | Not Rated   |     44741 |       143 | Drama                        |           8.3 |   68931 |       0.06 |      10 |
|       29.388 | 9/17/2002      | The Pianist                                       |   2002 | R           |    253474 |       150 | Biography, Drama, Music      |           8.5 |  733324 |      32.57 |       9 |
|       10.263 | 2/1/1931       | City Lights                                       |   1931 | G           |     21749 |        87 | Comedy, Drama, Romance       |           8.5 |  168603 |       0.02 |       2 |
|       14.645 | 9/1/1954       | Rear Window                                       |   1954 | PG          |     47396 |       112 | Mystery, Thriller            |           8.4 |  445778 |      36.76 |       9 |
|       26.107 | 7/12/1997      | Princess Mononoke                                 |   1997 | PG-13       |    119698 |       134 | Animation, Action, Adventure |           8.4 |  345229 |       2.38 |       7 |
|       73.334 | 12/18/2001     | The Lord of the Rings: The Fellowship of the Ring |   2001 | PG-13       |    120737 |       178 | Action, Adventure, Drama     |           8.8 | 1668153 |     315.54 |      12 |
|       48.988 | 7/15/2010      | Inception                                         |   2010 | PG-13       |   1375666 |       148 | Action, Adventure, Sci-Fi    |           8.8 | 2076678 |     292.58 |       7 |
|       13.127 | 2/11/1936      | Modern Times                                      |   1936 | G           |     27977 |        87 | Comedy, Drama, Family        |           8.5 |  218953 |       0.16 |       2 |
|       61.802 | 12/18/2002     | The Lord of the Rings: The Two Towers             |   2002 | PG-13       |    167261 |       179 | Action, Adventure, Drama     |           8.7 | 1491230 |     342.55 |      12 |
|       34.846 | 9/22/1995      | Se7en                                             |   1995 | R           |    114369 |       127 | Crime, Drama, Mystery        |           8.6 | 1452269 |     100.13 |       9 |
|      107.301 | 11/5/2014      | Interstellar                                      |   2014 | PG-13       |    816692 |       169 | Adventure, Drama, Sci-Fi     |           8.6 | 1521545 |     188.02 |      11 |
|       12.271 | 2/1/1991       | The Silence of the Lambs                          |   1991 | R           |    102926 |       118 | Crime, Drama, Thriller       |           8.6 | 1276668 |     130.74 |       2 |
|       43.949 | 9/14/1994      | Léon: The Professional                            |   1994 | R           |    110413 |       110 | Action, Crime, Drama         |           8.5 | 1039943 |      19.5  |       9 |
|       18.697 | 6/2/1989       | Dead Poets Society                                |   1989 | PG          |     97165 |       128 | Comedy, Drama                |           8.1 |  428050 |      95.86 |       6 |
|       19.593 | 12/21/1968     | Once Upon a Time in the West                      |   1968 | PG-13       |     64116 |       165 | Western                      |           8.5 |  303944 |       5.32 |      12 |
|       11.605 | 5/22/2014      | Mommy                                             |   2014 | R           |   3612616 |       139 | Drama                        |           8.1 |   50975 |       3.49 |       5 |
|       12.869 | 10/28/1998     | The Legend of 1900                                |   1998 | R           |    120731 |       169 | Drama, Music, Romance        |           8.1 |   59208 |       0.26 |      10 |
|       25.607 | 6/1/2016       | The Handmaiden                                    |   2016 | Not Rated   |   4016934 |       145 | Drama, Romance, Thriller     |           8.1 |  115060 |       2.01 |       6 |
|       41.738 | 7/3/1985       | Back to the Future                                |   1985 | PG          |     88763 |       116 | Adventure, Comedy, Sci-Fi    |           8.5 | 1062788 |     210.61 |       7 |
|      119.308 | 9/1/2017       | Call Me by Your Name                              |   2017 | R           |   5726616 |       132 | Drama, Romance               |           7.9 |  215241 |      18.1  |       9 |
|       29.421 | 8/15/1979      | Apocalypse Now                                    |   1979 | R           |     78788 |       147 | Drama, Mystery, War          |           8.4 |  608758 |      83.47 |       8 |
|       10.947 | 5/25/1979      | Stalker                                           |   1979 | Not Rated   |     79944 |       162 | Drama, Sci-Fi                |           8.2 |  117713 |       0.23 |       5 |
|      299.698 | 4/24/2019      | Avengers: Endgame                                 |   2019 | PG-13       |   4154796 |       181 | Action, Adventure, Drama     |           8.4 |  821060 |     858.37 |       4 |
|       14.911 | 2/14/1963      | 8½                                                |   1963 | Not Rated   |     56801 |       138 | Drama                        |           8   |  109237 |       0.05 |       2 |
|       12.452 | 12/17/1957     | Witness for the Prosecution                       |   1957 | Approved    |     51201 |       116 | Crime, Drama, Mystery        |           8.4 |  109544 |       8.18 |      12 |
|       20.504 | 6/17/2019      | Portrait of a Lady on Fire                        |   2019 | R           |   8613070 |       122 | Drama, Romance               |           8.1 |   64854 |       3.76 |       6 |
|       11.966 | 11/24/1948     | Bicycle Thieves                                   |   1948 | Not Rated   |     40522 |        89 | Drama                        |           8.3 |  147257 |       0.33 |      11 |
|       26.94  | 11/16/2018     | Green Book                                        |   2018 | PG-13       |   6966692 |       130 | Biography, Comedy, Drama     |           8.2 |  383880 |      85.08 |      11 |
|       21.455 | 11/21/2003     | Oldboy                                            |   2003 | R           |    364569 |       120 | Action, Drama, Mystery       |           8.4 |  517789 |       0.71 |      11 |
|       21.234 | 11/14/2013     | Oldboy                                            |   2003 | R           |    364569 |       120 | Action, Drama, Mystery       |           8.4 |  517789 |       0.71 |      11 |
|      308.244 | 4/25/2018      | Avengers: Infinity War                            |   2018 | PG-13       |   4154756 |       149 | Action, Adventure, Sci-Fi    |           8.4 |  841860 |     678.82 |       4 |
|       47.657 | 11/2/2011      | The Intouchables                                  |   2011 | R           |   1675434 |       112 | Biography, Comedy, Drama     |           8.5 |  764640 |      13.18 |      11 |
|      115.427 | 6/23/1994      | The Lion King                                     |   1994 | G           |    110357 |        88 | Animation, Adventure, Drama  |           8.5 |  946319 |     422.78 |       6 |
|      103.356 | 7/12/2019      | The Lion King                                     |   1994 | G           |    110357 |        88 | Animation, Adventure, Drama  |           8.5 |  946319 |     422.78 |       7 |
|       14.777 | 6/21/1960      | The Apartment                                     |   1960 | Approved    |     53604 |       125 | Comedy, Drama, Romance       |           8.3 |  165142 |      18.6  |       6 |
|       27.993 | 12/19/1971     | A Clockwork Orange                                |   1971 | R           |     66921 |       136 | Crime, Drama, Sci-Fi         |           8.3 |  760528 |       6.21 |      12 |
|       12.162 | 1/21/1921      | The Kid                                           |   1921 | Passed      |     12349 |        68 | Comedy, Drama, Family        |           8.3 |  114056 |       5.45 |       1 |
|       14.325 | 7/7/2000       | The Kid                                           |   1921 | Passed      |     12349 |        68 | Comedy, Drama, Family        |           8.3 |  114056 |       5.45 |       7 |
|       10.581 | 4/17/1924      | Sherlock Jr.                                      |   1924 | Passed      |     15324 |        45 | Action, Comedy, Romance      |           8.2 |   42333 |       0.98 |       4 |
|       18.222 | 7/25/1997      | Perfect Blue                                      |   1997 | R           |    156887 |        81 | Animation, Crime, Mystery    |           8   |   58830 |       0.78 |       7 |
|       35.194 | 11/13/2017     | Wonder                                            |   2017 | PG          |   2543472 |       113 | Drama, Family                |           8   |  143371 |     132.42 |      11 |
|       51.475 | 5/23/1980      | The Shining                                       |   1980 | R           |     81505 |       146 | Drama, Horror                |           8.4 |  902404 |      44.02 |       5 |
|      114.735 | 10/27/2017     | Coco                                              |   2017 | PG          |   2380307 |       105 | Animation, Adventure, Family |           8.4 |  388762 |     209.73 |      10 |
|       17.792 | 5/28/1958      | Vertigo                                           |   1958 | PG          |     52357 |       128 | Mystery, Romance, Thriller   |           8.3 |  365929 |       3.2  |       5 |
|       16.682 | 7/19/1995      | The Usual Suspects                                |   1995 | R           |    114814 |       106 | Crime, Mystery, Thriller     |           8.5 |  994865 |      23.34 |       7 |
|       53.199 | 8/18/2009      | Inglourious Basterds                              |   2009 | R           |    361748 |       153 | Adventure, Drama, War        |           8.3 | 1274250 |     120.54 |       8 |
|       14.247 | 2/5/1960       | La Dolce Vita                                     |   1960 | Not Rated   |     53779 |       174 | Comedy, Drama                |           8   |   66867 |      19.52 |       2 |
|       12.527 | 10/6/1950      | All About Eve                                     |   1950 | Passed      |     42192 |       138 | Drama                        |           8.2 |  120998 |       0.01 |      10 |
|       23.603 | 10/11/2000     | Memento                                           |   2000 | R           |    209144 |       113 | Mystery, Thriller            |           8.4 | 1129736 |      25.54 |      10 |
|       23.134 | 2/9/1976       | Taxi Driver                                       |   1976 | R           |     75314 |       114 | Crime, Drama                 |           8.2 |  728316 |      28.26 |       2 |
|       13.272 | 4/9/1952       | Singin' in the Rain                               |   1952 | G           |     45152 |       103 | Comedy, Musical, Romance     |           8.3 |  219920 |       8.82 |       4 |
|       11.386 | 6/14/1944      | Double Indemnity                                  |   1944 | Passed      |     36775 |       107 | Crime, Drama, Film-Noir      |           8.3 |  144173 |       5.72 |       6 |
|       23.47  | 10/19/2006     | The Prestige                                      |   2006 | PG-13       |    482571 |       130 | Drama, Mystery, Sci-Fi       |           8.5 | 1195533 |      53.09 |      10 |
|       14.331 | 2/6/1927       | Metropolis                                        |   1927 | Not Rated   |     17136 |       153 | Drama, Sci-Fi                |           8.3 |  160671 |       1.24 |       2 |
|       21.154 | 5/26/2001      | Metropolis                                        |   1927 | Not Rated   |     17136 |       153 | Drama, Sci-Fi                |           8.3 |  160671 |       1.24 |       5 |
|        8.824 | 3/5/1998       | Lock, Stock and Two Smoking Barrels               |   1998 | R           |    120735 |       107 | Action, Comedy, Crime        |           8.2 |  536919 |       3.9  |       3 |
|       33.713 | 5/1/2000       | Gladiator                                         |   2000 | R           |    172495 |       155 | Action, Adventure, Drama     |           8.5 | 1346622 |     187.71 |       5 |
|      418.789 | 10/2/2019      | Joker                                             |   2019 | R           |   7286456 |       122 | Crime, Drama, Thriller       |           8.4 |  950919 |     335.45 |      10 |
|       23.671 | 8/9/2011       | The Help                                          |   2011 | PG-13       |   1454029 |       146 | Drama                        |           8   |  430104 |     169.71 |       8 |
|       31.162 | 7/24/1998      | Saving Private Ryan                               |   1998 | R           |    120815 |       169 | Drama, War                   |           8.6 | 1241046 |     216.54 |       7 |
|       37.191 | 2/14/2010      | Shutter Island                                    |   2010 | R           |   1130884 |       138 | Mystery, Thriller            |           8.2 | 1136596 |     128.01 |       2 |
|       28.714 | 9/2/1992       | Reservoir Dogs                                    |   1992 | R           |    105236 |        99 | Crime, Drama, Thriller       |           8.3 |  922257 |       2.83 |       9 |
|       11.638 | 3/19/1959      | Some Like It Hot                                  |   1959 | Passed      |     53291 |       121 | Comedy, Music, Romance       |           8.2 |  244899 |      25    |       3 |
|       14.933 | 12/16/1966     | Andrei Rublev                                     |   1966 | R           |     60107 |       205 | Biography, Drama, History    |           8.1 |   47324 |       0.1  |      12 |
|       16.029 | 11/26/1942     | Casablanca                                        |   1942 | PG          |     34583 |       102 | Drama, Romance, War          |           8.5 |  524034 |       1.02 |      11 |
|       25.892 | 10/5/2006      | The Departed                                      |   2006 | R           |    407887 |       151 | Crime, Drama, Thriller       |           8.5 | 1194986 |     132.38 |      10 |
|       47.667 | 12/9/1983      | Scarface                                          |   1983 | R           |     86250 |       170 | Crime, Drama                 |           8.3 |  744303 |      45.6  |      12 |
|       13.684 | 4/9/1932       | Scarface                                          |   1983 | R           |     86250 |       170 | Crime, Drama                 |           8.3 |  744303 |      45.6  |       4 |
|       90.641 | 10/7/2016      | Hacksaw Ridge                                     |   2016 | R           |   2119532 |       139 | Biography, Drama, History    |           8.1 |  438861 |      67.21 |      10 |
|       42.047 | 3/30/1999      | The Matrix                                        |   1999 | R           |    133093 |       136 | Action, Sci-Fi               |           8.7 | 1683677 |     171.48 |       3 |
|       44.958 | 10/18/2019     | Jojo Rabbit                                       |   2019 | PG-13       |   2584384 |       108 | Comedy, Drama, War           |           7.9 |  302603 |       0.35 |      10 |
|       26.976 | 6/26/1987      | Full Metal Jacket                                 |   1987 | R           |     93058 |       116 | Drama, War                   |           8.3 |  677648 |      46.36 |       6 |
|        7.27  | 11/20/1998     | Central Station                                   |   1998 | R           |    140888 |       110 | Drama                        |           8   |   36554 |       5.6  |      11 |

## Output:


source: notebook
label: explode