MMTU-benchmark/MMTU huggingface dataset:
Task: Formula-prediction-context (source dataset: enron-random)

You are given an table region extracted from a real Excel spreadsheet, which is centered around a cell called "Target Cell" (labeled as "[Target Cell]" shown in the table below). The table region below includes up to 10 rows above/below the Target Cell, and 10 columns to the left/right of the Target Cell. 

Your task is to analyze the table context surrounding the Target Cell, and predict the most likely Excel formula that should go in the Target Cell. If multiple formulas are possible, choose the most reasonable or commonly used based on context.

1. Please follow the standard formula syntax in Excel, e.g. always begins with an equal sign (=).
2. Base your predicted formula on the surrounding table context, e.g., column headers, annotations, and data values in nearby cells.
3. No explanation — just output the formula itself in a JSON format: {"formula": "your_formula_here"}.

Input Excel Snippet in Markdown format:
|    | A             | B   | C                   | D      | E     | F              | G   | H             | I                   | J                   | K   |
|---:|:--------------|:----|:--------------------|:-------|:------|:---------------|:----|:--------------|:--------------------|:--------------------|:----|
|  1 | [Target Cell] |     | S W A P S           |        |       |                |     |               |                     |                     |     |
|  2 | 4.0           |     |                     |        |       |                |     |               |                     |                     |     |
|  3 | 5.0           |     |                     |        |       |                |     |               |                     |                     |     |
|  4 |               |     |                     | Lots   | Price | Counter/Broker |     | Futures : Y/N | Position            | PNL                 |     |
|  5 |               |     | 2001-12-01 00:00:00 | -31.0  | 2.495 | EOL            |     |               | -30.972887136976436 | -32.52153149382525  |     |
|  6 |               |     | 2.6                 | 38.75  | 2.515 | EOL            |     |               | 38.716108921220545  | 32.90869258303745   |     |
|  7 |               |     | 0.9991253915153689  | 46.5   | 2.535 | EOL            |     |               | 46.45933070546466   | 30.198564958552005  |     |
|  8 |               |     | 518.7958595443553   | -15.5  | 2.52  | EOL            |     |               | -15.486443568488218 | -12.389154854790585 |     |
|  9 |               |     | 533.5079809344192   | -38.75 | 2.51  | EOL            |     |               | -38.716108921220545 | -34.84449802909861  |     |
| 10 |               |     |                     | -38.75 | 2.55  | EOL            |     |               | -38.716108921220545 | -19.358054460610376 |     |
| 11 |               |     |                     | 38.75  | 2.575 | EOL            |     |               | 38.716108921220545  | 9.679027230305103   |     |



min_row: 1
max_row: 11
min_col: 1
max_col: 11
target_cell_row_idx: 1
target_cell_col_idx: 1
target_cell_value: 3.0
formula: =COLUMN(C1)
Task: Formula-prediction-context (source dataset: enron-random)

You are given an table region extracted from a real Excel spreadsheet, which is centered around a cell called "Target Cell" (labeled as "[Target Cell]" shown in the table below). The table region below includes up to 10 rows above/below the Target Cell, and 10 columns to the left/right of the Target Cell. 

Your task is to analyze the table context surrounding the Target Cell, and predict the most likely Excel formula that should go in the Target Cell. If multiple formulas are possible, choose the most reasonable or commonly used based on context.

1. Please follow the standard formula syntax in Excel, e.g. always begins with an equal sign (=).
2. Base your predicted formula on the surrounding table context, e.g., column headers, annotations, and data values in nearby cells.
3. No explanation — just output the formula itself in a JSON format: {"formula": "your_formula_here"}.

Input Excel Snippet in Markdown format:
|    | A           | B             | C     | D      | E      | F      | G     | H   | I      | J   | K   | L   |
|---:|:------------|:--------------|:------|:-------|:-------|:-------|:------|:----|:-------|:----|:----|:----|
|  1 |             |               |       |        |        |        |       |     |        |     |     |     |
|  2 | Peak MW     | 627.0         | 173.0 | 166.0  | 182.0  | 560.0  | -25.0 | 0.0 | 1684.0 | 0.0 | 0.0 | 0.0 |
|  3 | Off Peak MW | [Target Cell] | 228.0 | -104.0 | -144.0 | 1558.0 | -60.0 | 0.0 | 1761.0 | 0.0 | 0.0 | 0.0 |
|  4 |             |               |       |        |        |        |       |     |        |     |     |     |
|  5 |             |               |       |        |        |        |       |     |        |     |     |     |
|  6 |             |               |       |        |        |        |       |     |        |     |     |     |
|  7 | RefDt       | (All)         |       |        |        |        |       |     |        |     |     |     |
|  8 | DealType    | (All)         |       |        |        |        |       |     |        |     |     |     |
|  9 | Name        | (All)         |       |        |        |        |       |     |        |     |     |     |
| 10 | Year        | (All)         |       |        |        |        |       |     |        |     |     |     |
| 11 | Month       | (All)         |       |        |        |        |       |     |        |     |     |     |
| 12 | Season      | (All)         |       |        |        |        |       |     |        |     |     |     |
| 13 | Quarter     | (All)         |       |        |        |        |       |     |        |     |     |     |



min_row: 1
max_row: 13
min_col: 1
max_col: 12
target_cell_row_idx: 3
target_cell_col_idx: 2
target_cell_value: 281.0
formula: =ROUND(SUM(B20:B21)/328,0)
Task: Formula-prediction-context (source dataset: enron-random)

You are given an table region extracted from a real Excel spreadsheet, which is centered around a cell called "Target Cell" (labeled as "[Target Cell]" shown in the table below). The table region below includes up to 10 rows above/below the Target Cell, and 10 columns to the left/right of the Target Cell. 

Your task is to analyze the table context surrounding the Target Cell, and predict the most likely Excel formula that should go in the Target Cell. If multiple formulas are possible, choose the most reasonable or commonly used based on context.

1. Please follow the standard formula syntax in Excel, e.g. always begins with an equal sign (=).
2. Base your predicted formula on the surrounding table context, e.g., column headers, annotations, and data values in nearby cells.
3. No explanation — just output the formula itself in a JSON format: {"formula": "your_formula_here"}.

Input Excel Snippet in Markdown format:
|    | A             | B                                          | C      | D   | E   | F   | G   | H   | I   | J   | K   |
|---:|:--------------|:-------------------------------------------|:-------|:----|:----|:----|:----|:----|:----|:----|:----|
|  1 |               | Counter Parties                            |        |     |     |     |     |     |     |     |     |
|  2 | 1.0           | Aquila Energy                              | Energy |     |     |     |     |     |     |     |     |
|  3 | [Target Cell] | Cinergy Marketing & Trading, LLC           | Energy |     |     |     |     |     |     |     |     |
|  4 | 3.0           | Duke Energy Trading and Marketing, LLC     | Energy |     |     |     |     |     |     |     |     |
|  5 | 4.0           | Dynergy Marketing and Trade                | Energy |     |     |     |     |     |     |     |     |
|  6 | 5.0           | El Paso Energy Corporation                 | Energy |     |     |     |     |     |     |     |     |
|  7 | 6.0           | Koch Industries Inc.                       | Energy |     |     |     |     |     |     |     |     |
|  8 | 7.0           | PG&E Energy Trading-Gas Corporation        | Energy |     |     |     |     |     |     |     |     |
|  9 | 8.0           | Southern Company Energy Marketing, LP      | Energy |     |     |     |     |     |     |     |     |
| 10 | 9.0           | Morgan Guarantee Trust Company of New York | Bank   |     |     |     |     |     |     |     |     |
| 11 | 11.0          | Bank of Montreal                           | Bank   |     |     |     |     |     |     |     |     |
| 12 | 12.0          | Bankers Trust Company                      | Bank   |     |     |     |     |     |     |     |     |
| 13 | 13.0          | J. Aron & Company                          | Energy |     |     |     |     |     |     |     |     |



min_row: 1
max_row: 13
min_col: 1
max_col: 11
target_cell_row_idx: 3
target_cell_col_idx: 1
target_cell_value: 2.0
formula: =A2+1
Task: Transform-by-output-target-schema (source dataset: github-pipelines)

Your task is to create a data transformation pipeline in Python using pandas libraries.

Given Source Tables below, and a Target Schema provided by users that demonstrates how the desired output table should look like schematically, please write Python pandas code that can transform the Source Tables into an output table, that matches the schema/structure given by the Target Schema.  Please note that the data values in the Target Schema are intended to represent the format and layout of the output table, but may not exactly match the actual data generated from the Source Tables when the python code is run on the Source Tables.

Use operations such as merge, groupby, pivot, apply, or any appropriate python or pandas steps. Your code should save the resulting DataFrame to a CSV file named 'output.csv'. Ensure that the code is executable and can be run directly as is, in a Python environment with pandas installed.

Source Tables:


Table #1
Filename: source_0.csv
Sample Rows in Markdown:
| name     | sex   |   births |
|:---------|:------|---------:|
| Charley  | M     |      305 |
| Paul     | M     |      301 |
| Edgar    | M     |      283 |
| Isaac    | M     |      274 |
| Otto     | M     |      271 |
| Luther   | M     |      260 |
| Lawrence | M     |      257 |
| Ira      | M     |      249 |
| Patrick  | M     |      248 |
| Guy      | M     |      239 |


Target Schema:
| sex   |   births |
|:------|---------:|
| F     |    90993 |
| M     |    80202 |

Return only the final code in markdown codeblock format, without any additional text or explanation. 



target: target.csv
train: source_0.csv
test: test_0.csv
Task: Transform-by-output-target-schema (source dataset: github-pipelines)

Your task is to create a data transformation pipeline in Python using pandas libraries.

Given Source Tables below, and a Target Schema provided by users that demonstrates how the desired output table should look like schematically, please write Python pandas code that can transform the Source Tables into an output table, that matches the schema/structure given by the Target Schema.  Please note that the data values in the Target Schema are intended to represent the format and layout of the output table, but may not exactly match the actual data generated from the Source Tables when the python code is run on the Source Tables.

Use operations such as merge, groupby, pivot, apply, or any appropriate python or pandas steps. Your code should save the resulting DataFrame to a CSV file named 'output.csv'. Ensure that the code is executable and can be run directly as is, in a Python environment with pandas installed.

Source Tables:


Table #1
Filename: source_0.csv
Sample Rows in Markdown:
|   condition |   click |
|------------:|--------:|
|           0 |       0 |
|           1 |       1 |
|           1 |       1 |
|           0 |       0 |
|           1 |       0 |
|           1 |       0 |
|           0 |       1 |
|           0 |       0 |
|           1 |       0 |
|           0 |       0 |


Target Schema:
|   condition |   click |
|------------:|--------:|
|           0 |     253 |
|           1 |     246 |

Return only the final code in markdown codeblock format, without any additional text or explanation. 



target: target.csv
train: source_0.csv
test: test_0.csv
Task: Transform-by-output-target-schema (source dataset: github-pipelines)

Your task is to create a data transformation pipeline in Python using pandas libraries.

Given Source Tables below, and a Target Schema provided by users that demonstrates how the desired output table should look like schematically, please write Python pandas code that can transform the Source Tables into an output table, that matches the schema/structure given by the Target Schema.  Please note that the data values in the Target Schema are intended to represent the format and layout of the output table, but may not exactly match the actual data generated from the Source Tables when the python code is run on the Source Tables.

Use operations such as merge, groupby, pivot, apply, or any appropriate python or pandas steps. Your code should save the resulting DataFrame to a CSV file named 'output.csv'. Ensure that the code is executable and can be run directly as is, in a Python environment with pandas installed.

Source Tables:


Table #1
Filename: source_0.csv
Sample Rows in Markdown:
|   total_bill |   tip | sex    | smoker   | day   | time   |   size |   tip_pct |
|-------------:|------:|:-------|:---------|:------|:-------|-------:|----------:|
|        14.26 |  2.5  | Male   | No       | Thur  | Lunch  |      2 | 0.175316  |
|        15.95 |  2    | Male   | No       | Thur  | Lunch  |      2 | 0.125392  |
|        12.48 |  2.52 | Female | No       | Thur  | Lunch  |      2 | 0.201923  |
|        29.8  |  4.2  | Female | No       | Thur  | Lunch  |      6 | 0.14094   |
|         8.52 |  1.48 | Male   | No       | Thur  | Lunch  |      2 | 0.173709  |
|        14.52 |  2    | Female | No       | Thur  | Lunch  |      2 | 0.137741  |
|        11.38 |  2    | Female | No       | Thur  | Lunch  |      2 | 0.175747  |
|        22.82 |  2.18 | Male   | No       | Thur  | Lunch  |      3 | 0.0955302 |
|        19.08 |  1.5  | Male   | No       | Thur  | Lunch  |      2 | 0.0786164 |
|        20.27 |  2.83 | Female | No       | Thur  | Lunch  |      2 | 0.139615  |


Target Schema:
| sex    | smoker   |   tip_pct |
|:-------|:---------|----------:|
| Female | No       |  0.154419 |
| Female | Yes      |  0.198431 |
| Male   | No       |  0.162438 |
| Male   | Yes      |  0.147373 |

Return only the final code in markdown codeblock format, without any additional text or explanation. 



target: target.csv
train: source_0.csv
test: test_0.csv
Task: Transform-by-output-target-schema (source dataset: github-pipelines)

Your task is to create a data transformation pipeline in Python using pandas libraries.

Given Source Tables below, and a Target Schema provided by users that demonstrates how the desired output table should look like schematically, please write Python pandas code that can transform the Source Tables into an output table, that matches the schema/structure given by the Target Schema.  Please note that the data values in the Target Schema are intended to represent the format and layout of the output table, but may not exactly match the actual data generated from the Source Tables when the python code is run on the Source Tables.

Use operations such as merge, groupby, pivot, apply, or any appropriate python or pandas steps. Your code should save the resulting DataFrame to a CSV file named 'output.csv'. Ensure that the code is executable and can be run directly as is, in a Python environment with pandas installed.

Source Tables:


Table #1
Filename: source_0.csv
Sample Rows in Markdown:
|   sepal length (cm) |   sepal width (cm) |   petal length (cm) |   petal width (cm) |   y |
|--------------------:|-------------------:|--------------------:|-------------------:|----:|
|                 6.6 |                3   |                 4.4 |                1.4 |   1 |
|                 6.8 |                2.8 |                 4.8 |                1.4 |   1 |
|                 6.7 |                3   |                 5   |                1.7 |   1 |
|                 6   |                2.9 |                 4.5 |                1.5 |   1 |
|                 5.7 |                2.6 |                 3.5 |                1   |   1 |
|                 5.5 |                2.4 |                 3.8 |                1.1 |   1 |
|                 5.5 |                2.4 |                 3.7 |                1   |   1 |
|                 5.8 |                2.7 |                 3.9 |                1.2 |   1 |
|                 6   |                2.7 |                 5.1 |                1.6 |   1 |
|                 5.4 |                3   |                 4.5 |                1.5 |   1 |


Target Schema:
|   y |   sepal length (cm) |   sepal width (cm) |   petal length (cm) |   petal width (cm) |
|----:|--------------------:|-------------------:|--------------------:|-------------------:|
|   0 |                  50 |                 50 |                  50 |                 50 |
|   1 |                  25 |                 25 |                  25 |                 25 |

Return only the final code in markdown codeblock format, without any additional text or explanation. 



target: target.csv
train: source_0.csv
test: test_0.csv
Task: Transform-by-output-target-schema (source dataset: github-pipelines)

Your task is to create a data transformation pipeline in Python using pandas libraries.

Given Source Tables below, and a Target Schema provided by users that demonstrates how the desired output table should look like schematically, please write Python pandas code that can transform the Source Tables into an output table, that matches the schema/structure given by the Target Schema.  Please note that the data values in the Target Schema are intended to represent the format and layout of the output table, but may not exactly match the actual data generated from the Source Tables when the python code is run on the Source Tables.

Use operations such as merge, groupby, pivot, apply, or any appropriate python or pandas steps. Your code should save the resulting DataFrame to a CSV file named 'output.csv'. Ensure that the code is executable and can be run directly as is, in a Python environment with pandas installed.

Source Tables:


Table #1
Filename: source_0.csv
Sample Rows in Markdown:
|   total_bill |   tip | sex    | smoker   | day   | time   |   size |
|-------------:|------:|:-------|:---------|:------|:-------|-------:|
|        14.26 |  2.5  | Male   | No       | Thur  | Lunch  |      2 |
|        15.95 |  2    | Male   | No       | Thur  | Lunch  |      2 |
|        12.48 |  2.52 | Female | No       | Thur  | Lunch  |      2 |
|        29.8  |  4.2  | Female | No       | Thur  | Lunch  |      6 |
|         8.52 |  1.48 | Male   | No       | Thur  | Lunch  |      2 |
|        14.52 |  2    | Female | No       | Thur  | Lunch  |      2 |
|        11.38 |  2    | Female | No       | Thur  | Lunch  |      2 |
|        22.82 |  2.18 | Male   | No       | Thur  | Lunch  |      3 |
|        19.08 |  1.5  | Male   | No       | Thur  | Lunch  |      2 |
|        20.27 |  2.83 | Female | No       | Thur  | Lunch  |      2 |


Target Schema:
| sex    | smoker   |   total_bill |     tip |    size |
|:-------|:---------|-------------:|--------:|--------:|
| Female | No       |      18.8462 | 2.82793 | 2.51724 |
| Female | Yes      |      18.504  | 2.992   | 2       |
| Male   | No       |      19.6666 | 3.16169 | 2.56923 |
| Male   | Yes      |      21.5683 | 3.06111 | 2.33333 |

Return only the final code in markdown codeblock format, without any additional text or explanation. 



target: target.csv
train: source_0.csv
test: test_0.csv
Task: Transform-by-output-target-schema (source dataset: github-pipelines)

Your task is to create a data transformation pipeline in Python using pandas libraries.

Given Source Tables below, and a Target Schema provided by users that demonstrates how the desired output table should look like schematically, please write Python pandas code that can transform the Source Tables into an output table, that matches the schema/structure given by the Target Schema.  Please note that the data values in the Target Schema are intended to represent the format and layout of the output table, but may not exactly match the actual data generated from the Source Tables when the python code is run on the Source Tables.

Use operations such as merge, groupby, pivot, apply, or any appropriate python or pandas steps. Your code should save the resulting DataFrame to a CSV file named 'output.csv'. Ensure that the code is executable and can be run directly as is, in a Python environment with pandas installed.

Source Tables:


Table #1
Filename: source_0.csv
Sample Rows in Markdown:
|   Source Zipcode | NAICS Code Description                           |   Counts |
|-----------------:|:-------------------------------------------------|---------:|
|            94120 | Financial Services                               |        2 |
|            94120 | Food Services                                    |        1 |
|            94120 | Private Education and Health Services            |        1 |
|            94120 | Professional, Scientific, and Technical Services |        2 |
|            94120 | Real Estate and Rental and Leasing Services      |        1 |
|            94120 | Retail Trade                                     |        4 |
|            94120 | Wholesale Trade                                  |        1 |
|            94121 | Accommodations                                   |      189 |
|            94121 | Administrative and Support Services              |       52 |
|            94121 | Arts, Entertainment, and Recreation              |      205 |


Target Schema:
|   Source Zipcode |   Counts |
|-----------------:|---------:|
|            90230 |        1 |
|            90715 |        1 |
|            91104 |        1 |
|            91112 |        1 |
|            91403 |        1 |
|            91408 |        1 |
|            91458 |        1 |
|            91789 |        1 |
|            92104 |        1 |
|            92117 |        1 |

Return only the final code in markdown codeblock format, without any additional text or explanation. 



target: target.csv
train: source_0.csv
test: test_0.csv
Task: Transform-by-output-target-schema (source dataset: github-pipelines)

Your task is to create a data transformation pipeline in Python using pandas libraries.

Given Source Tables below, and a Target Schema provided by users that demonstrates how the desired output table should look like schematically, please write Python pandas code that can transform the Source Tables into an output table, that matches the schema/structure given by the Target Schema.  Please note that the data values in the Target Schema are intended to represent the format and layout of the output table, but may not exactly match the actual data generated from the Source Tables when the python code is run on the Source Tables.

Use operations such as merge, groupby, pivot, apply, or any appropriate python or pandas steps. Your code should save the resulting DataFrame to a CSV file named 'output.csv'. Ensure that the code is executable and can be run directly as is, in a Python environment with pandas installed.

Source Tables:


Table #1
Filename: source_0.csv
Sample Rows in Markdown:
|   Purchase ID | SN            |   Age | Gender   |   Item ID | Item Name                   |   Price |
|--------------:|:--------------|------:|:---------|----------:|:----------------------------|--------:|
|           390 | Asur53        |    26 | Male     |        75 | Brutality Ivory Warmace     |    2.42 |
|           391 | Alarap40      |    18 | Male     |        20 | Netherbane                  |    3.27 |
|           392 | Sida61        |    20 | Female   |       181 | Reaper's Toll               |    1.66 |
|           393 | Hiarideu73    |    20 | Male     |        54 | Eternal Cleaver             |    2.5  |
|           394 | Lassassasda30 |    12 | Male     |        60 | Wolf                        |    3.54 |
|           395 | Ennoncil86    |    17 | Male     |       152 | Darkheart                   |    1.74 |
|           396 | Siralsudeu54  |    20 | Male     |       131 | Fury                        |    1.44 |
|           397 | Eusri26       |    25 | Male     |       100 | Blindscythe                 |    3.27 |
|           398 | Ardcil81      |    34 | Male     |        96 | Blood-Forged Skeletal Spine |    3.09 |
|           399 | Marilsasya33  |    19 | Male     |       143 | Frenzied Scimitar           |    1.56 |


Target Schema:
| Gender                |   0 |
|:----------------------|----:|
| Female                |  56 |
| Male                  | 325 |
| Other / Non-Disclosed |   9 |

Return only the final code in markdown codeblock format, without any additional text or explanation. 



target: target.csv
train: source_0.csv
test: test_0.csv
Task: Transform-by-output-target-schema (source dataset: github-pipelines)

Your task is to create a data transformation pipeline in Python using pandas libraries.

Given Source Tables below, and a Target Schema provided by users that demonstrates how the desired output table should look like schematically, please write Python pandas code that can transform the Source Tables into an output table, that matches the schema/structure given by the Target Schema.  Please note that the data values in the Target Schema are intended to represent the format and layout of the output table, but may not exactly match the actual data generated from the Source Tables when the python code is run on the Source Tables.

Use operations such as merge, groupby, pivot, apply, or any appropriate python or pandas steps. Your code should save the resulting DataFrame to a CSV file named 'output.csv'. Ensure that the code is executable and can be run directly as is, in a Python environment with pandas installed.

Source Tables:


Table #1
Filename: source_0.csv
Sample Rows in Markdown:
| J_CALL            |
|:------------------|
| IGHJ4*02          |
| IGHJ3*02          |
| IGHJ4*02          |
| IGHJ6*02          |
| IGHJ6*02          |
| IGHJ4*02          |
| IGHJ5*02          |
| IGHJ5*02          |
| IGHJ4*02,IGHJ5*02 |
| IGHJ6*03          |


Target Schema:
| V_GENE   |
|:---------|
| IGHJ5*02 |
| IGHJ4*02 |
| IGHJ4*02 |
| IGHJ6*02 |
| IGHJ6*02 |
| IGHJ3*02 |
| IGHJ4*02 |
| IGHJ4*02 |
| IGHJ6*02 |
| IGHJ5*02 |

Return only the final code in markdown codeblock format, without any additional text or explanation. 



target: target.csv
train: source_0.csv
test: test_0.csv
Task: Transform-by-output-target-schema (source dataset: github-pipelines)

Your task is to create a data transformation pipeline in Python using pandas libraries.

Given Source Tables below, and a Target Schema provided by users that demonstrates how the desired output table should look like schematically, please write Python pandas code that can transform the Source Tables into an output table, that matches the schema/structure given by the Target Schema.  Please note that the data values in the Target Schema are intended to represent the format and layout of the output table, but may not exactly match the actual data generated from the Source Tables when the python code is run on the Source Tables.

Use operations such as merge, groupby, pivot, apply, or any appropriate python or pandas steps. Your code should save the resulting DataFrame to a CSV file named 'output.csv'. Ensure that the code is executable and can be run directly as is, in a Python environment with pandas installed.

Source Tables:


Table #1
Filename: source_0.csv
Sample Rows in Markdown:
|   condition |   click |
|------------:|--------:|
|           0 |       0 |
|           1 |       1 |
|           1 |       1 |
|           0 |       0 |
|           1 |       0 |
|           1 |       0 |
|           0 |       1 |
|           0 |       0 |
|           1 |       0 |
|           0 |       0 |


Target Schema:
|   condition |   0 |
|------------:|----:|
|           0 | 253 |
|           1 | 246 |

Return only the final code in markdown codeblock format, without any additional text or explanation. 



target: target.csv
train: source_0.csv
test: test_0.csv
Task: Transform-by-output-target-schema (source dataset: github-pipelines)

Your task is to create a data transformation pipeline in Python using pandas libraries.

Given Source Tables below, and a Target Schema provided by users that demonstrates how the desired output table should look like schematically, please write Python pandas code that can transform the Source Tables into an output table, that matches the schema/structure given by the Target Schema.  Please note that the data values in the Target Schema are intended to represent the format and layout of the output table, but may not exactly match the actual data generated from the Source Tables when the python code is run on the Source Tables.

Use operations such as merge, groupby, pivot, apply, or any appropriate python or pandas steps. Your code should save the resulting DataFrame to a CSV file named 'output.csv'. Ensure that the code is executable and can be run directly as is, in a Python environment with pandas installed.

Source Tables:


Table #1
Filename: source_0.csv
Sample Rows in Markdown:
| J_CALL            |
|:------------------|
| IGHJ4*02          |
| IGHJ3*02          |
| IGHJ4*02          |
| IGHJ6*02          |
| IGHJ6*02          |
| IGHJ4*02          |
| IGHJ5*02          |
| IGHJ5*02          |
| IGHJ4*02,IGHJ5*02 |
| IGHJ6*03          |


Target Schema:
| V_GENE   |
|:---------|
| IGHJ5    |
| IGHJ4    |
| IGHJ4    |
| IGHJ6    |
| IGHJ6    |
| IGHJ3    |
| IGHJ4    |
| IGHJ4    |
| IGHJ6    |
| IGHJ5    |

Return only the final code in markdown codeblock format, without any additional text or explanation. 



target: target.csv
train: source_0.csv
test: test_0.csv
Task: Transform-by-output-target-schema (source dataset: github-pipelines)

Your task is to create a data transformation pipeline in Python using pandas libraries.

Given Source Tables below, and a Target Schema provided by users that demonstrates how the desired output table should look like schematically, please write Python pandas code that can transform the Source Tables into an output table, that matches the schema/structure given by the Target Schema.  Please note that the data values in the Target Schema are intended to represent the format and layout of the output table, but may not exactly match the actual data generated from the Source Tables when the python code is run on the Source Tables.

Use operations such as merge, groupby, pivot, apply, or any appropriate python or pandas steps. Your code should save the resulting DataFrame to a CSV file named 'output.csv'. Ensure that the code is executable and can be run directly as is, in a Python environment with pandas installed.

Source Tables:


Table #1
Filename: source_0.csv
Sample Rows in Markdown:
|   customer_id |   amount | date       |
|--------------:|---------:|:-----------|
|        215710 |     1000 | 2014-01-30 |
|         64310 |       20 | 2007-02-07 |
|         94430 |      100 | 2008-10-16 |
|         71060 |       25 | 2009-04-17 |
|        121530 |       35 | 2012-10-11 |
|        153310 |       50 | 2015-07-22 |
|         75450 |       20 | 2010-11-19 |
|         74490 |       10 | 2007-05-31 |
|         71340 |       30 | 2012-03-17 |
|         12480 |      100 | 2006-11-14 |


Target Schema:
|   customer_id |   amount |
|--------------:|---------:|
|            80 |  75      |
|            90 | 121.333  |
|           130 |  60      |
|           190 |  65      |
|           220 |  30      |
|           240 |  10      |
|           290 |  58.3333 |
|           320 |  15      |
|           330 |  36.6667 |
|           400 |  25      |

Return only the final code in markdown codeblock format, without any additional text or explanation. 



target: target.csv
train: source_0.csv
test: test_0.csv
Task: Transform-by-output-target-schema (source dataset: github-pipelines)

Your task is to create a data transformation pipeline in Python using pandas libraries.

Given Source Tables below, and a Target Schema provided by users that demonstrates how the desired output table should look like schematically, please write Python pandas code that can transform the Source Tables into an output table, that matches the schema/structure given by the Target Schema.  Please note that the data values in the Target Schema are intended to represent the format and layout of the output table, but may not exactly match the actual data generated from the Source Tables when the python code is run on the Source Tables.

Use operations such as merge, groupby, pivot, apply, or any appropriate python or pandas steps. Your code should save the resulting DataFrame to a CSV file named 'output.csv'. Ensure that the code is executable and can be run directly as is, in a Python environment with pandas installed.

Source Tables:


Table #1
Filename: source_0.csv
Sample Rows in Markdown:
| city               |   driver_count | type     |
|:-------------------|---------------:|:---------|
| New Paulville      |             44 | Urban    |
| Amandaburgh        |             12 | Urban    |
| Williamsview       |             46 | Urban    |
| New Jacobville     |             50 | Urban    |
| Port Samanthamouth |             57 | Urban    |
| Roberthaven        |             47 | Urban    |
| Port Shane         |              7 | Suburban |
| Lake Ann           |              3 | Suburban |
| Lake Scott         |             23 | Suburban |
| Colemanland        |             23 | Suburban |


Target Schema:
| type   |   driver_count |
|:-------|---------------:|
| Urban  |           2149 |

Return only the final code in markdown codeblock format, without any additional text or explanation. 



target: target.csv
train: source_0.csv
test: test_0.csv
Task: Transform-by-output-target-schema (source dataset: github-pipelines)

Your task is to create a data transformation pipeline in Python using pandas libraries.

Given Source Tables below, and a Target Schema provided by users that demonstrates how the desired output table should look like schematically, please write Python pandas code that can transform the Source Tables into an output table, that matches the schema/structure given by the Target Schema.  Please note that the data values in the Target Schema are intended to represent the format and layout of the output table, but may not exactly match the actual data generated from the Source Tables when the python code is run on the Source Tables.

Use operations such as merge, groupby, pivot, apply, or any appropriate python or pandas steps. Your code should save the resulting DataFrame to a CSV file named 'output.csv'. Ensure that the code is executable and can be run directly as is, in a Python environment with pandas installed.

Source Tables:


Table #1
Filename: source_0.csv
Sample Rows in Markdown:
| Country / territory of asylum/residence   | Origin                 |   Year | Month     | Value   |
|:------------------------------------------|:-----------------------|-------:|:----------|:--------|
| Germany                                   | Benin                  |   2012 | June      | 11      |
| USA (EOIR)                                | Ecuador                |   2006 | December  | 5       |
| Austria                                   | Gabon                  |   2009 | May       | 1       |
| Germany                                   | Rwanda                 |   2000 | March     | 8       |
| Italy                                     | Honduras               |   2016 | March     | 3       |
| Cyprus                                    | Iraq                   |   2003 | September | 4       |
| The former Yugoslav Rep. of Macedonia     | Ethiopia               |   2013 | March     | 2       |
| Cyprus                                    | Iran (Islamic Rep. of) |   2008 | February  | 21      |
| Finland                                   | Burkina Faso           |   2017 | December  | *       |
| Australia                                 | Russian Federation     |   2007 | June      | 3       |


Target Schema:
| Country / territory of asylum/residence   |     Year |
|:------------------------------------------|---------:|
| Albania                                   |   211552 |
| Australia                                 |  6563431 |
| Austria                                   |  6958781 |
| Belgium                                   |  9633047 |
| Bosnia and Herzegovina                    |   273945 |
| Bulgaria                                  |  1884007 |
| Canada                                    | 15292622 |
| Croatia                                   |   951946 |
| Cyprus                                    |  2736854 |
| Czech Rep.                                |  3530311 |

Return only the final code in markdown codeblock format, without any additional text or explanation. 



target: target.csv
train: source_0.csv
test: test_0.csv
Task: Transform-by-output-target-schema (source dataset: github-pipelines)

Your task is to create a data transformation pipeline in Python using pandas libraries.

Given Source Tables below, and a Target Schema provided by users that demonstrates how the desired output table should look like schematically, please write Python pandas code that can transform the Source Tables into an output table, that matches the schema/structure given by the Target Schema.  Please note that the data values in the Target Schema are intended to represent the format and layout of the output table, but may not exactly match the actual data generated from the Source Tables when the python code is run on the Source Tables.

Use operations such as merge, groupby, pivot, apply, or any appropriate python or pandas steps. Your code should save the resulting DataFrame to a CSV file named 'output.csv'. Ensure that the code is executable and can be run directly as is, in a Python environment with pandas installed.

Source Tables:


Table #1
Filename: source_0.csv
Sample Rows in Markdown:
| dt         | AverageTemperature   | AverageTemperatureUncertainty   | State        | Country       |
|:-----------|:---------------------|:--------------------------------|:-------------|:--------------|
| 1863-10-01 | -5.742000000000001   | 2.536                           | Irkutsk      | Russia        |
| 1855-01-01 | -24.669              | 3.639                           | Yamal Nenets | Russia        |
| 1971-05-01 | 14.481               | 0.24600000000000002             | Kursk        | Russia        |
| 1850-10-01 |                      |                                 | Bahia        | Brazil        |
| 1832-06-01 | 21.88                | 2.406                           | Beijing      | China         |
| 1985-11-01 | -6.598               | 0.381                           | Wyoming      | United States |
| 1801-04-01 | 11.875               | 3.199                           | Missouri     | United States |
| 1788-03-01 | -5.85                | 2.668                           | Novgorod     | Russia        |
| 2003-04-01 | 27.064               | 0.601                           | Sergipe      | Brazil        |
| 1869-05-01 | 32.787               | 1.6640000000000001              | Chhattisgarh | India         |


Target Schema:
| State      |   AverageTemperature |
|:-----------|---------------------:|
| Acre       |            25.7696   |
| Adygey     |            10.2038   |
| Aga Buryat |            -3.9833   |
| Alabama    |            17.3317   |
| Alagoas    |            24.7154   |
| Alaska     |            -5.971    |
| Alberta    |            -0.922997 |
| Altay      |             0.337356 |
| Amazonas   |            26.0877   |
| Amur       |            -5.0169   |

Return only the final code in markdown codeblock format, without any additional text or explanation. 



target: target.csv
train: source_0.csv
test: test_0.csv
Task: Transform-by-output-target-schema (source dataset: github-pipelines)

Your task is to create a data transformation pipeline in Python using pandas libraries.

Given Source Tables below, and a Target Schema provided by users that demonstrates how the desired output table should look like schematically, please write Python pandas code that can transform the Source Tables into an output table, that matches the schema/structure given by the Target Schema.  Please note that the data values in the Target Schema are intended to represent the format and layout of the output table, but may not exactly match the actual data generated from the Source Tables when the python code is run on the Source Tables.

Use operations such as merge, groupby, pivot, apply, or any appropriate python or pandas steps. Your code should save the resulting DataFrame to a CSV file named 'output.csv'. Ensure that the code is executable and can be run directly as is, in a Python environment with pandas installed.

Source Tables:


Table #1
Filename: source_0.csv
Sample Rows in Markdown:
| V_CALL        |
|:--------------|
| IGHV3-30*18   |
| IGHV3-15*01   |
| IGHV4-30-2*01 |
| IGHV3-21*01   |
| IGHV1-8*01    |
| IGHV3-15*01   |
| IGHV4-39*01   |
| IGHV2-5*01    |
| IGHV1-69*09   |
| IGHV3-15*01   |


Target Schema:
| V_GENE   |
|:---------|
| IGHV1    |
| IGHV3    |
| IGHV3    |
| IGHV3    |
| IGHV4    |
| IGHV3    |
| IGHV1    |
| IGHV4    |
| IGHV1    |
| IGHV1    |

Return only the final code in markdown codeblock format, without any additional text or explanation. 



target: target.csv
train: source_0.csv
test: test_0.csv
Task: Transform-by-output-target-schema (source dataset: github-pipelines)

Your task is to create a data transformation pipeline in Python using pandas libraries.

Given Source Tables below, and a Target Schema provided by users that demonstrates how the desired output table should look like schematically, please write Python pandas code that can transform the Source Tables into an output table, that matches the schema/structure given by the Target Schema.  Please note that the data values in the Target Schema are intended to represent the format and layout of the output table, but may not exactly match the actual data generated from the Source Tables when the python code is run on the Source Tables.

Use operations such as merge, groupby, pivot, apply, or any appropriate python or pandas steps. Your code should save the resulting DataFrame to a CSV file named 'output.csv'. Ensure that the code is executable and can be run directly as is, in a Python environment with pandas installed.

Source Tables:


Table #1
Filename: source_0.csv
Sample Rows in Markdown:
|   userId |   movieId |   rating |   timestamp |
|---------:|----------:|---------:|------------:|
|      580 |      2662 |      4   | 1.16529e+09 |
|      427 |      2396 |      5   | 9.39334e+08 |
|      509 |        69 |      3.5 | 1.0933e+09  |
|      545 |      2348 |      4   | 9.38566e+08 |
|      436 |      2871 |      4   | 9.41456e+08 |
|      384 |      4901 |      2.5 | 1.15374e+09 |
|      426 |      1090 |      2.5 | 1.31038e+09 |
|      617 |       593 |      5   | 9.44893e+08 |
|      547 |     32022 |      3   | 1.13246e+09 |
|      627 |       110 |      4   | 1.20138e+09 |


Target Schema:
|   movieId |   rating |
|----------:|---------:|
|         1 |  3.81923 |
|         2 |  3.41129 |
|         3 |  3.46154 |
|         4 |  3       |
|         5 |  3.32857 |
|         6 |  3.88596 |
|         7 |  3.12903 |
|         8 |  4.5     |
|         9 |  3.30769 |
|        10 |  3.50725 |

Return only the final code in markdown codeblock format, without any additional text or explanation. 



target: target.csv
train: source_0.csv
test: test_0.csv
Task: Transform-by-output-target-schema (source dataset: github-pipelines)

Your task is to create a data transformation pipeline in Python using pandas libraries.

Given Source Tables below, and a Target Schema provided by users that demonstrates how the desired output table should look like schematically, please write Python pandas code that can transform the Source Tables into an output table, that matches the schema/structure given by the Target Schema.  Please note that the data values in the Target Schema are intended to represent the format and layout of the output table, but may not exactly match the actual data generated from the Source Tables when the python code is run on the Source Tables.

Use operations such as merge, groupby, pivot, apply, or any appropriate python or pandas steps. Your code should save the resulting DataFrame to a CSV file named 'output.csv'. Ensure that the code is executable and can be run directly as is, in a Python environment with pandas installed.

Source Tables:


Table #1
Filename: source_0.csv
Sample Rows in Markdown:
| category          | scientific_name                         | common_names           | conservation_status   |
|:------------------|:----------------------------------------|:-----------------------|:----------------------|
| Nonvascular Plant | Thuidium allenii                        | Allen's Thuidium Moss  |                       |
| Nonvascular Plant | Thuidium delicatulum                    | Delicate Thuidium Moss |                       |
| Nonvascular Plant | Thuidium recognitum                     | Thuidium Moss          |                       |
| Nonvascular Plant | Acrobolbus ciliatus                     | Acrobolbus             |                       |
| Nonvascular Plant | Calypogeja muelleriana                  | Mªller's Calypogeja    |                       |
| Nonvascular Plant | Calypogeja muelleriana ssp. blomquistii | Blomquist's Calypogeja |                       |
| Nonvascular Plant | Calypogeja neesiana                     | Nees' Calypogeja       |                       |
| Nonvascular Plant | Calypogeja peruviana                    | Peruvian Calypogeja    |                       |
| Nonvascular Plant | Calypogeja sphagnicola                  | Sphagnum Calypogeja    |                       |
| Nonvascular Plant | Calypogeja sullivantii                  | Sullivant's Calypogeja |                       |


Target Schema:
| conservation_status   |   scientific_name |
|:----------------------|------------------:|
| Endangered            |                11 |
| In Recovery           |                 1 |
| Species of Concern    |                84 |
| Threatened            |                 5 |

Return only the final code in markdown codeblock format, without any additional text or explanation. 



target: target.csv
train: source_0.csv
test: test_0.csv