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:
|   Series appearances | Team                                                           |   Wins |   Losses | Win %   | Season(s)                                                                                                                                                                                                                                      |
|---------------------:|:---------------------------------------------------------------|-------:|---------:|:--------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|                   40 | New York Yankees                                               |     27 |       13 | .675    | 1921, 1922, 1923, 1926, 1927, 1928, 1932, 1936, 1937, 1938, 1939, 1941, 1942, 1943, 1947, 1949, 1950, 1951, 1952, 1953, 1955, 1956, 1957, 1958, 1960, 1961, 1962, 1963, 1964, 1976, 1977, 1978, 1981, 1996, 1998, 1999, 2000, 2001, 2003, 2009 |
|                   20 | San Francisco Giants (New York)                                |      8 |       12 | .400    | 1905, 1911, 1912, 1913, 1917, 1921, 1922, 1923, 1924, 1933, 1936, 1937, 1951, 1954, 1962, 1989, 2002, 2010, 2012, 2014                                                                                                                         |
|                   19 | St. Louis Cardinals                                            |     11 |        8 | .579    | 1926, 1928, 1930, 1931, 1934, 1942, 1943, 1944, 1946, 1964, 1967, 1968, 1982, 1985, 1987, 2004, 2006, 2011, 2013                                                                                                                               |
|                   18 | Los Angeles Dodgers (Brooklyn)                                 |      6 |       12 | .333    | 1916, 1920, 1941, 1947, 1949, 1952, 1953, 1955, 1956, 1959, 1963, 1965, 1966, 1974, 1977, 1978, 1981, 1988                                                                                                                                     |
|                   14 | Oakland Athletics (Kansas City/Philadelphia)                   |      9 |        5 | .643    | 1905, 1910, 1911, 1913, 1914, 1929, 1930, 1931, 1972, 1973, 1974, 1988, 1989, 1990                                                                                                                                                             |
|                   12 | Boston Red Sox (Americans)                                     |      8 |        4 | .667    | 1903, 1912, 1915, 1916, 1918, 1946, 1967, 1975, 1986, 2004, 2007, 2013                                                                                                                                                                         |
|                   11 | Detroit Tigers                                                 |      4 |        7 | .364    | 1907, 1908, 1909, 1934, 1935, 1940, 1945, 1968, 1984, 2006, 2012                                                                                                                                                                               |
|                   11 | Chicago Cubs                                                   |      3 |        8 | .273    | 1906, 1907, 1908, 1910, 1918, 1929, 1932, 1935, 1938, 1945, 2016                                                                                                                                                                               |
|                    9 | Cincinnati Reds                                                |      5 |        4 | .556    | 1919, 1939, 1940, 1961, 1970, 1972, 1975, 1976, 1990                                                                                                                                                                                           |
|                    9 | Atlanta Braves (Milwaukee/Boston)                              |      3 |        6 | .333    | 1914, 1948, 1957, 1958, 1991, 1992, 1995, 1996, 1999                                                                                                                                                                                           |
|                    7 | Pittsburgh Pirates                                             |      5 |        2 | .714    | 1903, 1909, 1925, 1927, 1960, 1971, 1979                                                                                                                                                                                                       |
|                    7 | Baltimore Orioles (St. Louis Browns)                           |      3 |        4 | .429    | 1944, 1966, 1969, 1970, 1971, 1979, 1983                                                                                                                                                                                                       |
|                    7 | Philadelphia Phillies                                          |      2 |        5 | .286    | 1915, 1950, 1980, 1983, 1993, 2008, 2009                                                                                                                                                                                                       |
|                    6 | Cleveland Indians                                              |      2 |        4 | .333    | 1920, 1948, 1954, 1995, 1997, 2016                                                                                                                                                                                                             |
|                    6 | Minnesota Twins (Washington Senators)                          |      3 |        3 | .500    | 1924, 1925, 1933, 1965, 1987, 1991                                                                                                                                                                                                             |
|                    5 | Chicago White Sox                                              |      3 |        2 | .600    | 1906, 1917, 1919, 1959, 2005                                                                                                                                                                                                                   |
|                    5 | New York Mets                                                  |      2 |        3 | .400    | 1969, 1973, 1986, 2000, 2015                                                                                                                                                                                                                   |
|                    4 | Kansas City Royals                                             |      2 |        2 | .500    | 1980, 1985, 2014, 2015                                                                                                                                                                                                                         |
|                    2 | Toronto Blue Jays                                              |      2 |        0 | 1.000   | 1992, 1993                                                                                                                                                                                                                                     |
|                    2 | Miami Marlins                                                  |      2 |        0 | 1.000   | 1997, 2003                                                                                                                                                                                                                                     |
|                    2 | San Diego Padres                                               |      0 |        2 | .000    | 1984, 1998                                                                                                                                                                                                                                     |
|                    2 | Texas Rangers                                                  |      0 |        2 | .000    | 2010, 2011                                                                                                                                                                                                                                     |
|                    1 | Arizona Diamondbacks                                           |      1 |        0 | 1.000   | 2001                                                                                                                                                                                                                                           |
|                    1 | Los Angeles Angels of Anaheim (Anaheim/California/Los Angeles) |      1 |        0 | 1.000   | 2002                                                                                                                                                                                                                                           |
|                    1 | Milwaukee Brewers (Seattle Pilots)                             |      0 |        1 | .000    | 1982                                                                                                                                                                                                                                           |
|                    1 | Houston Astros                                                 |      0 |        1 | .000    | 2005                                                                                                                                                                                                                                           |
|                    1 | Colorado Rockies                                               |      0 |        1 | .000    | 2007                                                                                                                                                                                                                                           |
|                    1 | Tampa Bay Rays                                                 |      0 |        1 | .000    | 2008                                                                                                                                                                                                                                           |
|                    0 | Washington Nationals (Montreal Expos)                          |      0 |        0 | —       |                                                                                                                                                                                                                                                |
|                    0 | Seattle Mariners                                               |      0 |        0 | —       |                                                                                                                                                                                                                                                |

## Output:


source: web
label: explode