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   |
|:-----------|:------------------------------|:---------------------------------------------------------------|:----------------------|
| Mammal     | Clethrionomys gapperi gapperi | Gapper's Red-Backed Vole                                       |                       |
| Mammal     | Bos bison                     | American Bison, Bison                                          |                       |
| Mammal     | Bos taurus                    | Aurochs, Aurochs, Domestic Cattle (Feral), Domesticated Cattle |                       |
| Mammal     | Ovis aries                    | Domestic Sheep, Mouflon, Red Sheep, Sheep (Feral)              |                       |
| Mammal     | Cervus elaphus                | Wapiti Or Elk                                                  |                       |
| Mammal     | Odocoileus virginianus        | White-Tailed Deer                                              |                       |
| Mammal     | Sus scrofa                    | Feral Hog, Wild Pig                                            |                       |
| Mammal     | Canis latrans                 | Coyote                                                         | Species of Concern    |
| Mammal     | Canis lupus                   | Gray Wolf                                                      | Endangered            |
| Mammal     | Canis rufus                   | Red Wolf                                                       | Endangered            |


Table #2
Filename: source_1.csv
Sample Rows in Markdown:
| scientific_name                        | park_name                           |   observations |
|:---------------------------------------|:------------------------------------|---------------:|
| Penstemon heterodoxus var. heterodoxus | Yosemite National Park              |            134 |
| Viola lobata ssp. integrifolia         | Yosemite National Park              |            139 |
| Tiarella cordifolia var. collina       | Yellowstone National Park           |            277 |
| Lewisia disepala                       | Yellowstone National Park           |            265 |
| Pinus echinata                         | Great Smoky Mountains National Park |             76 |
| Chamaebatiaria millefolium             | Bryce National Park                 |             80 |
| Buchnera americana                     | Yellowstone National Park           |            218 |
| Malva neglecta                         | Yellowstone National Park           |            262 |
| Cosmos sulphureus                      | Yosemite National Park              |            127 |
| Senecio streptanthifolius              | Yellowstone National Park           |            239 |


Target Schema:
| park_name                           |   observations |
|:------------------------------------|---------------:|
| Bryce National Park                 |              1 |
| Great Smoky Mountains National Park |              1 |
| Yellowstone National Park           |              1 |
| Yosemite National Park              |              1 |

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