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:
| Items                                | g Sat Fat   | g Trans Fat   | g Total Fat   | g Protein   | g Fiber   | g Carbohydrate   |
|:-------------------------------------|:------------|:--------------|:--------------|:------------|:----------|:-----------------|
| Milk                                 |             |               |               |             |           |                  |
| 1% White                             | 1.5         | 0.0           | 2.5           | 8.0         | 0.0       | 13.0             |
| Chocolate Skim                       | 0.0         | 0.0           | 0.0           | 8.0         | 0.0       | 20.0             |
| Skim                                 | 0.0         | 0.0           | 0.0           | 8.0         | 0.0       | 13.0             |
| Juice                                |             |               |               |             |           |                  |
| 0                                    | 0.0         | 0.0           | 0.0           | 0.0         | 0.0       | 13.0             |
| Apple Cherry                         | 0.0         | 0.0           | 0.0           | 0.0         | 0.0       | 13.0             |
| Fruit Blend                          | 0.0         | 0.0           | 0.0           | 0.0         | 0.0       | 15.0             |
| Grape                                | 0.0         | 0.0           | 0.0           | 0.0         | 0.0       | 19.0             |
| Orange                               | 0.0         | 0.0           | 0.0           | 0.0         | 0.0       | 13.0             |
| Orange/Pineapple                     | 0.0         | 0.0           | 0.0           | 1.0         | 0.0       | 14.0             |
| Fruits                               |             |               |               |             |           |                  |
| 0                                    | 0.0         | 0.0           | 0.0           | 0.47        | 4.4       | 25.13            |
| Apple Wedges                         | 0.013       | 0.0           | 0.09          | 0.14        | 1.3       | 7.53             |
| Apricot Cup                          | 0.0         | 0.0           | 0.0           | 1.0         | 2.0       | 25.0             |
| Applesauce                           | 0.0         | 0.0           | 0.0           | 0.0         | 2.0       | 15.0             |
| Banana                               | 0.0         | 0.0           | 0.33          | 1.1         | 2.6       | 23.07            |
| Blueberries with Whipped Topping     | 0.201       | 0.0           | 0.855         | 0.48        | 3.198     | 19.637           |
| Blue Raspberry Sorbet (100% Juice)   | 0.0         | 0.0           | 0.0           | 0.0         | 3.0       | 19.0             |
| Cantaloupe Cubes                     | 0.04        | 0.0           | 0.14          | 0.67        | 0.72      | 6.5              |
| Diced Peaches                        | 0.0         | 0.0           | 0.0           | 0.0         | 0.0       | 14.0             |
| Diced Pears                          | 0.0         | 0.0           | 0.0           | 0.0         | 2.0       | 20.0             |
| Fresh Pear                           | 0.0         | 0.0           | 0.18          | 0.58        | 4.69      | 23.36            |
| Grapes                               | 0.0         | 0.0           | 0.12          | 0.54        | 0.7       | 13.67            |
| Grape Sorbet (100% Juice)            | 0.0         | 0.0           | 0.0           | 0.0         | 3.0       | 19.0             |
| Honey Dew & Watermelon               | 0.04        | 0.0           | 0.17          | 0.79        | 0.95      | 12.32            |
| Hot Cinnamon Apples                  | 1.114       | 0.0           | 2.45          | 0.0         | 1.181     | 25.515           |
| Mandarin Oranges                     | 0.0         | 0.0           | 0.0           | 1.0         | 1.0       | 20.0             |
| Mixed Fruit                          | 0.0         | 0.0           | 0.0           | 0.0         | 1.0       | 15.0             |
| Nectarine                            | 0.0         | 0.0           | 0.41          | 1.37        | 2.2       | 13.61            |
| Orange Sorbet (100% Juice)           | 0.0         | 0.0           | 0.0           | 0.0         | 3.0       | 19.0             |
| Orange Wedges                        | 0.02        | 0.0           | 0.12          | 0.75        | 1.82      | 10.35            |
| Pineapple Tidbits                    | 0.0         | 0.0           | 0.0           | 0.0         | 1.1       | 18.7             |
| Plum                                 | 0.0         | 0.0           | 0.18          | 0.46        | 0.9       | 7.54             |
| Raisins                              | 0.02        | 0.0           | 0.17          | 1.17        | 1.4       | 30.09            |
| Strawberry Cup                       | 0.0         | 0.0           | 0.0           | 1.0         | 2.0       | 22.0             |
| Sweet Cherries with Whipped Topping  | 0.26        | 0.0           | 0.59          | 1.02        | 1.74      | 18.33            |
| Watermelon                           | 0.01        | 0.0           | 0.09          | 0.43        | 0.3       | 5.65             |
| Vegetables                           |             |               |               |             |           |                  |
| Baby Carrots                         | 0.02        | 0.0           | 0.09          | 0.45        | 2.0       | 5.77             |
| Baked Beans                          | 0.0         | 0.0           | 0.615         | 6.609       | 5.49      | 32.599           |
| Baked Potato                         | 0.07        | 0.0           | 0.23          | 5.83        | 5.67      | 28.21            |
| Beets, Harvard                       | 1.191       | 0.0           | 2.621         | 1.445       | 1.445     | 26.015           |
| Broccoli & Cauliflower (Cooked)      | 1.62        | 0.0           | 3.564         | 0.504       | 1.008     | 2.016            |
| Broccoli with Cheese Sauce           | 4.105       | 0.0           | 6.157         | 6.5         | 2.052     | 6.842            |
| Candied Sweet Potatoes               | 1.266       | 0.0           | 2.784         | 1.836       | 2.753     | 36.735           |
| Carrots (Bagged)                     | 0.018       | 0.0           | 0.109         | 0.422       | 1.27      | 4.345            |
| Corn                                 | 1.713       | 0.0           | 4.169         | 2.309       | 2.2       | 17.51            |
| Corn on the Cob                      | 2.531       | 0.0           | 6.069         | 2.0         | 2.0       | 19.0             |
| Creamy Coleslaw                      | 0.471       | 0.0           | 3.632         | 1.628       | 2.289     | 16.099           |
| French Fries (Crinkle Cut)           | 1.019       | 0.0           | 3.565         | 2.037       | 2.037     | 20.374           |
| French Fries (Seasoned)              | 1.026       | 0.0           | 8.21          | 2.052       | 2.052     | 20.525           |
| Glazed Carrots                       | 3.375       | 0.0           | 7.425         | 1.099       | 2.198     | 11.318           |
| Green Beans                          | 1.01        | 0.0           | 2.23          | 1.03        | 2.39      | 4.77             |
| Mashed Sweet Potatoes                | 0.0         | 0.0           | 0.0           | 1.698       | 1.698     | 22.927           |
| Mashed/Whipped Potatoes (with Gravy) | 0.0         | 0.0           | 1.582         | 2.079       | 1.04      | 19.299           |
| Mixed Vegetables                     | 1.62        | 0.0           | 3.56          | 3.2         | 3.2       | 12.8             |
| Oven Roasted Potatoes                | 0.0878      | 0.0           | 1.97          | 2.9         | 2.835     | 14.107           |
| Peas & Carrots                       | 0.81        | 0.0           | 1.782         | 3.076       | 3.094     | 9.281            |
| Potato Rounds (6-12)                 | 1.37        | 0.0           | 4.793         | 2.739       | 2.739     | 27.391           |
| Potato Rounds (K-5)                  | 1.027       | 0.0           | 3.595         | 2.054       | 2.054     | 20.543           |
| Refried Beans                        | 1.337       | 0.0           | 2.313         | 7.185       | 4.871     | 15.933           |
| Savory Carrots                       | 1.013       | 0.0           | 0.0           | 0.096       | 2.5       | 7.5              |
| Shredded Lettuce & Tomato (9-12)     | 0.0         | 0.0           | 0.0           | 0.01        | 0.708     | 1.72             |
| Shredded Lettuce & Tomato (K-8)      | 0.0         | 0.0           | 0.0           | 0.0         | 0.472     | 1.147            |
| Spinach & Lettuce Salad (9-12)       | 0.0         | 0.0           | 0.05          | 0.99        | 1.09      | 1.96             |
| Spinach & Lettuce Salad (K-8)        | 0.0         | 0.0           | 0.03          | 0.66        | 0.73      | 1.31             |
| Strawberry & Bananas                 | 0.005       | 0.0           | 0.247         | 0.864       | 2.643     | 18.136           |
| Strawberry Applesauce                | 0.0         | 0.0           | 0.002         | 0.78        | 1.887     | 15.875           |
| Sweet Peas                           | 1.68        | 0.0           | 3.93          | 4.74        | 4.08      | 12.36            |
| Sweet Potato Casserole               | 2.153       | 0.0           | 4.795         | 3.907       | 3.397     | 74.366           |
| Sweet Potato Fries                   | 0.5         | 0.0           | 5.0           | 1.0         | 3.0       | 21.0             |
| Three Bean Salad                     | 0.0         | 0.0           | 0.995         | 6.669       | 4.745     | 25.991           |
| Tomato Soup                          | 0.0         | 0.0           | 0.0           | 1.447       | 0.0       | 14.468           |
| Vegetable Soup                       | 0.015       | 0.0           | 0.2           | 2.081       | 1.682     | 7.595            |

## Output:


source: excel_file
label: operator: subtitle
operator: stack
stack_start_idx: 2
stack_end_idx: 7
alternative_label: operator: stack
stack_start_idx: 2
stack_end_idx: 7
operator: subtitle