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:
| token            | is_authority   | is_ingredient   | is_ailment   | is_body_part   | is_treatment   |
|:-----------------|:---------------|:----------------|:-------------|:---------------|:---------------|
| abcess           | False          | False           | True         | False          | False          |
| abcesses         | False          | False           | True         | False          | False          |
| abdomen          | False          | False           | False        | True           | False          |
| abdominal        | False          | False           | False        | True           | False          |
| abnormal         | False          | False           | True         | False          | False          |
| abnormality      | False          | False           | True         | False          | False          |
| abortifacient    | False          | False           | False        | False          | True           |
| abortion         | False          | False           | False        | False          | True           |
| abortive         | False          | False           | True         | False          | False          |
| abrotanum        | False          | True            | False        | False          | False          |
| abscess          | False          | False           | True         | False          | False          |
| absentmindedness | False          | False           | True         | False          | False          |
| absinth          | False          | True            | False        | False          | False          |
| acacia           | False          | True            | False        | False          | False          |
| accident         | False          | False           | True         | False          | False          |
| ache             | False          | False           | True         | False          | False          |
| acne             | False          | False           | True         | False          | False          |
| acorn            | False          | True            | False        | False          | False          |
| acute            | False          | False           | True         | False          | False          |
| aesculapius      | True           | False           | False        | False          | False          |
| affectis         | True           | False           | False        | False          | False          |
| afflicted        | False          | False           | True         | False          | False          |
| agaric           | False          | True            | False        | False          | False          |
| age              | False          | False           | True         | False          | False          |
| aged             | False          | False           | True         | False          | False          |
| agent            | False          | True            | False        | False          | False          |
| aid              | False          | False           | False        | False          | True           |
| ailing           | False          | False           | True         | False          | False          |
| ailment          | False          | False           | True         | False          | False          |
| air              | False          | True            | False        | False          | False          |
| al-kaḥḥalīn      | True           | False           | False        | False          | False          |
| al-kaḥḥlīn       | True           | False           | False        | False          | False          |
| al-kaḥḥāl        | True           | False           | False        | False          | False          |
| al-kaḥḥālīn      | True           | False           | False        | False          | False          |
| al-kindī         | True           | False           | False        | False          | False          |
| alchemical       | False          | False           | False        | False          | True           |
| alchemist        | True           | False           | False        | False          | False          |
| alcoholic        | False          | False           | True         | False          | False          |
| alcoholism       | False          | False           | True         | False          | False          |
| alignment        | False          | False           | True         | False          | False          |
| alimentation     | False          | False           | True         | False          | False          |
| alleviated       | False          | False           | False        | False          | True           |
| alleviating      | False          | False           | False        | False          | True           |
| allāh            | True           | False           | False        | False          | False          |
| almond           | False          | True            | False        | False          | False          |
| aloe             | False          | True            | False        | False          | False          |
| aloe-wood        | False          | True            | False        | False          | False          |
| alopecia         | False          | False           | True         | False          | False          |
| althea           | False          | True            | False        | False          | False          |
| alum             | False          | True            | False        | False          | False          |
| amber            | False          | True            | False        | False          | False          |
| ambergris        | False          | True            | False        | False          | False          |
| amenorrhoea      | False          | False           | True         | False          | False          |
| ammonia          | False          | True            | False        | False          | False          |
| ammoniac         | False          | True            | False        | False          | False          |
| amnesia          | False          | False           | True         | False          | False          |
| amomum           | False          | True            | False        | False          | False          |
| amulet           | False          | False           | False        | False          | True           |
| anachroid        | False          | False           | False        | True           | False          |
| anal             | False          | False           | False        | True           | False          |
| anaphrodisiac    | False          | False           | False        | False          | True           |
| anarcardium      | False          | True            | False        | False          | False          |
| anasarca         | False          | True            | False        | False          | False          |
| anatomical       | False          | False           | False        | True           | False          |
| anatomy          | False          | False           | False        | True           | False          |
| anchusa          | False          | True            | False        | False          | False          |
| andara           | False          | True            | False        | False          | False          |
| anemone          | False          | True            | False        | False          | False          |
| anguish          | False          | False           | True         | False          | False          |
| anima            | True           | False           | False        | False          | False          |
| anise            | False          | True            | False        | False          | False          |
| aniseed          | False          | True            | False        | False          | False          |
| anorectal        | False          | False           | True         | False          | False          |
| antihemorrhagic  | False          | True            | False        | False          | False          |
| antimony         | False          | True            | False        | False          | False          |
| antipyretic      | False          | True            | False        | False          | False          |
| anus             | False          | False           | False        | True           | False          |
| anxiety          | False          | False           | True         | False          | False          |
| aperient         | False          | False           | False        | False          | True           |
| aphasia          | False          | False           | True         | False          | False          |
| aphrodisiac      | False          | True            | False        | False          | False          |
| apoplexy         | False          | False           | True         | False          | False          |
| apparatus        | False          | True            | False        | False          | False          |
| appetite         | False          | False           | True         | False          | False          |
| apple            | False          | True            | False        | False          | False          |
| application      | False          | False           | False        | False          | True           |
| applied          | False          | False           | False        | False          | True           |
| apprentice       | True           | False           | False        | False          | False          |
| apricot          | False          | True            | False        | False          | False          |
| arachnoid        | False          | False           | True         | False          | False          |
| archigenes       | True           | False           | False        | False          | False          |
| argilla          | False          | True            | False        | False          | False          |
| aristolochia     | True           | False           | False        | False          | False          |
| aristotle        | True           | False           | False        | False          | False          |
| arm              | False          | False           | False        | True           | False          |
| armpit           | False          | False           | False        | True           | False          |
| aromatic         | False          | True            | False        | False          | False          |
| arsenic          | False          | True            | False        | False          | False          |
| artemisia        | False          | True            | False        | False          | False          |
| artery           | False          | False           | False        | True           | False          |

## Output:


source: notebook
label: operator: stack
stack_start_idx: 1
stack_end_idx: 5
alternative_label: operator: transpose
operator: stack
stack_start_idx: 1
stack_end_idx: 1309