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:
| STATE          |   TOTAL CASES 200617 |   BLACK CASES 200617 |   HISPANIC CASES 200617 |   WHITE CASES 200617 |   BLACK CI 200617 |   HISPANIC CI 200617 |   WHITE CI 200617 |   TOTAL CASES 200622 |   BLACK CASES 200622 | HISPANIC CASES 200622   |   WHITE CASES 200622 |   BLACK CI 200622 | HISPANIC CI 200622   |   WHITE CI 200622 |   TOTAL CASES 200626 |   BLACK CASES 200626 |   HISPANIC CASES 200626 |   WHITE CASES 200626 |   BLACK CI 200626 |   HISPANIC CI 200626 |   WHITE CI 200626 |   TOTAL CASES 200630 |   BLACK CASES 200630 |   HISPANIC CASES 200630 |   WHITE CASES 200630 |   BLACK CI 200630 |   HISPANIC CI 200630 |   WHITE CI 200630 |   TOTAL CASES 200702 | BLACK CASES 200702   | HISPANIC CASES 200702   | WHITE CASES 200702   | BLACK CI 200702   | HISPANIC CI 200702   | WHITE CI 200702   |   TOTAL CASES 200707 |   BLACK CASES 200707 | HISPANIC CASES 200707   |   WHITE CASES 200707 |   BLACK CI 200707 | HISPANIC CI 200707   |   WHITE CI 200707 |
|:---------------|---------------------:|---------------------:|------------------------:|---------------------:|------------------:|---------------------:|------------------:|---------------------:|---------------------:|:------------------------|---------------------:|------------------:|:---------------------|------------------:|---------------------:|---------------------:|------------------------:|---------------------:|------------------:|---------------------:|------------------:|---------------------:|---------------------:|------------------------:|---------------------:|------------------:|---------------------:|------------------:|---------------------:|:---------------------|:------------------------|:---------------------|:------------------|:---------------------|:------------------|---------------------:|---------------------:|:------------------------|---------------------:|------------------:|:---------------------|------------------:|
| IOWA           |                24263 |                 2426 |                    6544 |                14800 |              1922 |                 3345 |               550 |                26050 |                 2605 | 6773.0                  |                16151 |              2064 | 3462.0               |               600 |                27473 |                 2747 |                    7143 |                17308 |              2177 |                 3652 |               643 |                28947 |                 2605 |                    7237 |                18526 |              2064 |                 3700 |               688 |                29966 | 2697.0               | 7192.0                  | 18879.0              | 2137.0            | 3677.0               | 701.0             |                31929 |                 2874 | 7663.0                  |                20435 |              2277 | 3917.0               |               759 |
| WASHINGTON     |                26531 |                 1164 |                    8440 |                 7031 |               355 |                  859 |               136 |                28680 |                 1205 | 8872.0                  |                 7300 |               368 | 903.0                |               141 |                30367 |                 1265 |                    9751 |                 7750 |               386 |                  993 |               150 |                32253 |                 1331 |                   10420 |                 8205 |               406 |                 1061 |               158 |                33435 | 1366.0               | 10717.0                 | 8493.0               | 417.0             | 1091.0               | 164.0             |                36985 |                 1455 | 11685.0                 |                 9458 |               444 | 1190.0               |               183 |
| CALIFORNIA     |               109020 |                 5043 |                   61492 |                19424 |               196 |                  396 |               134 |               173824 |                 5485 | 69392.0                 |                21177 |               214 | 447.0                |               146 |               195571 |                 5981 |                   76036 |                22871 |               233 |                  490 |               157 |               222917 |                 6557 |                   83658 |                25250 |               255 |                  539 |               174 |               232657 | 6774.0               | 86009.0                 | 26127.0              | 264.0             | 554.0                | 180.0             |               271684 |                 7693 | 97599.0                 |                30519 |               300 | 629.0                |               210 |
| MISSISSIPPI    |                20152 |                 9785 |                    1113 |                 5198 |               870 |                 1100 |               309 |                20641 |                10671 | 1111.0                  |                 5466 |               949 | 1098.0               |               325 |                24516 |                12317 |                    1300 |                 6792 |              1095 |                 1285 |               404 |                27247 |                12276 |                    1425 |                 6443 |              1091 |                 1408 |               383 |                27900 | 12438.0              | 1444.0                  | 6554.0               | 1106.0            | 1427.0               | 390.0             |                31257 |                15060 | 1544.0                  |                 8266 |              1339 | 1526.0               |               492 |
| FLORIDA        |                80109 |                15300 |                   28446 |                43000 |               510 |                  673 |               427 |               100217 |                17900 | 34111.0                 |                48500 |               597 | 808.0                |               482 |               114018 |                19983 |                   37927 |                54402 |               666 |                  898 |               541 |               152434 |                24401 |                   45445 |                66552 |               813 |                 1076 |               662 |               169106 | 26689.0              | 49266.0                 | 72493.0              | 890.0             | 1166.0               | 721.0             |               213794 |                32307 | 58115.0                 |                86844 |              1077 | 1376.0               |               863 |
| GEORGIA        |                59078 |                15214 |                    8896 |                12840 |               442 |                  855 |               231 |                64701 |                16523 | 10299.0                 |                21803 |               480 | 990.0                |               392 |                71095 |                21174 |                   11819 |                24259 |               616 |                 1136 |               436 |                79417 |                22417 |                   12725 |                19917 |               652 |                 1223 |               358 |                84237 | 23675.0              | 13645.0                 | 21260.0              | 688.0             | 1311.0               | 382.0             |                97064 |                26615 | 14997.0                 |                23708 |               774 | 1441.0               |               426 |
| TENNESSEE      |                31830 |                 6712 |                    8242 |                13346 |               575 |                 2155 |               265 |                34102 |                 7312 | 9404.0                  |                14657 |               626 | 2459.0               |               291 |                38034 |                 8235 |                   10358 |                16340 |               705 |                 2708 |               325 |                42297 |                 8872 |                   11204 |                17771 |               760 |                 2930 |               353 |                45315 | 9676.0               | 11729.0                 | 19194.0              | 829.0             | 3067.0               | 381.0             |                52155 |                10640 | 12524.0                 |                21497 |               911 | 3275.0               |               427 |
| NORTH CAROLINA |                45853 |                 8169 |                   13610 |                17118 |               351 |                 1352 |               260 |                52801 |                 8963 | 16016.0                 |                19627 |               385 | 1591.0               |               298 |                57183 |                 9591 |                   17634 |                21561 |               412 |                 1751 |               327 |                64670 |                10547 |                   19918 |                24415 |               453 |                 1978 |               371 |                66513 | 15963.0              | 30596.0                 | 37247.0              | 686.0             | 3039.0               | 566.0             |                74529 |                11900 | 22212.0                 |                27827 |               511 | 2206.0               |               422 |
| VIRGINIA       |                55775 |                 7852 |                   19032 |                11518 |               462 |                 2323 |               219 |                58469 |                 8257 | 19962.0                 |                12121 |               486 | 2436.0               |               231 |                60570 |                 8587 |                   20836 |                12686 |               506 |                 2543 |               242 |                62787 |                 8915 |                   21430 |                13244 |               525 |                 2615 |               252 |                63735 | 9177.0               | 21746.0                 | 13609.0              | 540.0             | 2654.0               | 259.0             |                66740 |                 9741 | 22477.0                 |                14307 |               573 | 2743.0               |               273 |
| MARYLAND       |                62409 |                18017 |                   17020 |                12244 |               964 |                 2707 |               401 |                64603 |                18657 | 17580.0                 |                12693 |               999 | 2796.0               |               416 |                66115 |                18990 |                   17918 |                12952 |              1017 |                 2850 |               424 |                67559 |                19349 |                   18229 |                19349 |              1036 |                 2899 |               634 |                68423 | 19474.0              | 18289.0                 | 13380.0              | 1042.0            | 2909.0               | 438.0             |                70396 |                20157 | 18690.0                 |                13945 |              1079 | 2973.0               |               457 |
| MICHIGAN       |                66269 |                18861 |                    4639 |                23101 |              1339 |                  893 |               309 |                67711 |                19137 | 5417.0                  |                23744 |              1359 | 1043.0               |               317 |                68989 |                19356 |                    5519 |                24384 |              1375 |                 1063 |               326 |                70223 |                19554 |                    5618 |                25040 |              1389 |                 1082 |               335 |                64132 | 19702.0              | 5131.0                  | 25429.0              | 1399.0            | 988.0                | 340.0             |                73269 |                20006 | 5862.0                  |                26424 |              1421 | 1129.0               |               353 |
| ILLINOIS       |               133639 |                22169 |                   43441 |                26622 |              1198 |                 1970 |               344 |               136762 |                22949 | 44647.0                 |                27901 |              1240 | 2025.0               |               361 |               139434 |                23369 |                   45576 |                28790 |              1263 |                 2067 |               372 |               142461 |                23889 |                   46385 |                29684 |              1291 |                 2104 |               384 |               144013 |                      |                         |                      |                   |                      |                   |               147865 |                24783 | 47778.0                 |                31328 |              1340 | 2167.0               |               405 |
| OHIO           |                38911 |                 9945 |                    3127 |                19371 |               654 |                  686 |               211 |                41578 |                11330 | 3673.0                  |                22379 |               746 | 806.0                |               243 |                47651 |                10279 |                    3287 |                19632 |               676 |                  721 |               213 |                51789 |                11419 |                    4068 |                20865 |               751 |                  892 |               227 |                52865 | 11748.0              | 4117.0                  | 21237.0              | 773.0             | 903.0                | 231.0             |                57956 |                12860 | 4346.0                  |                22707 |               846 | 953.0                |               247 |
| PENNSYLVANIA   |                79483 |                10000 |                    6300 |                23000 |               651 |                  648 |               236 |                82168 |                10400 | 6600.0                  |                24200 |               677 | 678.0                |               248 |                83770 |                10700 |                    6800 |                24900 |               697 |                  699 |               256 |                86606 |                11100 |                    7000 |                26000 |               723 |                  719 |               267 |                88074 | 11300.0              | 7100.0                  | 26600.0              | 736.0             | 730.0                | 273.0             |                88691 |                11800 | 7300.0                  |                27900 |               768 | 750.0                |               286 |
| NEVADA         |                11658 |                  815 |                    3258 |                 2509 |               262 |                  365 |               167 |                13535 |                  830 | 3669.0                  |                 2583 |               267 | 411.0                |               172 |                14859 |                  826 |                    4116 |                 2641 |               266 |                  461 |               176 |                18456 |                 1050 |                    4672 |                 3451 |               338 |                  523 |               230 |                19101 | 1104.0               | 4928.0                  | 3647.0               | 355.0             | 552.0                | 243.0             |                22909 |                 1230 | 5146.0                  |                 4149 |               395 | 576.0                |               277 |
| ARIZONA        |                30097 |                 1045 |                   10046 |                 6892 |               282 |                  437 |               174 |                54586 |                 1382 | 14165.0                 |                 9040 |               372 | 616.0                |               228 |                63030 |                 1537 |                   16083 |                10209 |               414 |                  699 |               258 |                79215 |                 1749 |                   18973 |                12417 |               471 |                  825 |               314 |                87425 | 1933.0               | 20606.0                 | 13770.0              | 521.0             | 896.0                | 348.0             |               105094 |                 2204 | 23648.0                 |                15923 |               594 | 1028.0               |               402 |
| UTAH           |                14937 |                  470 |                    6315 |                 5125 |              1047 |                 1387 |               205 |                17462 |                  511 | 7471.0                  |                 5956 |              1139 | 1641.0               |               238 |                19374 |                  555 |                    8379 |                 6661 |              1237 |                 1841 |               266 |                22217 |                  600 |                    9533 |                 7677 |              1337 |                 2094 |               307 |                22716 | 613.0                | 9746.0                  | 7904.0               | 1366.0            | 2141.0               | 316.0             |                25469 |                  657 | 10743.0                 |                 9152 |              1464 | 2360.0               |               366 |
| COLORADO       |                29442 |                 1693 |                   11356 |                10113 |               639 |                  909 |               259 |                30539 |                 1729 | 11693.0                 |                10490 |               653 | 936.0                |               268 |                31749 |                 1746 |                   12115 |                10960 |               659 |                  969 |               280 |                32511 |                 1762 |                   12289 |                11151 |               665 |                  983 |               285 |                33209 | 1777.0               | 12495.0                 | 11417.0              | 671.0             | 1000.0               | 292.0             |                34257 |                 1809 | 12905.0                 |                11668 |               683 | 1033.0               |               298 |
| OKLAHOMA       |                 8645 |                  705 |                    1584 |                 5366 |               228 |                  367 |               208 |                10733 |                  826 |                         |                 6317 |               268 |                      |               244 |                11948 |                  889 |                    2366 |                 6914 |               288 |                  549 |               268 |                13757 |                 1018 |                    2793 |                 7883 |               330 |                  648 |               305 |                14112 | 1046.0               |                         | 8108.0               | 339.0             | 0.0                  | 314.0             |                16362 |                 1209 |                         |                 9229 |               392 |                      |               357 |
| WISCONSIN      |                23198 |                 4304 |                    7638 |                12316 |              1103 |                 1901 |               261 |                24819 |                 4493 | 8064.0                  |                13340 |              1152 | 2007.0               |               283 |                26227 |                 4676 |                    8386 |                14355 |              1199 |                 2087 |               304 |                28659 |                 5022 |                    8843 |                15910 |              1287 |                 2201 |               337 |                29199 | 5085.0               | 8921.0                  | 16281.0              | 1304.0            | 2221.0               | 345.0             |                32061 |                 5487 | 9427.0                  |                18184 |              1407 | 2346.0               |               385 |
| MAINE          |                 2836 |                  669 |                      78 |                 1697 |              3111 |                  341 |               136 |                 2957 |                  719 | 89.0                    |                 1751 |              3343 | 389.0                |               140 |                 3102 |                  745 |                     105 |                 1840 |              3464 |                  459 |               147 |                 3253 |                  771 |                     117 |                 1921 |              3585 |                  512 |               154 |                 3328 | 790.0                | 121.0                   | 1962.0               | 3673.0            | 529.0                | 157.0             |                 3440 |                  802 | 129.0                   |                 2030 |              3729 | 565.0                |               162 |
| OREGON         |                 6098 |                  214 |                    2103 |                 2644 |               231 |                  375 |                83 |                 6572 |                  260 | 2271.0                  |                 2793 |               280 | 405.0                |                88 |                 7568 |                  332 |                    2680 |                 3120 |               358 |                  478 |                98 |                 8485 |                  368 |                    3061 |                 3490 |               397 |                  546 |               110 |                 8931 | 393.0                | 3227.0                  | 3704.0               | 424.0             | 575.0                | 117.0             |                10395 |                  442 | 3802.0                  |                 4291 |               476 | 678.0                |               135 |
| NEW JERSEY     |               167703 |                16283 |                   28797 |                59436 |              1222 |                 1574 |              1219 |               169142 |                16824 | 29952.0                 |                34869 |              1263 | 1637.0               |               715 |               170196 |                17091 |                   30419 |                35518 |              1283 |                 1662 |               728 |               171272 |                17242 |                   30757 |                35928 |              1294 |                 1681 |               737 |               171928 | 17351.0              | 31016.0                 | 36216.0              | 1302.0            | 1695.0               | 743.0             |               173611 |                17561 | 31360.0                 |                36712 |              1318 | 1714.0               |               753 |

## Output:


source: notebook
label: operator: wide_to_long
wide_to_long_start_idx: 1
wide_to_long_end_idx: 42