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:
| username   | date             |   retweets |   favorites | text                                                                                                                                         | geo   | mentions   | hashtags   |         id | permalink                                            |
|:-----------|:-----------------|-----------:|------------:|:---------------------------------------------------------------------------------------------------------------------------------------------|:------|:-----------|:-----------|-----------:|:-----------------------------------------------------|
|            | 2009-05-01 16:54 |          0 |           0 | is watching the titans rookies go through their first workout. TE jared cook passes the eye test big time, as does WR Kenny Britt            |       |            |            | 1673300446 | https://twitter.com/brentdougherty/status/1673300446 |
|            | 2009-05-01 09:54 |          0 |           0 | RT @ janesports: Sanchez looks accurate, throwing now to Marcus Henry, Huey Whittaker, Kenny O'Neal and Britt Davis. # nfl                   |       | @          | #          | 1669666431 | https://twitter.com/Brian_Bassett/status/1669666431  |
|            | 2009-05-01 09:52 |          0 |           0 | Sanchez looks accurate, throwing now to Marcus Henry, Huey Whittaker, Kenny O'Neal and Britt Davis. # nfl                                    |       |            | #          | 1669646494 | https://twitter.com/janesports/status/1669646494     |
|            | 2009-05-01 01:38 |          0 |           0 | [Titans] Ex-Broncos WR Rod Smith Persuaded Titans To Pick Kenny Britt http://tinyurl.com/cprf3l                                              |       |            |            | 1667207124 | https://twitter.com/GridironFans/status/1667207124   |
|            | 2009-04-30 16:23 |          0 |           0 | SI: Larry English, Robert Ayers and Kenny Britt would have collected in between $1M and $3M in career-ending insurance if were hurt in NCAA. |       |            |            | 1662989531 | https://twitter.com/darrenrovell/status/1662989531   |
|            | 2009-04-30 11:07 |          0 |           0 | Tennessee Titans Morning Links: Bespeaking Like A Mug Edition: Kenny Britt's dominating play didn't .. http://tinyurl.com/ddhfhs             |       |            |            | 1660192725 | https://twitter.com/TitansMCM/status/1660192725      |
|            | 2009-04-30 08:24 |          0 |           0 | Must Read Article On Kenny Britt * UPDATED*: Must Read Article On Kenny Britt * UPDATED* From the NY .. http://tinyurl.com/dngvkx            |       |            |            | 1658755024 | https://twitter.com/TitansMCM/status/1658755024      |
|            | 2009-04-30 06:08 |          0 |           0 | New Titan Kenny Britt made some powerful impressions while still a high school freshman-and on a former NFL Pro Bowler. http://n247.tv/z6g   |       |            |            | 1657951351 | https://twitter.com/nashville247/status/1657951351   |
|            | 2009-04-29 15:17 |          0 |           0 | Go Titans!!! I am pretty excited about this Kenny Britt, WR.                                                                                 |       |            |            | 1652233920 | https://twitter.com/Grams2be/status/1652233920       |
|            | 2009-04-29 13:57 |          0 |           0 | @ aplusk kenny britt will have bigger impact.                                                                                                |       | @          |            | 1651533368 | https://twitter.com/volntitan/status/1651533368      |


Table #2
Filename: source_1.csv
Sample Rows in Markdown:
| username   | date             |   retweets |   favorites | text                                                                                                                                         | geo   | mentions    | hashtags   |          id | permalink                                                     |
|:-----------|:-----------------|-----------:|------------:|:---------------------------------------------------------------------------------------------------------------------------------------------|:------|:------------|:-----------|------------:|:--------------------------------------------------------------|
|            | 2014-03-17 18:59 |          1 |           0 | @ KennyBritt_18 you need to go to Carolina. @ Panthers here is a #1 talent receiver that needs new scenery.                                  |       | @ @         | #1         | 4.45711e+17 | https://twitter.com/ThomasJSwartout/status/445710944820150272 |
|            | 2014-03-17 18:59 |          1 |           0 | @ KennyBritt_18 Brady to Britt??? would be amazing hopefully a deal can get done                                                             |       | @           |            | 4.45711e+17 | https://twitter.com/RutgersMets/status/445710926424338432     |
|            | 2014-03-17 18:58 |          0 |           0 | @ KennyBritt_18 any contract with New England                                                                                                |       | @           |            | 4.45711e+17 | https://twitter.com/pcerro1484/status/445710806697914368      |
|            | 2014-03-17 18:57 |          0 |           0 | Three Free Agents On The St. Louis Rams Watch List: Kenny Britt, Davin Joseph, And Chris Clemons: According to... http://binged.it/1okVck0   |       |             |            | 4.45711e+17 | https://twitter.com/wordpresshosts/status/445710552644337664  |
|            | 2014-03-17 18:57 |          0 |           0 | NFL free agency 2014: Former Rutgers star Kenny Britt leaves New England minus a deal, report says http://bit.ly/1iXCiwj                     |       |             |            | 4.45711e+17 | https://twitter.com/NJ_NYC/status/445710533484744705          |
|            | 2014-03-17 18:57 |          1 |           0 | NFL free agency 2014: Former Rutgers star Kenny Britt leaves New England minus a deal, report says http://bit.ly/1iXCiwj                     |       |             |            | 4.45711e+17 | https://twitter.com/NJ_RutgersFB/status/445710531060432897    |
|            | 2014-03-17 18:54 |         15 |          12 | Even though free agent WR Kenny Britt came and left St. Louis w/out contract after weekend visit, Rams remain interested as he makes FA tour |       |             |            | 4.4571e+17  | https://twitter.com/jthom1/status/445709897800224768          |
|            | 2014-03-17 18:53 |          1 |           0 | Telltale sign that @ KennyBritt_18 is coming to # NE @ Marc_Bertrand @ TonyMassarotti @ jwiggs85pic.twitter.com/CKhx58j54P                   |       | @ @ @ @     | #          | 4.4571e+17  | https://twitter.com/wozzinator/status/445709622259621889      |
|            | 2014-03-17 18:52 |          0 |           0 | @balimarc @ KennyBritt_18 # FuturePatriot                                                                                                    |       | @balimarc @ | #          | 4.45709e+17 | https://twitter.com/Mouraddd_/status/445709369200480256       |
|            | 2014-03-17 18:45 |         10 |           2 | Available: Kenny Britt, Jerricho Cotchery, Jacoby Ford, Darrius Heyward-Bey, Santonio Holmes, Robert Meachem, Mario Manningham, Sidney Rice. |       |             |            | 4.45707e+17 | https://twitter.com/DavisWilliams22/status/445707412654546945 |


Table #3
Filename: source_2.csv
Sample Rows in Markdown:
| username   | date             |   retweets |   favorites | text                                                                                                                           | geo   | mentions   | hashtags   |                 id | permalink                                                     |
|:-----------|:-----------------|-----------:|------------:|:-------------------------------------------------------------------------------------------------------------------------------|:------|:-----------|:-----------|-------------------:|:--------------------------------------------------------------|
|            | 2017-03-09 09:29 |          0 |           1 | Alright Browns fans. Never worn Kenny Britt jersey.. Great buy. A steal pic.twitter.com/3Cm6RDfHnF                             |       |            |            | 839860652353208322 | https://twitter.com/_JohnnyThomas/status/839860652353208322   |
|            | 2017-03-09 09:29 |         31 |         162 | WOW IS KENNY BRITT, TERRELLE PRYOR, AND JOSH GORDON GOING TO BE A FUN RECEIVING CORPS                                          |       |            |            | 839860647466713088 | https://twitter.com/Bottlegate/status/839860647466713088      |
|            | 2017-03-09 09:29 |          0 |           0 | Cleveland Browns close to deal with Kenny Britt http://fw.to/yvD6D6O                                                           |       |            |            | 839860633776566273 | https://twitter.com/RoccoSmiff/status/839860633776566273      |
|            | 2017-03-09 09:29 |          1 |           0 | Kenny Britt 8mil/yr?!?! Sashi Brown actually working for the Steelers or something? # factoryofsadness # browns                |       |            | # #        | 839860628206530560 | https://twitter.com/dravism/status/839860628206530560         |
|            | 2017-03-09 09:29 |          0 |           0 | Cleveland Browns close to deal with Kenny Britt http://dlvr.it/NZs1kX # NFL                                                    |       |            | #          | 839860628000948224 | https://twitter.com/WishFeeder/status/839860628000948224      |
|            | 2017-03-09 09:29 |          2 |           4 | Report: Browns will sign Kenny Britt http://dlvr.it/NZs1Wm # ClevelandBrowns # Home # LosAngelesRamspic.twitter.com/tWj1mngbOS |       |            | # # #      | 839860621936066562 | https://twitter.com/USN1337/status/839860621936066562         |
|            | 2017-03-09 09:29 |          0 |           0 | # Browns signing WR Kenny Britt                                                                                                |       |            | #          | 839860617242607617 | https://twitter.com/Mike_PerSources/status/839860617242607617 |
|            | 2017-03-09 09:29 |          0 |           0 | Report: Kenny Britt heading to Browns http://tw.nbcsports.com/2LP2 pic.twitter.com/Ikh09ocw63                                  |       |            |            | 839860612800868352 | https://twitter.com/9jafeedSports/status/839860612800868352   |
|            | 2017-03-09 09:28 |          0 |           0 | http://ift.tt/2nj2U2K Kenny Britt will reportedly sign with Browns # SportsTap                                                 |       |            | #          | 839860572296523776 | https://twitter.com/SportsTapApp/status/839860572296523776    |
|            | 2017-03-09 09:28 |          2 |          19 | Kenny Britt is really talented # Analysis                                                                                      |       |            | #          | 839860544014286849 | https://twitter.com/ChrisFedor/status/839860544014286849      |


Target Schema:
| username   | date             |   retweets |   favorites | text                                                                                                                                         | geo   | mentions   | hashtags   |          id | permalink                                            |
|:-----------|:-----------------|-----------:|------------:|:---------------------------------------------------------------------------------------------------------------------------------------------|:------|:-----------|:-----------|------------:|:-----------------------------------------------------|
|            | 2009-05-01 16:54 |          0 |           0 | is watching the titans rookies go through their first workout. TE jared cook passes the eye test big time, as does WR Kenny Britt            |       |            |            | 1.6733e+09  | https://twitter.com/brentdougherty/status/1673300446 |
|            | 2009-05-01 09:54 |          0 |           0 | RT @ janesports: Sanchez looks accurate, throwing now to Marcus Henry, Huey Whittaker, Kenny O'Neal and Britt Davis. # nfl                   |       | @          | #          | 1.66967e+09 | https://twitter.com/Brian_Bassett/status/1669666431  |
|            | 2009-05-01 09:52 |          0 |           0 | Sanchez looks accurate, throwing now to Marcus Henry, Huey Whittaker, Kenny O'Neal and Britt Davis. # nfl                                    |       |            | #          | 1.66965e+09 | https://twitter.com/janesports/status/1669646494     |
|            | 2009-05-01 01:38 |          0 |           0 | [Titans] Ex-Broncos WR Rod Smith Persuaded Titans To Pick Kenny Britt http://tinyurl.com/cprf3l                                              |       |            |            | 1.66721e+09 | https://twitter.com/GridironFans/status/1667207124   |
|            | 2009-04-30 16:23 |          0 |           0 | SI: Larry English, Robert Ayers and Kenny Britt would have collected in between $1M and $3M in career-ending insurance if were hurt in NCAA. |       |            |            | 1.66299e+09 | https://twitter.com/darrenrovell/status/1662989531   |
|            | 2009-04-30 11:07 |          0 |           0 | Tennessee Titans Morning Links: Bespeaking Like A Mug Edition: Kenny Britt's dominating play didn't .. http://tinyurl.com/ddhfhs             |       |            |            | 1.66019e+09 | https://twitter.com/TitansMCM/status/1660192725      |
|            | 2009-04-30 08:24 |          0 |           0 | Must Read Article On Kenny Britt * UPDATED*: Must Read Article On Kenny Britt * UPDATED* From the NY .. http://tinyurl.com/dngvkx            |       |            |            | 1.65876e+09 | https://twitter.com/TitansMCM/status/1658755024      |
|            | 2009-04-30 06:08 |          0 |           0 | New Titan Kenny Britt made some powerful impressions while still a high school freshman-and on a former NFL Pro Bowler. http://n247.tv/z6g   |       |            |            | 1.65795e+09 | https://twitter.com/nashville247/status/1657951351   |
|            | 2009-04-29 15:17 |          0 |           0 | Go Titans!!! I am pretty excited about this Kenny Britt, WR.                                                                                 |       |            |            | 1.65223e+09 | https://twitter.com/Grams2be/status/1652233920       |
|            | 2009-04-29 13:57 |          0 |           0 | @ aplusk kenny britt will have bigger impact.                                                                                                |       | @          |            | 1.65153e+09 | https://twitter.com/volntitan/status/1651533368      |

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