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:
| Subpart        | Material group    | Substances                                      | CAS number   |   Mass(mg) |   Mass(%) of subpart |   Mass(%) of total product |
|:---------------|:------------------|:------------------------------------------------|:-------------|-----------:|---------------------:|---------------------------:|
| Die            | Doped silicon     | Silicon (Si)                                    | 7440-21-3    |    0.04    |            100       |                    0.72243 |
|                |                   | subTotal                                        |              |    0.04    |            100       |                    0.72243 |
| Lead Frame     | Iron-nickel alloy | Aluminium (Al)                                  | 7429-90-5    |    0.00172 |              0.09005 |                    0.03106 |
|                |                   | Carbon (C)                                      | 7440-44-0    |    0.00076 |              0.03979 |                    0.01373 |
|                |                   | Chromium (Cr)                                   | 7440-47-3    |    0.00172 |              0.09005 |                    0.03106 |
|                |                   | Cobalt (Co)                                     | 7440-48-4    |    0.00821 |              0.42985 |                    0.14828 |
|                |                   | Iron (Fe)                                       | 7439-89-6    |    0.85281 |             44.6502  |                   15.4024  |
|                |                   | Manganese (Mn)                                  | 7439-96-5    |    0.01318 |              0.69006 |                    0.23804 |
|                |                   | Nickel (Ni)                                     | 7440-02-0    |    0.65971 |             34.5401  |                   11.9149  |
|                |                   | Phosphorous (P)                                 | 7723-14-0    |    0.00038 |              0.0199  |                    0.00686 |
|                |                   | Silicon (Si)                                    | 7440-21-3    |    0.00497 |              0.26021 |                    0.08976 |
|                |                   | Sulphur (S)                                     | 7704-34-9    |    0.00038 |              0.0199  |                    0.00686 |
|                | Pure metal layer  | Copper (Cu)                                     | 7440-50-8    |    0.32183 |             16.8499  |                    5.8125  |
|                |                   | Silver (Ag)                                     | 7440-22-4    |    0.04431 |              2.31992 |                    0.80027 |
|                |                   | subTotal                                        |              |    1.90998 |            100       |                   34.4957  |
| Mould Compound | Filler            | Silica fused                                    | 60676-86-0   |    2.53087 |             75.1     |                   45.7095  |
|                | Pigment           | Carbon black                                    | 1333-86-4    |    0.01011 |              0.3     |                    0.18259 |
|                | Polymer           | Epichlorohydrin/o-Cresol/Formaldehyde polymer 1 | 29690-82-2   |    0.58975 |             17.5     |                   10.6513  |
|                |                   | Phenol Formaldehyde resin 1                     | 9003-35-4    |    0.23927 |              7.1     |                    4.3214  |
|                |                   | subTotal                                        |              |    3.37    |            100       |                   60.8648  |
| Post-plating   | Tin solder        | Antimony (Sb)                                   | 7440-36-0    |    1e-05   |              0.00476 |                    0.00018 |
|                |                   | Bismuth (Bi)                                    | 7440-69-9    |    1e-05   |              0.00476 |                    0.00018 |
|                |                   | Copper (Cu)                                     | 7440-50-8    |    1e-05   |              0.00476 |                    0.00018 |
|                |                   | Lead (Pb)                                       | 7439-92-1    |    2e-05   |              0.00952 |                    0.00036 |
|                |                   | Tin (Sn)                                        | 7440-31-5    |    0.20995 |             99.9762  |                    3.79186 |
|                |                   | subTotal                                        |              |    0.21    |            100       |                    3.79276 |
| Wire           | Pure metal        | Copper (Cu)                                     | 7440-50-8    |    0.00688 |            100       |                    0.12426 |
|                |                   | subTotal                                        |              |    0.00688 |            100       |                    0.12426 |
|                |                   | total                                           |              |    5.53686 |            100       |                  100       |

## Output:


source: web
label: ffill