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:
|   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 |
|-------------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------|----------------------:|:----------------|:-----------------------|:------------------------|:-------------------|:--------------------|------------------:|:--------------------------------------|:----------------------------------------|:-------------------------------|---------:|
|                  1380675 | NEWSOM BALLOT MEASURE COMMITTEE; SAFETY FOR ALL, YES ON PROP. 63,                                                                          |               2083720 | 2016-09-15      | ALEXANDER              | RUTH                    | WEST SACRAMENTO    | CA                  |             95605 |                                       | NOT EMPLOYED                            | False                          |      100 |
|                  1376791 | YES ON PROP 61, CALIFORNIANS FOR LOWER DRUG PRICES, WITH MAJOR FUNDING BY AIDS HEALTHCARE FOUNDATION AND CALIFORNIA NURSES ASSOCIATION PAC |               2083732 | 2016-09-18      | LINCOLN                | GREGORY                 | LAGUNA BEACH       | CA                  |             92651 | NONE                                  | NOT EMPLOYED                            | False                          |       50 |
|                  1371855 | MARIJUANA POLICY PROJECT OF CALIFORNIA, YES ON 64                                                                                          |               2009762 | 2015-12-28      | GARRIS                 | ERIC                    | SAN FRANCISCO      | CA                  |         941222939 | RANDOLPH BOURNE INSTITUTE/ANTIWAR.COM | DIRECTOR                                | False                          |      100 |
|                  1387279 | VETO GUNMAGEDDON, CITIZENS WHO ARE OPPOSED TO PROPOSITION 63, ASSEMBLY BILLS 1135, 1511, 1695, 857 AND SENATE BILLS 880, 1235 AND 1446     |               2108236 | 2016-07-21      | MURPHY                 | MICHAEL                 | LADERA RANCH       | CA                  |             92694 | RETIRED                               | RETIRED                                 | False                          |      100 |
|                  1329332 | SAVE THE BAG BAN, YES ON 67, SPONSORED BY ENVIRONMENT CALIFORNIA                                                                           |               2097541 | 2016-10-03      | THORPE                 | TATIANA                 | LOS ANGELES        | CA                  |         900422117 | UNEMPLOYED                            | UNEMPLOYED                              | False                          |       17 |
|                  1380746 | STOP PROP 63, A GRASSROOTS, COMMON-SENSE EFFORT FOR RATIONAL POLICY SPONSORED BY FIREARMS POLICY COALITION                                 |               2033917 | 2016-01-06      | HALL                   | JEFF                    | ORANGE             | CA                  |             92867 | SELF EMPLOYED - JEFF HALL             | ANIMATOR                                | False                          |      100 |
|                  1380675 | NEWSOM BALLOT MEASURE COMMITTEE; SAFETY FOR ALL, YES ON PROP. 63,                                                                          |               2064720 | 2016-06-14      | CACERES                | MARIA                   | PASADENA           | CA                  |             91104 | COJUTEPEQUE RESTAURANT                | OWNER                                   | False                          |      100 |
|                  1380746 | STOP PROP 63, A GRASSROOTS, COMMON-SENSE EFFORT FOR RATIONAL POLICY SPONSORED BY FIREARMS POLICY COALITION                                 |               2082753 | 2016-09-23      | SAWIAK                 | ERIK                    | FULLERTON          | CA                  |             92835 | SELF EMPLOYED                         | CONSTRUCTION AND REAL ESTATE CONSULTANT | False                          |       25 |
|                  1382067 | COALITION FOR CIVIL LIBERTIES - NO ON 63, A PROJECT OF CALIFORNIA RIFLE & PISTOL ASSOCIATION                                               |               2082835 | 2016-08-29      | WARKENTIN              | JOHN                    | GOLETA             | CA                  |             93117 | KAMAP                                 | PROPERTY MANAGER                        | False                          |      100 |
|                  1380675 | NEWSOM BALLOT MEASURE COMMITTEE; SAFETY FOR ALL, YES ON PROP. 63,                                                                          |               2083720 | 2016-07-04      | COX                    | DANIEL                  | SAN FRANCISCO      | CA                  |             94115 | UNIVERSITY OF CALIFORNIA              | PROFESSOR                               | False                          |       50 |


Table #2
Filename: source_1.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               |


Target Schema:
| committee_name_x                                                                                                                                         |           amount |
|:---------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------:|
| ADULT USE CAMPAIGN FOR PROPOSITION 64; THE                                                                                                               |  17089           |
| AMERICAN PROGRESSIVE BAG ALLIANCE, A PROJECT OF THE SOCIETY OF THE PLASTICS INDUSTRY (NON-PROFIT 501 (C) (6)), YES ON 65 AND NO ON 67                    |      5.36283e+06 |
| CALIFORNIA CALLS ACTION FUND (NONPROFIT 501(C)(4))                                                                                                       | 208760           |
| CALIFORNIA CITIZENS AGAINST SPECIAL INTERESTS AND WASTEFUL TAXES, NO ON PROP. 56                                                                         |  32050           |
| CALIFORNIA COMMON CAUSE -- YES ON 54 AND 59 (NONPROFIT 501(C)(4)                                                                                         | 100778           |
| CALIFORNIA CORRECTIONAL PEACE OFFICERS ASSOCIATION TRUTH IN AMERICAN GOVERNMENT FUND; NO ON PROPOSITION 62, YES ON PROPOSITION 66 (NON-PROFIT 501 (C) 5) |      1.63816e+07 |

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