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   |   tpsa |   vsa_hyd |   weight |   peoe_vsa.0 |   peoe_vsa.1 |   peoe_vsa.2 |   peoe_vsa.3 |   peoe_vsa.4 |   peoe_vsa.5 |   peoe_vsa.6 |   peoe_vsa.0.1 |   peoe_vsa.1.1 |   peoe_vsa.2.1 |   peoe_vsa.3.1 |   peoe_vsa.4.1 |   peoe_vsa.5.1 |   peoe_vsa.6.1 |   vsa_acc |   vsa_acid |   vsa_base |   vsa_don |   vsa_other |   vsa_pol |   slogp_vsa0 |   slogp_vsa1 |   slogp_vsa2 |   slogp_vsa3 |   slogp_vsa4 |   slogp_vsa5 |   slogp_vsa6 |   slogp_vsa7 |   slogp_vsa8 |   slogp_vsa9 |   smr_vsa0 |   smr_vsa1 |   smr_vsa2 |   smr_vsa3 |   smr_vsa4 |   smr_vsa5 |   smr_vsa6 |   smr_vsa7 |   tpsa.1 |   logp.o.w. |   frac.anion7. |   frac.cation7. |   andrewbind |     mlogp |   clogp |      mw |   ub |   adistm |   adistd |   polar_area |   nonpolar_area |   psa_npsa |     tcsa |     tcpa |     tcnp |   ovality |   surface_area |   volume |   most_negative_charge |   most_positive_charge |   sum_absolute_charge |   dipole_moment |     homo |     lumo |   hardness |   ppsa1 |   ppsa2 |    ppsa3 |   pnsa1 |    pnsa2 |   pnsa3 |    fpsa1 |    fpsa2 |    fpsa3 |    fnsa1 |    fnsa2 |    fnsa3 |   wpsa1 |   wpsa2 |    wpsa3 |    wnsa1 |    wnsa2 |    wnsa3 |   dpsa1 |   dpsa2 |    dpsa3 |    rpcg |     rncg |   wpcs |   wncs |   sadh1 |   sadh2 |   sadh3 |   chdh1 |   chdh2 |   chdh3 |   scdh1 |   scdh2 |   scdh3 |   saaa1 |    saaa2 |    saaa3 |    chaa1 |    chaa2 |    chaa3 |    scaa1 |    scaa2 |    scaa3 |   mchg |   achg |   rdta |   n_sp2 |   n_sp3 |   o_sp2 |   o_sp3 |
|:--------|-------:|----------:|---------:|-------------:|-------------:|-------------:|-------------:|-------------:|-------------:|-------------:|---------------:|---------------:|---------------:|---------------:|---------------:|---------------:|---------------:|----------:|-----------:|-----------:|----------:|------------:|----------:|-------------:|-------------:|-------------:|-------------:|-------------:|-------------:|-------------:|-------------:|-------------:|-------------:|-----------:|-----------:|-----------:|-----------:|-----------:|-----------:|-----------:|-----------:|---------:|------------:|---------------:|----------------:|-------------:|----------:|--------:|--------:|-----:|---------:|---------:|-------------:|----------------:|-----------:|---------:|---------:|---------:|----------:|---------------:|---------:|-----------------------:|-----------------------:|----------------------:|----------------:|---------:|---------:|-----------:|--------:|--------:|---------:|--------:|---------:|--------:|---------:|---------:|---------:|---------:|---------:|---------:|--------:|--------:|---------:|---------:|---------:|---------:|--------:|--------:|---------:|--------:|---------:|-------:|-------:|--------:|--------:|--------:|--------:|--------:|--------:|--------:|--------:|--------:|--------:|---------:|---------:|---------:|---------:|---------:|---------:|---------:|---------:|-------:|-------:|-------:|--------:|--------:|--------:|--------:|
| count   | 208    |  208      |  208     |    208       |      208     |          208 |          208 |          208 |          208 |    208       |       208      |            208 |            208 |            208 |            208 |            208 |            208 |       208 |        208 |        208 |       208 |    208      |       208 |    208       |          208 |          208 |          208 |          208 |          208 |          208 |      208     |          208 |          208 |        208 |        208 |        208 |        208 |        208 |   208      |   208      |        208 |   208    |     208     |            208 |             208 |        208   | 208       | 208     | 208     |  208 |      208 |      208 |     208      |         208     |   208      | 208      | 208      | 208      |  208      |        208     |  208     |               208      |               208      |              208      |        208      | 208      | 208      |   208      | 208     | 208     | 208      | 208     |  208     | 208     | 208      | 208      | 208      | 208      | 208      | 208      | 208     | 208     | 208      | 208      |  208     | 208      | 208     |  208    | 208      | 208     | 208      |    208 |    208 |     208 |     208 |     208 |     208 |     208 |     208 |     208 |     208 |     208 | 208     | 208      | 208      | 208      | 208      | 208      | 208      | 208      | 208      |    208 |    208 |    208 |     208 |     208 |     208 |     208 |
| unique  | 128    |  194      |  191     |    164       |      155     |           66 |           38 |           16 |           11 |     21       |        92      |             66 |             12 |             15 |             19 |             20 |             37 |        42 |          3 |          7 |        11 |     81      |         4 |     57       |           74 |           41 |           30 |           45 |           54 |           11 |       61     |           21 |          114 |         42 |         70 |         46 |         95 |         38 |   112      |    73      |         75 |   133    |     200     |             12 |              65 |        127   | 194       | 205     | 190     |   13 |      172 |      171 |     204      |         206     |   200      |  88      | 189      | 120      |  198      |        206     |  206     |               194      |               194      |              206      |        205      | 206      | 206      |   206      | 206     | 206     | 206      | 206     |  206     | 206     | 198      | 206      | 166      | 198      | 205      | 190      | 206     | 206     | 206      | 206      |  206     | 206      | 206     |  206    | 206      | 194     | 195      |    192 |    186 |     146 |     146 |     155 |     152 |     148 |      32 |     160 |     160 |     135 | 205     | 204      | 194      | 205      | 196      |  38      | 206      | 206      | 180      |    155 |    158 |     19 |      99 |     178 |     101 |      99 |
| top     |  36.42 |   92.5894 |  180.167 |      8.93683 |       56.053 |            0 |            0 |            0 |            0 |      8.61901 |        24.5098 |              0 |              0 |              0 |              0 |              0 |              0 |         0 |          0 |          0 |         0 |     22.3811 |         0 |      3.12431 |            0 |            0 |            0 |            0 |            0 |            0 |      141.145 |            0 |            0 |          0 |          0 |          0 |          0 |          0 |    52.9295 |    18.4396 |          0 |    38.03 |       2.764 |              0 |               0 |          7.6 |   1.35334 |   2.099 | 230.098 |    3 |        0 |        0 |      31.4377 |         507.435 |     0.0612 |   0.0115 |   0.0466 |   0.0125 |    1.1836 |        538.873 |  906.224 |                -0.5935 |                 0.4361 |                6.1777 |          1.6084 |  -9.8202 |   0.2131 |     4.8147 | 423.564 | 446.633 |  41.8162 | 115.309 | -158.484 | -23.835 |   0.6337 |   1.1989 |   0.0695 |   0.3663 |  -1.7799 |  -0.0509 | 102.435 | 166.387 |  22.5336 |  36.3482 | -191.933 | -13.6734 | 177.397 | 1664.51 |  56.6862 |   0.081 |   0.1187 |      0 |      0 |       0 |       0 |       0 |       0 |       0 |       0 |       0 |       0 |       0 |  30.292 |  10.0973 |   0.1307 |  -1.1467 |  -0.3822 |  -0.0015 | -12.6059 |  -8.0243 |  -0.0072 |      0 |      0 |      0 |       0 |       0 |       0 |       0 |
| freq    |  15    |    3      |    3     |      5       |        6     |           63 |           83 |          134 |          150 |     48       |        25      |             23 |            179 |            168 |            125 |             81 |             60 |        35 |        201 |        125 |        73 |     16      |       161 |     21       |           40 |           75 |           52 |           39 |           59 |          155 |       29     |           74 |           18 |         46 |         58 |         69 |         19 |         81 |     8      |    31      |         25 |    15    |       2     |            191 |              50 |          8   |   3       |   2     |   3     |   42 |       35 |       35 |       2      |           2     |     2      |  10      |   3      |   7      |    2      |          2     |    2     |                 4      |                 3      |                2      |          2      |   2      |   2      |     2      |   2     |   2     |   2      |   2     |    2     |   2     |   2      |   2      |   3      |   2      |   2      |   3      |   2     |   2     |   2      |   2      |    2     |   2      |   2     |    2    |   2      |   4     |   2      |     15 |     21 |      47 |      47 |      47 |      44 |      44 |      44 |      47 |      47 |      47 |   2     |   2      |   3      |   2      |   3      |  16      |   2      |   2      |   3      |     44 |     44 |     44 |     106 |       9 |      99 |     102 |

## Output:


source: notebook
label: transpose