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:
| ocd_prop_id                                      |   calaccess_prop_id |   ccdc_prop_id | prop_name                                                                                                                      |   ccdc_committee_id |   calaccess_committee_id | committee_name                                                                                                                                                                                         | committee_position   |
|:-------------------------------------------------|--------------------:|---------------:|:-------------------------------------------------------------------------------------------------------------------------------|--------------------:|-------------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------|
| ocd-contest/b51dc64d-3562-4913-a190-69f5088c22a6 |             1376258 |             70 | PROPOSITION 051 - SCHOOL BONDS. FUNDING FOR K-12 SCHOOL AND COMMUNITY COLLEGE FACILITIES. INITIATIVE STATUTORY AMENDMENT.      |                 382 |                  1374469 | YES ON PROPOSITION 51 - CALIFORNIANS FOR QUALITY SCHOOLS, SPONSORED AND FUNDED BY COALITION FOR ADEQUATE SCHOOL HOUSING ISSUES COMMITTEE AND CALIFORNIA BUILDING INDUSTRY ASSOCIATION ISSUES COMMITTEE | SUPPORT              |
| ocd-contest/b51dc64d-3562-4913-a190-69f5088c22a6 |             1376258 |             70 | PROPOSITION 051 - SCHOOL BONDS. FUNDING FOR K-12 SCHOOL AND COMMUNITY COLLEGE FACILITIES. INITIATIVE STATUTORY AMENDMENT.      |                 383 |                  1220380 | COMMUNITY COLLEGE FACILITY COALITION ISSUES COMMITTEE, YES ON 51                                                                                                                                       | SUPPORT              |
| ocd-contest/b51dc64d-3562-4913-a190-69f5088c22a6 |             1376258 |             70 | PROPOSITION 051 - SCHOOL BONDS. FUNDING FOR K-12 SCHOOL AND COMMUNITY COLLEGE FACILITIES. INITIATIVE STATUTORY AMENDMENT.      |                 384 |                  1282321 | TORLAKSON'S INVEST IN CALIFORNIA A BALLOT MEASURE COMMITTEE TO SUPPORT PROPOSITION 51, SUPERINTENDENT TOM                                                                                              | SUPPORT              |
| ocd-contest/b51dc64d-3562-4913-a190-69f5088c22a6 |             1376258 |             70 | PROPOSITION 051 - SCHOOL BONDS. FUNDING FOR K-12 SCHOOL AND COMMUNITY COLLEGE FACILITIES. INITIATIVE STATUTORY AMENDMENT.      |                 385 |                  1382843 | CALIFORNIA TAXPAYERS AND EDUCATORS OPPOSED TO SPRAWL AND DEVELOPER ABUSE                                                                                                                               | OPPOSE               |
| ocd-contest/85990193-9d6f-4600-b8e7-bf1317841d82 |             1362198 |             71 | PROPOSITION 052 - STATE FEES ON HOSPITALS. FEDERAL MEDI-CAL MATCHING FUNDS. INITIATIVE STATUTORY AND CONSTITUTIONAL AMENDMENT. |                 386 |                  1362973 | YES ON PROPOSITION 52 - A COALITION OF CALIFORNIA ASSOCIATION OF HOSPITALS AND HEALTH SYSTEMS AND NON-PROFIT HEALTH CARE ORGANIZATIONS                                                                 | SUPPORT              |
| ocd-contest/85990193-9d6f-4600-b8e7-bf1317841d82 |             1362198 |             71 | PROPOSITION 052 - STATE FEES ON HOSPITALS. FEDERAL MEDI-CAL MATCHING FUNDS. INITIATIVE STATUTORY AND CONSTITUTIONAL AMENDMENT. |                 387 |                  1381488 | CALIFORNIANS FOR HOSPITAL ACCOUNTABILITY AND QUALITY CARE - NO ON 52, SPONSORED BY SERVICE EMPLOYEES INTERNATIONAL UNION - UNITED HEALTHCARE WORKERS WEST                                              | OPPOSE               |
| ocd-contest/85990193-9d6f-4600-b8e7-bf1317841d82 |             1362198 |             71 | PROPOSITION 052 - STATE FEES ON HOSPITALS. FEDERAL MEDI-CAL MATCHING FUNDS. INITIATIVE STATUTORY AND CONSTITUTIONAL AMENDMENT. |                 388 |                  1373047 | SERVICE EMPLOYEES INTERNATIONAL UNION, UNITED HEALTHCARE WORKERS WEST (NONPROFIT 501 (C)(5))                                                                                                           | OPPOSE               |
| ocd-contest/9fb6a199-7520-433c-a290-83e016a9d389 |             1376142 |             72 | PROPOSITION 053 - REVENUE BONDS. STATEWIDE VOTER APPROVAL. INITIATIVE CONSTITUTIONAL AMENDMENT.                                |                 389 |                  1376040 | YES ON 53 - STOP BLANK CHECKS                                                                                                                                                                          | SUPPORT              |
| ocd-contest/9fb6a199-7520-433c-a290-83e016a9d389 |             1376142 |             72 | PROPOSITION 053 - REVENUE BONDS. STATEWIDE VOTER APPROVAL. INITIATIVE CONSTITUTIONAL AMENDMENT.                                |                 390 |                  1378875 | NO ON PROP 53 - CALIFORNIANS TO PROTECT LOCAL CONTROL, A COALITION OF PUBLIC SAFETY, LOCAL GOVERNMENT, BUSINESS AND LABOR ORGANIZATIONS, GOVERNOR BROWN AND TAXPAYERS                                  | OPPOSE               |
| ocd-contest/9fb6a199-7520-433c-a290-83e016a9d389 |             1376142 |             72 | PROPOSITION 053 - REVENUE BONDS. STATEWIDE VOTER APPROVAL. INITIATIVE CONSTITUTIONAL AMENDMENT.                                |                 391 |                   761010 | CA BUSINESS PAC, SP0NSORED BY CA CHAMBER OF COMMERCE (AKA CALBUSPAC)                                                                                                                                   | OPPOSE               |


Table #2
Filename: source_1.csv
Sample Rows in Markdown:
|   calaccess_committee_id | committee_name                                                                                                                                                                                    |   calaccess_filing_id | date_received   | contributor_lastname   | contributor_firstname   | contributor_city   | contributor_state   |   contributor_zip | contributor_employer          | contributor_occupation   | contributor_is_self_employed   |   amount |
|-------------------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------:|:----------------|:-----------------------|:------------------------|:-------------------|:--------------------|------------------:|:------------------------------|:-------------------------|:-------------------------------|---------:|
|                  1380746 | STOP PROP 63, A GRASSROOTS, COMMON-SENSE EFFORT FOR RATIONAL POLICY SPONSORED BY FIREARMS POLICY COALITION                                                                                        |               2082753 | 2016-09-22      | DAVILA                 | LUIS                    | LAKEWOOD           | CA                  |             90712 | CITY OF LOS ANGELES           | POLICE OFFICER           | False                          |       50 |
|                  1387789 | SAM ACTION, INC., A COMMITTEE AGAINST PROPOSITION 64 WITH HELP FROM CITIZENS (NONPROFIT 501 (C)(4))                                                                                               |               2083142 | 2016-07-25      | SCHAUER                | JULIE                   | OAKS               | CA                  |             19456 |                               | RETIRED                  | False                          |   150000 |
|                  1380590 | YES ON 62, NO ON 66. REPLACE THE COSTLY, FAILED DEATH PENALTY SYSTEM. SPONSORED BY TAXPAYERS FOR SENTENCING REFORM                                                                                |               2083707 | 2016-07-29      | DUPONT                 | ALDEN                   | MILLSBORO          | DE                  |             19966 | NONE                          | UNEMPLOYED               | False                          |       15 |
|                  1380590 | YES ON 62, NO ON 66. REPLACE THE COSTLY, FAILED DEATH PENALTY SYSTEM. SPONSORED BY TAXPAYERS FOR SENTENCING REFORM                                                                                |               2038035 | 2016-03-04      | SANDUSKY               | SHELLEY                 | SAN FRANCISCO      | CA                  |             94103 | HABEAS CORPUS RESOURCE CENTER | ATTORNEY                 | False                          |      250 |
|                  1381423 | YES ON 59, CALIFORNIA CLEAN MONEY ACTION FUND TO OVERTURN CITIZENS UNITED (NON PROFIT 501(C)4)                                                                                                    |               2013083 | 2015-11-16      | ARONSON                | LAWRENCE                | LOS ALTOS          | CA                  |             94024 |                               | RETIRED                  | False                          |      100 |
|                  1329332 | COMMITTEE TO DEFEAT PROP 23, SPONSORED BY ENVIRONMENT CALIFORNIA                                                                                                                                  |               2012736 | 2015-12-03      | STEELE                 | JUNEKO                  | SEBASTOPOL         | CA                  |         954722619 | UNEMPLOYED                    | UNEMPLOYED               | False                          |      300 |
|                  1329332 | SAVE THE BAG BAN, YES ON 67, SPONSORED BY ENVIRONMENT CALIFORNIA                                                                                                                                  |               1979246 | 2015-06-18      | BANKOSKI               | HEATHER                 | LOS GATOS          | CA                  |         950325038 | GOOGLE                        | MANAGER                  | False                          |      100 |
|                  1329332 | SAVE THE BAG BAN, YES ON 67, SPONSORED BY ENVIRONMENT CALIFORNIA                                                                                                                                  |               2082426 | 2016-09-18      | BAKER                  | MOLLIE                  | GRASS VALLEY       | CA                  |         959459724 | UNION HILL DAY SCHOOL INC     | PRESCHOOL TEACHER        | False                          |       48 |
|                  1380590 | YES ON 62, NO ON 66. REPLACE THE COSTLY, FAILED DEATH PENALTY SYSTEM. SPONSORED BY TAXPAYERS FOR SENTENCING REFORM                                                                                |               2083707 | 2016-07-24      | KELLEY                 | ALICE                   | EAST HARWICH       | MA                  |              2645 | NONE                          | RETIRED                  | False                          |       15 |
|                  1381808 | YES ON 64, CALIFORNIANS TO CONTROL, REGULATE AND TAX ADULT USE OF MARIJUANA WHILE PROTECTING CHILDREN, SPONSORED BY BUSINESS, PHYSICIANS, ENVIRONMENTAL AND SOCIAL-JUSTICE ADVOCATE ORGANIZATIONS |               2064423 | 2016-06-29      | HANNAN                 | LARRY                   | REDDING            | CA                  |             96003 | NONE                          | UNEMPLOYED               | False                          |       20 |


Target Schema:
| ocd_prop_id                                      |   calaccess_prop_id |   ccdc_prop_id | prop_name                                                                                                    |   ccdc_committee_id |   calaccess_committee_id | committee_name_x                                                 | committee_position   | committee_name_y                                                 |   calaccess_filing_id | date_received   | contributor_lastname   | contributor_firstname   | contributor_city   | contributor_state   |   contributor_zip | contributor_employer    | contributor_occupation   | contributor_is_self_employed   |   amount |
|:-------------------------------------------------|--------------------:|---------------:|:-------------------------------------------------------------------------------------------------------------|--------------------:|-------------------------:|:-----------------------------------------------------------------|:---------------------|:-----------------------------------------------------------------|----------------------:|:----------------|:-----------------------|:------------------------|:-------------------|:--------------------|------------------:|:------------------------|:-------------------------|:-------------------------------|---------:|
| ocd-contest/e0c5f9f0-63a9-4c15-9a5c-017e20ac15bc |             1381642 |             73 | PROPOSITION 054 - LEGISLATURE. LEGISLATION AND PROCEEDINGS. INITIATIVE CONSTITUTIONAL AMENDMENT AND STATUTE. |                 396 |                  1389997 | CALIFORNIA COMMON CAUSE -- YES ON 54 AND 59 (NONPROFIT 501(C)(4) | SUPPORT              | CALIFORNIA COMMON CAUSE -- YES ON 54 AND 59 (NONPROFIT 501(C)(4) |               2098058 | 2016-07-01      | KORMUNDOY              | EDWARD                  | LOS ANGELES        | CA                  |             90026 | RETIRED                 | RETIRED                  | False                          |      100 |
| ocd-contest/e0c5f9f0-63a9-4c15-9a5c-017e20ac15bc |             1381642 |             73 | PROPOSITION 054 - LEGISLATURE. LEGISLATION AND PROCEEDINGS. INITIATIVE CONSTITUTIONAL AMENDMENT AND STATUTE. |                 396 |                  1389997 | CALIFORNIA COMMON CAUSE -- YES ON 54 AND 59 (NONPROFIT 501(C)(4) | SUPPORT              | CALIFORNIA COMMON CAUSE -- YES ON 54 AND 59 (NONPROFIT 501(C)(4) |               2098058 | 2016-07-03      | CARSON                 | RICHARD                 | NEVADA CITY        | CA                  |             95959 | RETIRED                 | RETIRED                  | False                          |      100 |
| ocd-contest/e0c5f9f0-63a9-4c15-9a5c-017e20ac15bc |             1381642 |             73 | PROPOSITION 054 - LEGISLATURE. LEGISLATION AND PROCEEDINGS. INITIATIVE CONSTITUTIONAL AMENDMENT AND STATUTE. |                 396 |                  1389997 | CALIFORNIA COMMON CAUSE -- YES ON 54 AND 59 (NONPROFIT 501(C)(4) | SUPPORT              | CALIFORNIA COMMON CAUSE -- YES ON 54 AND 59 (NONPROFIT 501(C)(4) |               2098058 | 2016-09-20      | MORRISON               | JAMES                   | HUNTINGTON BEACH   | CA                  |             92647 | RETIRED                 | RETIRED                  | False                          |       59 |
| ocd-contest/e0c5f9f0-63a9-4c15-9a5c-017e20ac15bc |             1381642 |             73 | PROPOSITION 054 - LEGISLATURE. LEGISLATION AND PROCEEDINGS. INITIATIVE CONSTITUTIONAL AMENDMENT AND STATUTE. |                 396 |                  1389997 | CALIFORNIA COMMON CAUSE -- YES ON 54 AND 59 (NONPROFIT 501(C)(4) | SUPPORT              | CALIFORNIA COMMON CAUSE -- YES ON 54 AND 59 (NONPROFIT 501(C)(4) |               2098058 | 2016-09-21      | CRESSMAN               | DEREK                   | SACRAMENTO         | CA                  |             95816 | CALIFORNIA COMMON CAUSE | CAMPAIGN MANAGER         | False                          |      159 |
| ocd-contest/e0c5f9f0-63a9-4c15-9a5c-017e20ac15bc |             1381642 |             73 | PROPOSITION 054 - LEGISLATURE. LEGISLATION AND PROCEEDINGS. INITIATIVE CONSTITUTIONAL AMENDMENT AND STATUTE. |                 396 |                  1389997 | CALIFORNIA COMMON CAUSE -- YES ON 54 AND 59 (NONPROFIT 501(C)(4) | SUPPORT              | CALIFORNIA COMMON CAUSE -- YES ON 54 AND 59 (NONPROFIT 501(C)(4) |               2098058 | 2016-10-04      | MORRISON               | JAMES                   | HUNTINGTON BEACH   | CA                  |             92647 | RETIRED                 | RETIRED                  | False                          |       59 |
| ocd-contest/e0c5f9f0-63a9-4c15-9a5c-017e20ac15bc |             1381642 |             73 | PROPOSITION 054 - LEGISLATURE. LEGISLATION AND PROCEEDINGS. INITIATIVE CONSTITUTIONAL AMENDMENT AND STATUTE. |                 396 |                  1389997 | CALIFORNIA COMMON CAUSE -- YES ON 54 AND 59 (NONPROFIT 501(C)(4) | SUPPORT              | CALIFORNIA COMMON CAUSE -- YES ON 54 AND 59 (NONPROFIT 501(C)(4) |               2098058 | 2016-10-04      | ANDREW-AKITA           | EDITH                   | SAN DIEGO          | CA                  |             92107 | RETIRED                 | RETIRED                  | False                          |      100 |
| ocd-contest/e0c5f9f0-63a9-4c15-9a5c-017e20ac15bc |             1381642 |             73 | PROPOSITION 054 - LEGISLATURE. LEGISLATION AND PROCEEDINGS. INITIATIVE CONSTITUTIONAL AMENDMENT AND STATUTE. |                 396 |                  1389997 | CALIFORNIA COMMON CAUSE -- YES ON 54 AND 59 (NONPROFIT 501(C)(4) | SUPPORT              | CALIFORNIA COMMON CAUSE -- YES ON 54 AND 59 (NONPROFIT 501(C)(4) |               2098058 | 2016-10-05      | BJORK                  | MATT                    | OAKLAND            | CA                  |             94611 | NIKON PRECISION         | ENGINEER                 | False                          |       59 |
| ocd-contest/e0c5f9f0-63a9-4c15-9a5c-017e20ac15bc |             1381642 |             73 | PROPOSITION 054 - LEGISLATURE. LEGISLATION AND PROCEEDINGS. INITIATIVE CONSTITUTIONAL AMENDMENT AND STATUTE. |                 396 |                  1389997 | CALIFORNIA COMMON CAUSE -- YES ON 54 AND 59 (NONPROFIT 501(C)(4) | SUPPORT              | CALIFORNIA COMMON CAUSE -- YES ON 54 AND 59 (NONPROFIT 501(C)(4) |               2098058 | 2016-10-05      | MAFFLY                 | ROY                     | PALO ALTO          | CA                  |             94301 | RETIRED                 | RETIRED                  | False                          |       59 |
| ocd-contest/e0c5f9f0-63a9-4c15-9a5c-017e20ac15bc |             1381642 |             73 | PROPOSITION 054 - LEGISLATURE. LEGISLATION AND PROCEEDINGS. INITIATIVE CONSTITUTIONAL AMENDMENT AND STATUTE. |                 396 |                  1389997 | CALIFORNIA COMMON CAUSE -- YES ON 54 AND 59 (NONPROFIT 501(C)(4) | SUPPORT              | CALIFORNIA COMMON CAUSE -- YES ON 54 AND 59 (NONPROFIT 501(C)(4) |               2098058 | 2016-10-05      | STENMAN                | BRUCE                   | PRUNEDALE          | CA                  |             93907 | LIGHTSMITH              | MANAGER                  | False                          |      200 |
| ocd-contest/e0c5f9f0-63a9-4c15-9a5c-017e20ac15bc |             1381642 |             73 | PROPOSITION 054 - LEGISLATURE. LEGISLATION AND PROCEEDINGS. INITIATIVE CONSTITUTIONAL AMENDMENT AND STATUTE. |                 396 |                  1389997 | CALIFORNIA COMMON CAUSE -- YES ON 54 AND 59 (NONPROFIT 501(C)(4) | SUPPORT              | CALIFORNIA COMMON CAUSE -- YES ON 54 AND 59 (NONPROFIT 501(C)(4) |               2098058 | 2016-10-05      | LITTLE                 | DARLENE                 | SEAL BEACH         | CA                  |             90740 | NOCCCD                  | LECTURER                 | False                          |      159 |

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