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:
|   overs | Batting Team     | Batsman on strike   | batsman on non-strike   | bowler     |   runs scored |   extras | out type   | player dismissed   | wides   |
|--------:|:-----------------|:--------------------|:------------------------|:-----------|--------------:|---------:|:-----------|:-------------------|:--------|
|    10.1 | Rajasthan Royals | M Kaif              | RA Jadeja               | R Bhatia   |             0 |        0 |            |                    |         |
|    10.2 | Rajasthan Royals | M Kaif              | RA Jadeja               | R Bhatia   |             0 |        0 |            |                    |         |
|    10.3 | Rajasthan Royals | M Kaif              | RA Jadeja               | R Bhatia   |             0 |        0 | caught     | M Kaif             |         |
|    10.4 | Rajasthan Royals | M Rawat             | RA Jadeja               | R Bhatia   |             1 |        0 |            |                    |         |
|    10.5 | Rajasthan Royals | RA Jadeja           | M Rawat                 | R Bhatia   |             0 |        0 |            |                    |         |
|    10.6 | Rajasthan Royals | RA Jadeja           | M Rawat                 | R Bhatia   |             1 |        0 |            |                    |         |
|    11.1 | Rajasthan Royals | RA Jadeja           | M Rawat                 | DL Vettori |             6 |        0 |            |                    |         |
|    11.2 | Rajasthan Royals | RA Jadeja           | M Rawat                 | DL Vettori |             4 |        0 |            |                    |         |
|    11.3 | Rajasthan Royals | RA Jadeja           | M Rawat                 | DL Vettori |             1 |        0 |            |                    |         |
|    11.4 | Rajasthan Royals | M Rawat             | RA Jadeja               | DL Vettori |             0 |        0 |            |                    |         |


Target Schema:
| Batsman on strike   |   overs |   runs scored |   extras |
|:--------------------|--------:|--------------:|---------:|
| DS Lehmann          |    14.6 |             1 |        0 |
| M Kaif              |   105.7 |             9 |        2 |
| RA Jadeja           |    84.7 |             4 |        2 |
| SR Watson           |    62.6 |            21 |        0 |
| T Kohli             |    13.3 |             7 |        1 |
| YK Pathan           |    10.8 |            10 |        0 |

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