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:
| Index      |   FS_1_NB |   FS_1_LR |   FS_1_DT |   FS_1_RF |   FS_1_AB |   FS_3_NB |   FS_3_LR |   FS_3_DT |   FS_3_RF |   FS_3_AB |   FS_5_NB |   FS_5_LR |   FS_5_DT |   FS_5_RF |   FS_5_AB |   FS_7_NB |   FS_7_LR |   FS_7_DT |   FS_7_RF |   FS_7_AB |   FS_9_NB |   FS_9_LR |   FS_9_DT |   FS_9_RF |   FS_9_AB |   FS_11_NB |   FS_11_LR |   FS_11_DT |   FS_11_RF |   FS_11_AB |   FS_12_NB |   FS_12_LR |   FS_12_DT |   FS_12_RF |   FS_12_AB |
|:-----------|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|-----------:|-----------:|-----------:|-----------:|-----------:|-----------:|-----------:|-----------:|-----------:|-----------:|
| k-features |  1        |  1        |  1        |  1        |  1        |  3        |  3        |  3        |  3        |  3        |  5        |  5        |  5        |  5        |  5        |  7        |  7        |  7        |  7        |  7        |   9       |  9        |  9        |  9        |  9        |  11        |  11        |  11        |  11        |  11        |  12        |  12        |  12        |  12        |  12        |
| accuracy   |  0.548611 |  0.611111 |  0.645833 |  0.555556 |  0.618056 |  0.756944 |  0.75     |  0.770833 |  0.715278 |  0.701389 |  0.673611 |  0.777778 |  0.708333 |  0.756944 |  0.736111 |  0.770833 |  0.763889 |  0.604167 |  0.777778 |  0.694444 |   0.6875  |  0.708333 |  0.729167 |  0.729167 |  0.6875   |   0.75     |   0.770833 |   0.756944 |   0.791667 |   0.715278 |   0.770833 |   0.784722 |   0.680556 |   0.791667 |   0.590278 |
| precision  |  0.555296 |  0.606797 |  0.667262 |  0.558683 |  0.616298 |  0.768939 |  0.756872 |  0.807976 |  0.728081 |  0.72042  |  0.693182 |  0.781407 |  0.71968  |  0.757006 |  0.754772 |  0.78144  |  0.777695 |  0.624376 |  0.792518 |  0.714243 |   0.69554 |  0.72277  |  0.746457 |  0.736332 |  0.696469 |   0.759429 |   0.779566 |   0.769293 |   0.7922   |   0.739658 |   0.779535 |   0.805101 |   0.706384 |   0.814528 |   0.611781 |
| recall     |  0.602608 |  0.608456 |  0.625488 |  0.568767 |  0.599823 |  0.774464 |  0.749819 |  0.75589  |  0.708577 |  0.70841  |  0.716026 |  0.785684 |  0.731624 |  0.770085 |  0.778632 |  0.796805 |  0.768238 |  0.6048   |  0.780187 |  0.708687 |   0.71866 |  0.694192 |  0.733426 |  0.723791 |  0.690643 |   0.771822 |   0.767075 |   0.762647 |   0.798108 |   0.714681 |   0.783564 |   0.779352 |   0.672709 |   0.784729 |   0.602419 |
| f1-score   |  0.545958 |  0.604854 |  0.628641 |  0.563064 |  0.597043 |  0.763033 |  0.752746 |  0.765513 |  0.713697 |  0.711418 |  0.686825 |  0.783333 |  0.719801 |  0.762261 |  0.746828 |  0.779568 |  0.772373 |  0.604531 |  0.78391  |  0.708796 |   0.6983  |  0.705168 |  0.736202 |  0.729066 |  0.692642 |   0.756435 |   0.772332 |   0.7624   |   0.794241 |   0.720521 |   0.778059 |   0.788773 |   0.683104 |   0.795144 |   0.606351 |

## Output:


source: notebook
label: transpose