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:
| Age   | College   |   G |   MP |   FG |   FGA |   3P |   3PA |   FT |   FTA | ORB   |   TRB |   AST |   STL |   BLK | TOV   | PF    |   PTS |   FG% |   3P% |   FT% |   MP.1 |   PTS.1 |   TRB.1 |   AST.1 | Season   | Name        |
|:------|:----------|----:|-----:|-----:|------:|-----:|------:|-----:|------:|:------|------:|------:|------:|------:|:------|:------|------:|------:|------:|------:|-------:|--------:|--------:|--------:|:---------|:------------|
|       |           |  87 | 2429 |  456 |   832 |    8 |    26 |  361 |   481 |       |   683 |   173 |    47 |   149 |       |       |  1281 | 0.548 | 0.308 | 0.751 |   27.9 |    14.7 |     7.9 |     2   | Career   | s/smithja02 |
| 18.0  | MARQUETTE |  37 |  703 |   69 |   175 |    4 |    25 |   45 |    74 | 31.0  |   104 |    59 |    33 |     8 | 51.0  | 66.0  |   187 | 0.394 | 0.16  | 0.608 |   19   |     5.1 |     2.8 |     1.6 | 2010-11  | b/blueva01  |
| 19.0  | MARQUETTE |  35 |  901 |  100 |   242 |    8 |    31 |   85 |   120 | 58.0  |   157 |    91 |    40 |     7 | 78.0  | 58.0  |   293 | 0.413 | 0.258 | 0.708 |   25.7 |     8.4 |     4.5 |     2.6 | 2011-12  | b/blueva01  |
| 20.0  | MARQUETTE |  34 | 1123 |  183 |   403 |   40 |   132 |   96 |   127 | 20.0  |   110 |    62 |    36 |     0 | 79.0  | 60.0  |   502 | 0.454 | 0.303 | 0.756 |   33   |    14.8 |     3.2 |     1.8 | 2012-13  | b/blueva01  |
|       |           | 106 | 2727 |  352 |   820 |   52 |   188 |  226 |   321 | 109.0 |   371 |   212 |   109 |    15 | 208.0 | 184.0 |   982 | 0.429 | 0.277 | 0.704 |   25.7 |     9.3 |     3.5 |     2   | Career   | b/blueva01  |
| 18.0  | TEMPLE    |  34 | 1205 |  153 |   414 |   45 |   151 |   56 |    83 |       |    99 |    87 |    65 |     8 |       |       |   407 | 0.37  | 0.298 | 0.675 |   35.4 |    12   |     2.9 |     2.6 | 2002-03  | c/collima01 |
| 19.0  | TEMPLE    |  29 | 1137 |  171 |   454 |   47 |   162 |   61 |   102 |       |   143 |    75 |    51 |     4 |       |       |   450 | 0.377 | 0.29  | 0.598 |   39.2 |    15.5 |     4.9 |     2.6 | 2003-04  | c/collima01 |
| 20.0  | TEMPLE    |  30 | 1129 |  192 |   462 |   48 |   174 |   94 |   146 |       |   177 |   109 |    85 |    11 |       |       |   526 | 0.416 | 0.276 | 0.644 |   37.6 |    17.5 |     5.9 |     3.6 | 2004-05  | c/collima01 |
| 21.0  | TEMPLE    |  32 | 1212 |  202 |   468 |   42 |   137 |   90 |   151 |       |   150 |   127 |    89 |     6 |       |       |   536 | 0.432 | 0.307 | 0.596 |   37.9 |    16.8 |     4.7 |     4   | 2005-06  | c/collima01 |
|       |           | 125 | 4683 |  718 |  1798 |  182 |   624 |  301 |   482 |       |   569 |   398 |   290 |    29 |       |       |  1919 | 0.399 | 0.292 | 0.624 |   37.5 |    15.4 |     4.6 |     3.2 | Career   | c/collima01 |


Target Schema:
| Name        |   Age |    G | MP                 |      FG |   FGA | 3P                | 3PA                |      FT |   FTA | ORB                |     TRB |      AST | STL   | BLK                | TOV                | PF   |   PTS |      FG% | 3P%                 |      FT% | MP.1               |   PTS.1 |   TRB.1 |   AST.1 |
|:------------|------:|-----:|:-------------------|--------:|------:|:------------------|:-------------------|--------:|------:|:-------------------|--------:|---------:|:------|:-------------------|:-------------------|:-----|------:|---------:|:--------------------|---------:|:-------------------|--------:|--------:|--------:|
| a/abdulta01 |  20.5 | 34.8 | 814.8              | 172     | 360.4 | 19.6              | 60.8               | 110     | 151.6 |                    | 188.4   |  43.6    | 33.2  | 19.2               | 76.4               | 92.4 | 473.6 | 0.485    | 0.35019999999999996 | 0.7524   | 22.22              | 12.6    | 5.22    | 1.1     |
| a/abdursh01 |  19   | 28   | 972.0              | 206     | 398   | 8.0               | 21.0               | 170     | 249   |                    | 236     |  29      | 52.0  | 35.0               | 87.0               | 58.0 | 590   | 0.518    | 0.381               | 0.683    | 34.7               | 21.1    | 8.4     | 1       |
| a/ackeral01 |  21   | 44   | 1511.5             | 224.5   | 491.5 | 60.0              | 146.0              | 127.5   | 155   |                    | 247.5   | 124.5    | 66.5  | 19.0               |                    |      | 636.5 | 0.45825  | 0.40900000000000003 | 0.82225  | 34.324999999999996 | 14.425  | 5.6     | 2.8     |
| a/adamsha01 |  19.5 | 52   | 1443.6             | 300     | 601.2 | 30.0              | 96.4               |  97.2   | 138   |                    | 282.4   | 103.6    | 95.2  | 34.0               |                    |      | 727.2 | 0.5      | 0.29300000000000004 | 0.7098   | 27.8               | 14.1    | 5.42    | 1.98    |
| a/adamsjo01 |  18.5 | 46   | 1387.3333333333333 | 248.667 | 532   | 65.33333333333333 | 197.33333333333334 | 191.333 | 228   | 58.666666666666664 | 212.667 |  94.6667 | 112.0 | 11.333333333333334 | 62.666666666666664 | 98.0 | 754   | 0.466333 | 0.3313333333333333  | 0.839333 | 30.200000000000003 | 16.3667 | 4.56667 | 2.06667 |
| a/adamsmi01 |  20.5 | 47.6 | 1409.6             | 253.6   | 540   |                   |                    | 152.8   | 203.6 |                    | 128     | 190      | 110.0 | 4.8                | 134.0              | 96.4 | 660   | 0.4736   |                     | 0.7306   | 29.140000000000004 | 13.6    | 2.66    | 3.9     |
| a/afflaar01 |  20   | 52   | 1698.0             | 259.5   | 567.5 | 104.5             | 280.0              | 146.5   | 187.5 |                    | 180     | 101      | 32.0  | 10.0               |                    |      | 770   | 0.4555   | 0.375               | 0.77425  | 32.575             | 14.575  | 3.45    | 1.95    |
| a/aingeda01 |  19.5 | 47.2 | 1559.0             | 394.8   | 750   |                   |                    | 197.2   | 241.6 |                    | 216.4   | 215.6    |       |                    |                    |      | 986.8 | 0.5278   |                     | 0.8108   | 35.325             | 20.78   | 4.58    | 4.6     |
| a/akognjo01 |  20   | 47.6 |                    | 238.8   | 584.8 | 134.0             | 360.0              | 110.4   | 126.8 |                    | 125.6   |  62.4    | 41.6  | 5.2                | 92.66666666666667  |      | 722   | 0.3918   | 0.36340000000000006 | 0.758    |                    | 14.7    | 2.6     | 1.28    |
| a/aldrico01 |  20   | 55.5 | 963.0              | 195.5   | 340.5 | 0.0               | 0.0                | 128     | 175.5 | 110.0              | 430     |  36      | 29.5  | 126.5              | 66.5               | 92.0 | 519   | 0.563    |                     | 0.721    | 26.8               |  9.6    | 7.9     | 0.65    |

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