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:
| State          | 1995          | 1996          | 1997          | 1998               | 1999               | 2000               | 2001               | 2002               | 2003               | 2004               | 2005               | 2006               | 2007               | 2008               | 2009               | 2010               | 2011               | 2012               | 2013               | 2014               | 2015   |
|:---------------|:--------------|:--------------|:--------------|:-------------------|:-------------------|:-------------------|:-------------------|:-------------------|:-------------------|:-------------------|:-------------------|:-------------------|:-------------------|:-------------------|:-------------------|:-------------------|:-------------------|:-------------------|:-------------------|:-------------------|:-------|
| Alabama        | No Law        | No Law        | No Law        | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal  |
| Alaska         | No Law        | Statutory Ban | Statutory Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal              | Legal  |
| Arizona        | Statutory Ban | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal              | Legal  |
| Arkansas       | No Law        | No Law        | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal  |
| California     | Statutory Ban | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal              | Legal              | Legal  |
| Colorado       | No Law        | No Law        | No Law        | No Law             | No Law             | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal              | Legal  |
| Connecticut    | Statutory Ban | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Legal              | Legal              | Legal              | Legal              | Legal              | Legal              | Legal              | Legal  |
| Delaware       | No Law        | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Legal              | Legal              | Legal  |
| Florida        | Statutory Ban | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal  |
| Georgia        | No Law        | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal  |
| Hawaii         | No Law        | No Law        | No Law        | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Legal              | Legal              | Legal  |
| Idaho          | No Law        | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal              | Legal  |
| Illinois       | No Law        | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Legal              | Legal              | Legal  |
| Indiana        | No Law        | No Law        | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Legal              | Legal  |
| Iowa           | No Law        | No Law        | No Law        | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Legal              | Legal              | Legal              | Legal              | Legal              | Legal              | Legal  |
| Kansas         | No Law        | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal              | Legal  |
| Kentucky       | No Law        | No Law        | No Law        | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal  |
| Louisiana      | Statutory Ban | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal  |
| Maine          | No Law        | No Law        | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Legal              | Legal              | Legal              | Legal  |
| Maryland       | Statutory Ban | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Legal              | Legal              | Legal              | Legal  |
| Massachusetts  | No Law        | No Law        | No Law        | No Law             | No Law             | No Law             | No Law             | No Law             | Legal              | Legal              | Legal              | Legal              | Legal              | Legal              | Legal              | Legal              | Legal              | Legal              | Legal              | Legal              | Legal  |
| Michigan       | No Law        | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal  |
| Minnesota      | No Law        | No Law        | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Legal              | Legal              | Legal  |
| Mississippi    | No Law        | No Law        | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal  |
| Missouri       | No Law        | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal  |
| Montana        | Statutory Ban | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal              | Legal  |
| Nebraska       | No Law        | No Law        | No Law        | No Law             | No Law             | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal  |
| Nevada         | No Law        | No Law        | No Law        | No Law             | No Law             | No Law             | No Law             | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal              | Legal  |
| New Hampshire  | Statutory Ban | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Legal              | Legal              | Legal              | Legal              | Legal              | Legal              | Legal  |
| New Jersey     | No Law        | No Law        | No Law        | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | Legal              | Legal              | Legal  |
| New Mexico     | No Law        | No Law        | No Law        | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | Legal              | Legal              | Legal  |
| New York       | No Law        | No Law        | No Law        | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | Legal              | Legal              | Legal              | Legal              | Legal  |
| North Carolina | Statutory Ban | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Legal              | Legal  |
| North Dakota   | No Law        | No Law        | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal  |
| Ohio           | No Law        | No Law        | No Law        | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal  |
| Oklahoma       | No Law        | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal              | Legal  |
| Oregon         | No Law        | No Law        | No Law        | Statutory Ban      | No Law             | No Law             | No Law             | No Law             | No Law             | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal              | Legal  |
| Pennsylvania   | No Law        | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Legal              | Legal  |
| Rhode Island   | No Law        | No Law        | No Law        | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | Legal              | Legal              | Legal  |
| South Carolina | No Law        | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal              | Legal  |
| South Dakota   | No Law        | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal  |
| Tennessee      | No Law        | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal  |
| Texas          | No Law        | No Law        | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal  |
| Utah           | Statutory Ban | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal              | Legal  |
| Vermont        | No Law        | No Law        | No Law        | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | No Law             | Legal              | Legal              | Legal              | Legal              | Legal              | Legal              | Legal  |
| Virginia       | Statutory Ban | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal              | Legal  |
| Washington     | No Law        | No Law        | No Law        | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Legal              | Legal              | Legal              | Legal  |
| West Virginia  | No Law        | No Law        | No Law        | No Law             | No Law             | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Legal              | Legal  |
| Wisconsin      | Statutory Ban | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Constitutional Ban | Legal              | Legal  |
| Wyoming        | Statutory Ban | Statutory Ban | Statutory Ban | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Statutory Ban      | Legal              | Legal  |

## Output:


source: notebook
label: operator: stack
stack_start_idx: 1
stack_end_idx: 21
alternative_label: operator: transpose
operator: stack
stack_start_idx: 1
stack_end_idx: 50