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:
| OCCUPATION                     |     ALL |   PHONE |   EMAIL |
|:-------------------------------|--------:|--------:|--------:|
| Appraiser                      |   88626 |   61034 |   25336 |
| Architect                      |   98805 |   70981 |   25647 |
| Army Credit Union Trades       |  150399 |   95307 |   49473 |
| Auditor                        |   15769 |   11233 |    4810 |
| Auto Mechanic                  |    9686 |    6471 |    2683 |
| Baker                          |    8633 |    5419 |    2312 |
| Banker                         |   19140 |   12301 |    5936 |
| Bartender                      |   13462 |    7804 |    3713 |
| Bookkeeper                     |   58578 |   40627 |   16169 |
| Broker/Stock/Trader            | 1461924 |  885050 |  536957 |
| Cashier                        |   75359 |   44031 |   22157 |
| Chemist                        |    9510 |    7209 |    2866 |
| Chiropractor                   |   39659 |   24155 |    9589 |
| Clerk                          |  933489 |  655004 |  308384 |
| Computer Programmer            |   25571 |   18518 |    8043 |
| Construction                   |  297600 |  196855 |   74119 |
| Cosmetologist                  | 1069332 |  635772 |  276644 |
| Counselor                      |   68536 |   44331 |   18165 |
| Dental Assistant               |   67465 |   40366 |   17832 |
| Dental Hygienist               |  109197 |   75587 |   27502 |
| Dentist                        |  168562 |  116581 |   43142 |
| Designer                       |   17946 |   12555 |    4956 |
| Detective/Investigator         |   14630 |    9320 |    4151 |
| Dietician                      |   34120 |   24042 |    8306 |
| Driver/Bus Driver              |   21043 |   13480 |    6142 |
| Driver/Truck Driver            |   90047 |   58143 |   22641 |
| Editor                         |    8920 |    6392 |    2459 |
| Electrician                    |  189399 |  130533 |   50056 |
| Engineer                       |  518782 |  381961 |  135264 |
| Engineer/Electrical/Electronic |    9084 |    6430 |    2625 |
| Farmer/Dairyman                |  631103 |  502191 |  112994 |
| Firefighter                    |   26537 |   19398 |    7934 |
| Gardener/Landscaper            |   15845 |   10532 |    3931 |
| Geologist                      |    9418 |    7050 |    2313 |
| Housekeeper/Maid               |   32839 |   19800 |    7454 |
| Insurance/Agent                | 1119009 |  729472 |  325327 |
| Interior Designer              |    8211 |    6082 |    2056 |
| Laborer                        | 2409498 | 1423065 |  716736 |
| Legal Secretary                |   11059 |    7836 |    3313 |
| Legal/Attorney/Lawyer          |  362136 |  266498 |   91464 |
| Legal/Paralegal/Assistant      |   17335 |   11441 |    4940 |
| Librarian/Archivist            |   11134 |    8352 |    2797 |
| Machinist                      |   56651 |   38777 |   15235 |
| Manager/Marketing Manager      |  602945 |  419233 |  206784 |
| Manager/Plant Manager          |    8059 |    5916 |    2195 |
| Manager/Sales Manager          |   42126 |   30048 |   12519 |
| Mechanic                       |  240457 |  157024 |   65002 |
| Medical Assistant              |   30459 |   18751 |    8111 |
| Medical Doctor/Physician       |  627895 |  423018 |  155423 |
| Medical Secretary              |   18373 |   10954 |    5112 |
| Medical Technician             |   18926 |   13286 |    5590 |
| Medical/Paramedic              |   20277 |   13228 |    5909 |
| Musician/Music/Dance           |    7982 |    5542 |    2268 |
| Navy Credit Union Trades       |  187077 |  136257 |   54752 |
| Nurse                          |   70247 |   40371 |   19606 |
| Nurse (Registered)             | 3139173 | 2032183 |  997629 |
| Nurse/LPN                      |  492778 |  310678 |  145568 |
| Nurses Aide/Orderly            |  442504 |  233724 |  132211 |
| Optician                       |   19469 |   13285 |    5429 |
| Optometrist                    |   10357 |    7257 |    2526 |
| Pastor                         |   58078 |   44084 |   16021 |
| Pharmacist/Pharmacy            |  323188 |  221279 |   89315 |
| Photography                    |    8009 |    5345 |    2334 |
| Pilot                          |  269477 |  175711 |   65344 |
| Plumber                        |  107519 |   70946 |   26110 |
| Police/Trooper                 |   31859 |   20925 |    8686 |
| Press Operator                 |   15261 |   10327 |    4303 |
| Professor                      |   24768 |   19548 |    6184 |
| Psychologist                   |  111699 |   70445 |   30208 |
| Real Estate/Realtor            | 1448054 |  921666 |  407162 |
| Researcher                     |    8591 |    5924 |    2262 |
| Scientist                      |   20412 |   14738 |    5729 |
| Security                       |  193890 |   95904 |   58247 |
| Shipping/Import/Export/Custom  |   23787 |   14861 |    6568 |
| Social Worker/Case Worker      |  271048 |  179330 |   69684 |
| Surveyor                       |   22811 |   16295 |    5607 |
| Teacher                        |  358047 |  270323 |   99511 |
| Technician                     |  115610 |   77503 |   34553 |
| Technician/Lab                 |   44258 |   30328 |   13282 |
| Technician/X-ray               |   25097 |   16565 |    7141 |
| Teller/Bank Teller             |   43859 |   29058 |   12065 |
| Therapist                      |   68945 |   46799 |   19134 |
| Therapists/Physical            |  278878 |  187396 |   70644 |
| Veterinarian                   |   47372 |   30070 |   10301 |
| Welder                         |   41444 |   26616 |   10211 |

## Output:


source: excel_file
label: explode