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 | genres                                                          |   imdb_score |
|--------:|:----------------------------------------------------------------|-------------:|
|       0 | Action, Adventure, Fantasy, Sci-Fi                              |          7.9 |
|       1 | Action, Adventure, Fantasy                                      |          7.1 |
|       2 | Action, Adventure, Thriller                                     |          6.8 |
|       3 | Action, Thriller                                                |          8.5 |
|       5 | Action, Adventure, Sci-Fi                                       |          6.6 |
|       6 | Action, Adventure, Romance                                      |          6.2 |
|       7 | Adventure, Animation, Comedy, Family, Fantasy, Musical, Romance |          7.8 |
|       8 | Action, Adventure, Sci-Fi                                       |          7.5 |
|       9 | Adventure, Family, Fantasy, Mystery                             |          7.5 |
|      10 | Action, Adventure, Sci-Fi                                       |          6.9 |
|      11 | Action, Adventure, Sci-Fi                                       |          6.1 |
|      12 | Action, Adventure                                               |          6.7 |
|      13 | Action, Adventure, Fantasy                                      |          7.3 |
|      14 | Action, Adventure, Western                                      |          6.5 |
|      15 | Action, Adventure, Fantasy, Sci-Fi                              |          7.2 |
|      16 | Action, Adventure, Family, Fantasy                              |          6.6 |
|      17 | Action, Adventure, Sci-Fi                                       |          8.1 |
|      18 | Action, Adventure, Fantasy                                      |          6.7 |
|      19 | Action, Adventure, Comedy, Family, Fantasy, Sci-Fi              |          6.8 |
|      20 | Adventure, Fantasy                                              |          7.5 |
|      21 | Action, Adventure, Fantasy                                      |          7   |
|      22 | Action, Adventure, Drama, History                               |          6.7 |
|      23 | Adventure, Fantasy                                              |          7.9 |
|      24 | Adventure, Family, Fantasy                                      |          6.1 |
|      25 | Action, Adventure, Drama, Romance                               |          7.2 |
|      26 | Drama, Romance                                                  |          7.7 |
|      27 | Action, Adventure, Sci-Fi                                       |          8.2 |
|      28 | Action, Adventure, Sci-Fi, Thriller                             |          5.9 |
|      29 | Action, Adventure, Sci-Fi, Thriller                             |          7   |
|      30 | Action, Adventure, Thriller                                     |          7.8 |
|      31 | Action, Adventure, Fantasy, Romance                             |          7.3 |
|      32 | Action, Adventure, Sci-Fi                                       |          7.2 |
|      33 | Adventure, Family, Fantasy                                      |          6.5 |
|      34 | Action, Adventure, Fantasy, Sci-Fi, Thriller                    |          6.8 |
|      35 | Adventure, Animation, Comedy, Family, Fantasy                   |          7.3 |
|      36 | Action, Adventure, Sci-Fi                                       |          6   |
|      37 | Action, Adventure, Sci-Fi                                       |          5.7 |
|      38 | Adventure, Family, Fantasy                                      |          6.4 |
|      39 | Action, Adventure, Fantasy, Sci-Fi                              |          6.7 |
|      40 | Action, Adventure, Sci-Fi                                       |          6.8 |
|      41 | Adventure, Animation, Comedy, Family, Sport                     |          6.3 |
|      42 | Action, Adventure, Sci-Fi                                       |          5.6 |
|      43 | Adventure, Animation, Comedy, Family, Fantasy                   |          8.3 |
|      44 | Action, Adventure, Sci-Fi                                       |          6.6 |
|      45 | Action, Crime, Thriller                                         |          7.2 |
|      46 | Action, Adventure, Horror, Sci-Fi, Thriller                     |          7   |
|      47 | Action, Adventure, Fantasy, Sci-Fi, Thriller                    |          8   |
|      48 | Action, Adventure, Sci-Fi                                       |          7.8 |
|      49 | Adventure, Fantasy                                              |          6.3 |
|      50 | Drama, Romance                                                  |          7.3 |
|      51 | Action, Adventure, Fantasy, Romance                             |          6.6 |
|      52 | Action, Adventure, Sci-Fi                                       |          7   |
|      53 | Action, Adventure, Sci-Fi                                       |          6.3 |
|      54 | Action, Adventure, Fantasy                                      |          6.2 |
|      56 | Adventure, Animation, Comedy, Family, Fantasy                   |          7.2 |
|      57 | Action, Adventure, Sci-Fi, Thriller                             |          7.5 |
|      58 | Adventure, Animation, Family, Sci-Fi                            |          8.4 |
|      59 | Action, Comedy, Crime, Thriller                                 |          6.2 |
|      60 | Action, Adventure, Sci-Fi                                       |          5.8 |
|      61 | Animation, Drama, Family, Fantasy                               |          6.8 |
|      62 | Action, Adventure, Sci-Fi                                       |          5.4 |
|      63 | Action, Adventure, Drama, Romance                               |          6.6 |
|      64 | Adventure, Family, Fantasy                                      |          6.9 |
|      65 | Action, Adventure, Sci-Fi                                       |          7.3 |
|      66 | Action, Crime, Drama, Thriller                                  |          9   |
|      67 | Adventure, Animation, Comedy, Family                            |          8.3 |
|      68 | Action, Adventure, Animation, Comedy, Family, Sci-Fi            |          6.5 |
|      69 | Action, Adventure, Sci-Fi                                       |          7.9 |
|      70 | Adventure, Drama, Family, Mystery                               |          7.5 |
|      71 | Action, Comedy, Sci-Fi, Western                                 |          4.8 |
|      72 | Action, Adventure, Fantasy, Horror, Thriller                    |          5.2 |
|      73 | Action, Adventure, Comedy, Sci-Fi                               |          6.9 |
|      74 | Comedy, Family, Fantasy                                         |          5.4 |
|      75 | Action, Adventure, Sci-Fi                                       |          7.9 |
|      76 | Action, Adventure, Sci-Fi, Thriller                             |          6.1 |
|      77 | Action, Adventure, Sci-Fi, Thriller                             |          5.8 |
|      78 | Adventure, Animation, Comedy, Drama, Family, Fantasy            |          8.3 |
|      79 | Adventure, Drama, Family, Fantasy                               |          7.8 |
|      80 | Action, Adventure, Sci-Fi                                       |          7   |
|      81 | Action, Adventure, Drama, Fantasy                               |          6.1 |
|      82 | Action, Adventure, Family, Fantasy, Romance                     |          7   |
|      83 | Action, Adventure, Drama, Sci-Fi                                |          7.6 |
|      85 | Action, Adventure, Drama, Fantasy                               |          6.3 |
|      86 | Action, Adventure, Sci-Fi                                       |          7.8 |
|      87 | Adventure, Animation, Comedy, Family, Fantasy                   |          6.4 |
|      88 | Action, Adventure, Family, Mystery, Sci-Fi                      |          6.5 |
|      89 | Action, Adventure, Animation, Comedy, Drama, Family, Sci-Fi     |          7.9 |
|      90 | Adventure, Animation, Comedy, Family, Sci-Fi                    |          7.8 |
|      91 | Adventure, Animation, Family, Fantasy                           |          6.6 |
|      92 | Action, Adventure, Sci-Fi                                       |          5.5 |
|      93 | Adventure, Animation, Family, Fantasy                           |          8.2 |
|      94 | Action, Sci-Fi                                                  |          6.4 |
|      95 | Action, Adventure, Sci-Fi                                       |          8.1 |
|      96 | Adventure, Drama, Sci-Fi                                        |          8.6 |
|      97 | Action, Adventure, Sci-Fi, Thriller                             |          8.8 |
|     100 | Action, Crime, Thriller                                         |          6.7 |
|     101 | Drama, Fantasy, Romance                                         |          7.8 |
|     102 | Action, Adventure, Sci-Fi                                       |          7.8 |
|     103 | Adventure, Sci-Fi                                               |          6.6 |
|     104 | Action, Adventure, Family, Fantasy                              |          6.1 |

## Output:


source: notebook
label: explode