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:
| Gen.   | Announced          | Model                      |
|:-------|:-------------------|:---------------------------|
| 1.0    | January 9, 2007    | iPhone (1st generation)    |
| 2.0    | June 9, 2008       | iPhone 3G                  |
| 3.0    | June 8, 2009       | iPhone 3GS                 |
| 4.0    | June 7, 2010       | iPhone 4                   |
| 5.0    | October 4, 2011    | iPhone 4S                  |
| 6.0    | September 12, 2012 | iPhone 5                   |
| 7.0    | September 10, 2013 | iPhone 5C                  |
|        |                    | iPhone 5S                  |
| 8.0    | September 9, 2014  | iPhone 6                   |
|        |                    | iPhone 6 Plus              |
| 9.0    | September 9, 2015  | iPhone 6S                  |
|        |                    | iPhone 6S Plus             |
|        | March 21, 2016     | iPhone SE (1st generation) |
| 10.0   | September 7, 2016  | iPhone 7                   |
|        |                    | iPhone 7 Plus              |
| 11.0   | September 12, 2017 | iPhone 8                   |
|        |                    | iPhone 8 Plus              |
|        |                    | iPhone X                   |
| 12.0   | September 12, 2018 | iPhone XR                  |
|        |                    | iPhone XS                  |
|        |                    | iPhone XS Max              |
| 13.0   | September 10, 2019 | iPhone 11                  |
|        |                    | iPhone 11 Pro              |
|        |                    | iPhone 11 Pro Max          |
|        | April 15, 2020     | iPhone SE (2nd generation) |
| 14.0   | October 13, 2020   | iPhone 12                  |
|        |                    | iPhone 12 Mini             |
|        |                    | iPhone 12 Pro              |
|        |                    | iPhone 12 Pro Max          |
| 15.0   | September 14, 2021 | iPhone 13                  |
|        |                    | iPhone 13 Mini             |
|        |                    | iPhone 13 Pro              |
|        |                    | iPhone 13 Pro Max          |
|        | March 8, 2022      | iPhone SE (3rd generation) |

## Output:


source: wikipedia
label: ffill