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   |
|:------------------|---------------:|:-------|
| Kelseyland        |             63 | Urban  |
| Nguyenbury        |              8 | Urban  |
| East Douglas      |             12 | Urban  |
| West Dawnfurt     |             34 | Urban  |
| Rodriguezburgh    |             52 | Urban  |
| South Josephville |              4 | Urban  |
| West Sydneyhaven  |             70 | Urban  |
| Travisville       |             37 | Urban  |
| Torresshire       |             70 | Urban  |
| Lisaville         |             66 | Urban  |


Table #2
Filename: source_1.csv
Sample Rows in Markdown:
| city            | date                |   fare |       ride_id |
|:----------------|:--------------------|-------:|--------------:|
| New Aaron       | 2016-06-04 02:23:05 |  20.53 | 2321624903569 |
| New David       | 2016-05-03 16:38:23 |  32.12 |  141206269867 |
| Aprilchester    | 2016-10-14 13:03:43 |  17.94 | 6499432941564 |
| Port Josephfurt | 2016-10-31 04:48:36 |  41.94 | 3151468117803 |
| Nguyenbury      | 2016-09-29 23:40:50 |  35.73 | 1542525861890 |
| Arnoldview      | 2016-08-04 11:44:19 |  29.49 | 9822259629136 |
| Pearsonberg     | 2016-03-29 12:59:03 |  36.4  | 9393126938175 |
| New Maryport    | 2016-07-13 10:19:13 |  11.96 | 5603767195344 |
| New Maryport    | 2016-08-27 12:46:27 |  32.67 |  836543255832 |
| Stewartview     | 2016-06-10 14:50:02 |  31.47 | 5397544665778 |


Target Schema:
| city       |   driver_count | type   | date                |   fare |       ride_id |
|:-----------|---------------:|:-------|:--------------------|-------:|--------------:|
| Kelseyland |             63 | Urban  | 2016-08-19 04:27:52 |   5.51 | 6246006544795 |
| Kelseyland |             63 | Urban  | 2016-04-17 06:59:50 |   5.54 | 7466473222333 |
| Kelseyland |             63 | Urban  | 2016-05-04 15:06:07 |  30.54 | 2140501382736 |
| Kelseyland |             63 | Urban  | 2016-01-25 20:44:56 |  12.08 | 1896987891309 |
| Kelseyland |             63 | Urban  | 2016-08-09 18:19:47 |  17.91 | 8784212854829 |
| Kelseyland |             63 | Urban  | 2016-10-24 15:15:46 |  33.56 | 4797969661996 |
| Kelseyland |             63 | Urban  | 2016-06-06 13:54:23 |  20.81 | 9811478565448 |
| Kelseyland |             63 | Urban  | 2016-08-10 07:02:40 |  44.53 | 1563171128434 |
| Kelseyland |             63 | Urban  | 2016-07-05 17:37:13 |  29.02 | 6897992353955 |
| Kelseyland |             63 | Urban  | 2016-04-25 02:18:31 |  20.05 | 1148374505062 |

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
test: test_0.csv
test_1.csv