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:
| Year        | Category                   | Nominee              | Movie                                  | Winner   |
|:------------|:---------------------------|:---------------------|:---------------------------------------|:---------|
| 2010 (83rd) | Actress -- Supporting Role | Amy Adams            | The Fighter {'Charlene Fleming'}       | NO       |
| 2010 (83rd) | Actress -- Supporting Role | Helena Bonham Carter | The King's Speech {'Queen Elizabeth'}  | NO       |
| 2010 (83rd) | Actress -- Supporting Role | Hailee Steinfeld     | True Grit {'Mattie Ross'}              | NO       |
| 2010 (83rd) | Actress -- Supporting Role | Jacki Weaver         | Animal Kingdom {'Janine 'Smurf' Cody'} | NO       |
| 2009 (82nd) | Actress -- Supporting Role | Penélope Cruz        | Nine {'Carla'}                         | NO       |
| 2009 (82nd) | Actress -- Supporting Role | Vera Farmiga         | Up in the Air {'Alex Goran'}           | NO       |
| 2009 (82nd) | Actress -- Supporting Role | Maggie Gyllenhaal    | Crazy Heart {'Jean Craddock'}          | NO       |
| 2009 (82nd) | Actress -- Supporting Role | Anna Kendrick        | Up in the Air {'Natalie Keener'}       | NO       |
| 2008 (81st) | Actress -- Supporting Role | Amy Adams            | Doubt {'Sister James'}                 | NO       |
| 2008 (81st) | Actress -- Supporting Role | Viola Davis          | Doubt {'Mrs. Miller'}                  | NO       |


Table #2
Filename: source_1.csv
Sample Rows in Markdown:
| Year        | Category                 | Nominee             | Movie                                | Winner   |
|:------------|:-------------------------|:--------------------|:-------------------------------------|:---------|
| 2010 (83rd) | Actor -- Supporting Role | John Hawkes         | Winter's Bone {'Teardrop'}           | NO       |
| 2010 (83rd) | Actor -- Supporting Role | Jeremy Renner       | The Town {'James Coughlin'}          | NO       |
| 2010 (83rd) | Actor -- Supporting Role | Mark Ruffalo        | The Kids Are All Right {'Paul'}      | NO       |
| 2010 (83rd) | Actor -- Supporting Role | Geoffrey Rush       | The King's Speech {'Lionel Logue'}   | NO       |
| 2009 (82nd) | Actor -- Supporting Role | Matt Damon          | Invictus {'Francois Pienaar'}        | NO       |
| 2009 (82nd) | Actor -- Supporting Role | Woody Harrelson     | The Messenger {'Captain Tony Stone'} | NO       |
| 2009 (82nd) | Actor -- Supporting Role | Christopher Plummer | The Last Station {'Tolstoy'}         | NO       |
| 2009 (82nd) | Actor -- Supporting Role | Stanley Tucci       | The Lovely Bones {'George Harvey'}   | NO       |
| 2008 (81st) | Actor -- Supporting Role | Josh Brolin         | Milk {'Dan White'}                   | NO       |
| 2008 (81st) | Actor -- Supporting Role | Robert Downey Jr.   | Tropic Thunder {'Kirk Lazarus'}      | NO       |


Table #3
Filename: source_2.csv
Sample Rows in Markdown:
| Year        | Category                | Nominee          | Movie                                            | Winner   |
|:------------|:------------------------|:-----------------|:-------------------------------------------------|:---------|
| 1970 (43rd) | Actress -- Leading Role | Carrie Snodgress | Diary of a Mad Housewife {'Tina Balser'}         | NO       |
| 1969 (42nd) | Actress -- Leading Role | Genevieve Bujold | Anne of the Thousand Days {'Anne Boleyn'}        | NO       |
| 1969 (42nd) | Actress -- Leading Role | Jane Fonda       | They Shoot Horses, Don't They? {'Gloria Beatty'} | NO       |
| 1969 (42nd) | Actress -- Leading Role | Liza Minnelli    | The Sterile Cuckoo {'Pookie Adams'}              | NO       |
| 1969 (42nd) | Actress -- Leading Role | Jean Simmons     | The Happy Ending {'Mary Wilson'}                 | NO       |
| 1968 (41st) | Actress -- Leading Role | Patricia Neal    | The Subject Was Roses {'Nettie Cleary'}          | NO       |
| 1968 (41st) | Actress -- Leading Role | Vanessa Redgrave | Isadora {'Isadora Duncan'}                       | NO       |
| 1968 (41st) | Actress -- Leading Role | Joanne Woodward  | Rachel, Rachel {'Rachel Cameron'}                | NO       |
| 1967 (40th) | Actress -- Leading Role | Anne Bancroft    | The Graduate {'Mrs. Robinson'}                   | NO       |
| 1967 (40th) | Actress -- Leading Role | Faye Dunaway     | Bonnie and Clyde {'Bonnie Parker'}               | NO       |


Table #4
Filename: source_3.csv
Sample Rows in Markdown:
| Year        | Category   | Nominee                                         | Movie                    | Winner   |
|:------------|:-----------|:------------------------------------------------|:-------------------------|:---------|
| 2010 (83rd) | Directing  | Black Swan                                      | Darren Aronofsky         | NO       |
| 2010 (83rd) | Directing  | The Fighter                                     | David O. Russell         | NO       |
| 2010 (83rd) | Directing  | The Social Network                              | David Fincher            | NO       |
| 2010 (83rd) | Directing  | True Grit                                       | Joel Coen and Ethan Coen | NO       |
| 2009 (82nd) | Directing  | Avatar                                          | James Cameron            | NO       |
| 2009 (82nd) | Directing  | Inglourious Basterds                            | Quentin Tarantino        | NO       |
| 2009 (82nd) | Directing  | Precious: Based on the Novel 'Push' by Sapphire | Lee Daniels              | NO       |
| 2009 (82nd) | Directing  | Up in the Air                                   | Jason Reitman            | NO       |
| 2008 (81st) | Directing  | The Curious Case of Benjamin Button             | David Fincher            | NO       |
| 2008 (81st) | Directing  | Frost/Nixon                                     | Ron Howard               | NO       |


Table #5
Filename: source_4.csv
Sample Rows in Markdown:
| Year        | Category              | Nominee         | Movie                                            | Winner   |
|:------------|:----------------------|:----------------|:-------------------------------------------------|:---------|
| 2010 (83rd) | Actor -- Leading Role | Javier Bardem   | Biutiful {'Uxbal'}                               | NO       |
| 2010 (83rd) | Actor -- Leading Role | Jeff Bridges    | True Grit {'Rooster Cogburn'}                    | NO       |
| 2010 (83rd) | Actor -- Leading Role | Jesse Eisenberg | The Social Network {'Mark Zuckerberg'}           | NO       |
| 2010 (83rd) | Actor -- Leading Role | James Franco    | 127 Hours {'Aron Ralston'}                       | NO       |
| 2009 (82nd) | Actor -- Leading Role | George Clooney  | Up in the Air {'Ryan Bingham'}                   | NO       |
| 2009 (82nd) | Actor -- Leading Role | Colin Firth     | A Single Man {'George'}                          | NO       |
| 2009 (82nd) | Actor -- Leading Role | Morgan Freeman  | Invictus {'Nelson Mandela'}                      | NO       |
| 2009 (82nd) | Actor -- Leading Role | Jeremy Renner   | The Hurt Locker {'Staff Sergeant William James'} | NO       |
| 2008 (81st) | Actor -- Leading Role | Richard Jenkins | The Visitor {'Walter'}                           | NO       |
| 2008 (81st) | Actor -- Leading Role | Frank Langella  | Frost/Nixon {'Richard Nixon'}                    | NO       |


Target Schema:
| Year        | Category   | Nominee                                         | Movie                    | Winner   |
|:------------|:-----------|:------------------------------------------------|:-------------------------|:---------|
| 2010 (83rd) | Directing  | Black Swan                                      | Darren Aronofsky         | NO       |
| 2010 (83rd) | Directing  | The Fighter                                     | David O. Russell         | NO       |
| 2010 (83rd) | Directing  | The Social Network                              | David Fincher            | NO       |
| 2010 (83rd) | Directing  | True Grit                                       | Joel Coen and Ethan Coen | NO       |
| 2009 (82nd) | Directing  | Avatar                                          | James Cameron            | NO       |
| 2009 (82nd) | Directing  | Inglourious Basterds                            | Quentin Tarantino        | NO       |
| 2009 (82nd) | Directing  | Precious: Based on the Novel 'Push' by Sapphire | Lee Daniels              | NO       |
| 2009 (82nd) | Directing  | Up in the Air                                   | Jason Reitman            | NO       |
| 2008 (81st) | Directing  | The Curious Case of Benjamin Button             | David Fincher            | NO       |
| 2008 (81st) | Directing  | Frost/Nixon                                     | Ron Howard               | NO       |

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
source_2.csv
source_3.csv
source_4.csv
test: test_0.csv
test_1.csv
test_2.csv
test_3.csv
test_4.csv