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:
| 2012-12-05   |   301.0 |
|:-------------|--------:|
| 2018-12-19   |      41 |
| 2015-09-13   |    5475 |
| 2015-03-21   |     459 |
| 2013-09-17   |   12997 |
| 2013-01-08   |     473 |
| 2013-03-15   |      30 |
| 2017-05-26   |   15531 |
| 2018-02-11   |      74 |
| 2018-03-15   |      85 |
| 2016-07-24   |   36540 |


Table #2
Filename: source_1.csv
Sample Rows in Markdown:
| 2012-12-05   |   0.016157143 |
|:-------------|--------------:|
| 2013-01-08   |    0.0129714  |
| 2014-08-12   |    0.0044     |
| 2016-06-04   |    0.0689333  |
| 2017-07-03   |    0.01405    |
| 2015-03-21   |    0.0046     |
| 2018-12-19   |    0.0034     |
| 2017-10-09   |    0.0099     |
| 2015-09-13   |    0.0347     |
| 2018-06-07   |    0.00436667 |
| 2018-02-11   |    0.0083     |


Table #3
Filename: source_10.csv
Sample Rows in Markdown:
| 2012-12-05   |   0.7268 |
|:-------------|---------:|
| 2014-05-13   | 0.8      |
| 2016-04-28   | 1.30181  |
| 2013-06-28   | 0.8621   |
| 2015-10-29   | 1.98369  |
| 2017-04-23   | 0.753732 |
| 2018-12-19   | 0.93426  |
| 2015-06-16   | 0.618837 |
| 2015-09-13   | 1.85376  |
| 2015-03-21   | 0.950613 |
| 2013-08-23   | 0.7445   |


Table #4
Filename: source_2.csv
Sample Rows in Markdown:
| 2012-12-05   |   242.364 |
|:-------------|----------:|
| 2017-10-09   |   122.94  |
| 2018-10-25   |   125.879 |
| 2015-06-16   |   244.19  |
| 2013-10-26   |   163.956 |
| 2017-05-26   |   326.98  |
| 2013-09-17   |   175.829 |
| 2013-06-28   |   180.306 |
| 2013-01-08   |   235.524 |
| 2018-02-11   |   220.655 |
| 2016-03-05   |   276.58  |


Table #5
Filename: source_3.csv
Sample Rows in Markdown:
| 2012-12-05   |   0.1646 |
|:-------------|---------:|
| 2014-02-26   | 0.279    |
| 2013-03-15   | 0.5126   |
| 2018-04-24   | 0.040874 |
| 2018-06-07   | 0.101231 |
| 2014-08-12   | 0.097    |
| 2014-05-13   | 0.111    |
| 2016-07-24   | 0.205571 |
| 2015-07-27   | 0.139792 |
| 2015-05-15   | 0.31901  |
| 2015-09-13   | 0.096771 |


Table #6
Filename: source_4.csv
Sample Rows in Markdown:
| 2012-12-05   |   0.4332 |
|:-------------|---------:|
| 2016-07-24   | 0.817734 |
| 2013-01-08   | 0.3545   |
| 2015-06-16   | 0.037583 |
| 2016-03-05   | 0.049949 |
| 2014-03-25   | 0.08     |
| 2013-09-17   | 0.7085   |
| 2016-09-18   | 0.824911 |
| 2018-10-25   | 0.975699 |
| 2014-09-28   | 0.758    |
| 2017-05-26   | 0.05598  |


Table #7
Filename: source_5.csv
Sample Rows in Markdown:
| 2012-12-05   |   20.3333 |
|:-------------|----------:|
| 2013-03-15   |      19.5 |
| 2018-10-25   |      22   |
| 2017-04-23   |      30.1 |
| 2014-05-13   |      26   |
| 2013-10-26   |      18.1 |
| 2018-12-19   |      18.6 |
| 2018-03-15   |      21.6 |
| 2013-01-08   |      20.5 |
| 2014-02-26   |      21.2 |
| 2017-10-09   |      21.7 |


Table #8
Filename: source_6.csv
Sample Rows in Markdown:
| 2012-12-05   |   0.0075805085 |
|:-------------|---------------:|
| 2013-06-28   |     0.0077     |
| 2017-10-09   |     0.0069     |
| 2016-09-18   |     0.0614617  |
| 2019-02-15   |     0.03217    |
| 2014-02-26   |     0.00696667 |
| 2017-07-03   |     0.01177    |
| 2013-01-08   |     0.00762034 |
| 2015-10-29   |     0.03004    |
| 2015-03-21   |     0.0082     |
| 2017-04-23   |     0.0316467  |


Table #9
Filename: source_7.csv
Sample Rows in Markdown:
| 2012-12-05   |   6.9 |
|:-------------|------:|
| 2016-03-05   |   7.3 |
| 2013-03-15   |   5.5 |
| 2014-06-25   |   2.5 |
| 2018-12-19   |   4.8 |
| 2015-10-29   |  48   |
| 2015-03-21   |  10.6 |
| 2018-10-25   |  20   |
| 2016-07-24   |  10.7 |
| 2017-04-23   |   7   |
| 2014-09-28   |  36   |


Table #10
Filename: source_8.csv
Sample Rows in Markdown:
| 2012-12-05   |   0.0179 |
|:-------------|---------:|
| 2017-05-26   | 0.00866  |
| 2016-07-24   | 0.020928 |
| 2016-06-04   | 0.001835 |
| 2016-09-18   | 0.04548  |
| 2018-06-07   | 0.002905 |
| 2017-08-15   | 0.055305 |
| 2017-03-14   | 0.02533  |
| 2015-07-27   | 0.03748  |
| 2013-09-17   | 0.0373   |
| 2016-04-28   | 0.058535 |


Table #11
Filename: source_9.csv
Sample Rows in Markdown:
| 2012-12-05   |   0.17657143 |
|:-------------|-------------:|
| 2018-10-25   |    0.12      |
| 2016-07-24   |    0.026     |
| 2015-07-27   |    0.0203333 |
| 2017-08-15   |    0.057     |
| 2016-09-18   |    0.063     |
| 2017-07-03   |    0.058     |
| 2014-09-28   |    0.051     |
| 2017-05-26   |    0.015     |
| 2015-06-16   |    0.0186667 |
| 2018-03-15   |    0.01      |


Target Schema:
| 2012-12-05   |   301.0 |   0.0075805085 |   0.0179 |   6.9 |   0.17657143 |   20.3333 |   0.016157143 |   242.364 |   0.1646 |   0.7268 |   0.4332 |
|:-------------|--------:|---------------:|---------:|------:|-------------:|----------:|--------------:|----------:|---------:|---------:|---------:|
| 2016-11-07   |   11199 |     0.0515233  | 0.015819 |  18   |    0.0655    |      21.6 |    0.0716833  |   130.37  | 0.060794 | 0.959882 | 0.487273 |
| 2014-09-28   |    4611 |     0.00575    | 0.03     |  36   |    0.051     |      23.1 |    0.0045     |   128.3   | 0.178    | 1.258    | 0.758    |
| 2015-06-16   |      10 |     0.0078     | 0.002875 |   5.1 |    0.0186667 |      25.8 |    0.0049     |   244.19  | 0.097999 | 0.618837 | 0.037583 |
| 2018-04-24   |      96 |     0.0058     | 0.004143 |   5.9 |    0.029     |      25.8 |    0.00553333 |   283.272 | 0.040874 | 0.72289  | 0.008323 |
| 2015-05-15   |      20 |     0.008      | 0.023611 |   8.2 |    0.017     |      25.3 |    0.00475    |   232.18  | 0.31901  | 1.13956  | 0.070415 |
| 2017-04-23   |      20 |     0.0316467  | 0.00295  |   7   |    0.01      |      30.1 |    0.0428667  |   325.71  | 0.13456  | 0.753732 | 0.02402  |
| 2017-08-15   |    4884 |     0.009335   | 0.055305 |  34   |    0.057     |      25.9 |    0.0034     |   175.75  | 0.151516 | 2.15243  | 0.946546 |
| 2014-03-25   |     171 |     0.00605    | 0.004    |   2.8 |    0.028     |      23.5 |    0.0078     |   198     | 0.098    | 0.521    | 0.08     |
| 2014-05-13   |    1039 |     0.00513333 | 0.005    |   6.5 |    0.011     |      26   |    0.00666667 |   243.6   | 0.111    | 0.8      | 0.188    |
| 2017-03-14   |    5609 |     0.041585   | 0.02533  |   5.7 |    0.068     |      19.9 |    0.057275   |   282.91  | 0.31818  | 0.950412 | 0.30098  |

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



target: target.csv
train: source_0.csv
source_1.csv
source_10.csv
source_2.csv
source_3.csv
source_4.csv
source_5.csv
source_6.csv
source_7.csv
source_8.csv
source_9.csv
test: test_0.csv
test_1.csv
test_10.csv
test_2.csv
test_3.csv
test_4.csv
test_5.csv
test_6.csv
test_7.csv
test_8.csv
test_9.csv