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                                                     |
|:-----------|:-----------------|-----------:|------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------|:-----------|:-----------|-------------------:|:--------------------------------------------------------------|
|            | 2018-03-14 08:37 |          0 |           0 | @ NigelBradham_13 resigns with the Eagles. Great to see my favorite player coming back to get himself ring number 2 (and 3, maybe 4). # flyeaglesfly                  |       | @          | #          | 973916076680589312 | https://twitter.com/birdgang612/status/973916076680589312     |
|            | 2018-03-14 08:37 |          0 |           4 | Nigel Bradham is only 28 and he has the same bday as me                                                                                                               |       |            |            | 973916057495891968 | https://twitter.com/Fly64/status/973916057495891968           |
|            | 2018-03-14 08:37 |          0 |           0 | Nigel Bradham will remain an Eagle according to Adam Schefter http://toplocalnow.com/us/philadelphia/at/9#t13624767 …                                                 |       |            | #t13624767 | 973916056325586944 | https://twitter.com/PhiladelphiaCP/status/973916056325586944  |
|            | 2018-03-14 08:37 |          1 |           3 | The # Eagles have resigned LB Nigel Bradham to a 5-year, $40M deal.                                                                                                   |       |            | #          | 973916007923421184 | https://twitter.com/PhilaEaglez/status/973916007923421184     |
|            | 2018-03-14 08:37 |          0 |           0 | Eagles will reportedly shop Mychal Kendricks after re-signing Nigel Bradham http://ift.tt/2Ipacxt                                                                     |       |            |            | 973916005184524289 | https://twitter.com/BuddyRAbrahams/status/973916005184524289  |
|            | 2018-03-14 08:37 |          0 |           0 | @ NigelBradham_13 glad you will be back in Philly... # FlyEaglesFly                                                                                                   |       | @          | #          | 973915975505666048 | https://twitter.com/adog235/status/973915975505666048         |
|            | 2018-03-14 08:37 |          0 |           0 | Eagles keep WLB Bradham on 5-year, $40M deal - Nigel Bradham | PHI" http://ift.tt/16qAYwO vis Rotoworld # NFL # fantasyfootball # Football"                           |       |            | # # #      | 973915954999644162 | https://twitter.com/LetsTalkFF/status/973915954999644162      |
|            | 2018-03-14 08:37 |          0 |           0 | Thanks for staying home #53. You made too many big plays to be allowed to walk out the door. @ NigelBradham_13 # FlyEaglesFly                                         |       | @          | #53 #      | 973915953762205696 | https://twitter.com/Francoo91/status/973915953762205696       |
|            | 2018-03-14 08:37 |          4 |          33 | Eagles biggest free agents from start of 2017 season: Alshon Jeffery Tim Jernigan Nigel Bradham All signed. Thank Howie Roseman # Eagles                              |       |            | #          | 973915921621372934 | https://twitter.com/JeffKerr247/status/973915921621372934     |
|            | 2018-03-14 08:36 |          0 |           0 | RT @ RapSheet: From @ gmfb: The # Eagles agreed to terms with LB Nigel Bradham on a 5-year, $40M deal to keep a important part of their D. pic.twitter.com/RlNwIifaqq |       | @ @        | #          | 973915837429157888 | https://twitter.com/JazOuttaControl/status/973915837429157888 |


Table #2
Filename: source_1.csv
Sample Rows in Markdown:
| username   | date             |   retweets |   favorites | text                                                                                                                                                | geo   | mentions                                           | hashtags   |          id | permalink                                                     |
|:-----------|:-----------------|-----------:|------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------|:------|:---------------------------------------------------|:-----------|------------:|:--------------------------------------------------------------|
|            | 2012-05-04 14:38 |          1 |           0 | # FF @ cponder7 @ Corey_Clark @ CoachColey @CoachDCraig @dkanell13 @Warchant_DC @ EveretteBrown @ NigelBradham_13 @ os_coleyharvey @ P5White        |       | @ @ @ @CoachDCraig @dkanell13 @Warchant_DC @ @ @ @ | #          | 1.98497e+17 | https://twitter.com/FSUPros/status/198496718210351105         |
|            | 2012-05-04 09:26 |          0 |           0 | Bills Draft Picks: Nigel Bradham, Ron Brooks, Zebrie Sanders Scouting Reports: Buffalo Rumblings » N... http://bit.ly/Kfm7K2 # nfl # bills          |       |                                                    | # #        | 1.98418e+17 | https://twitter.com/LoyalNFLFans/status/198418336462282752    |
|            | 2012-05-04 08:18 |          0 |           0 | # nfl # bills Bills Draft Picks: Nigel Bradham, Ron Brooks, Zebrie Sanders Scouting Reports: Buffalo Rumblings » N... http://bit.ly/J3sFJM          |       |                                                    | # #        | 1.98401e+17 | https://twitter.com/Football_Fanz/status/198401194039836672   |
|            | 2012-05-04 08:03 |          0 |           0 | Buffalo Rumblings >> Bills Draft Picks: Nigel Bradham, Ron Brooks, Zebrie Sanders Scouting Reports http://buzztap.com/-6SR061                       |       |                                                    |            | 1.98398e+17 | https://twitter.com/billsbuzztap/status/198397522128019456    |
|            | 2012-05-04 07:36 |          0 |           0 | Buffalo Rumblings: Bills Draft Picks: Nigel Bradham, Ron Brooks, Zebrie Sanders Scouting Reports http://bit.ly/J3igxH                               |       |                                                    |            | 1.98391e+17 | https://twitter.com/BillsPulse/status/198390696594505731      |
|            | 2012-05-04 07:34 |          0 |           0 | Any idea the number Bradham will wear? RT @ BuffRumblings: 2012 # Bills Draft Picks: Nigel Bradham, Ron Brooks, Zebrie Sanders Scouting Report      |       | @                                                  | #          | 1.9839e+17  | https://twitter.com/BeckerBoy/status/198390057298702337       |
|            | 2012-05-04 07:30 |          1 |           0 | SB Nation - Buffalo Rumblings: Bills Draft Picks: Nigel Bradham, Ron Brooks, http://ffd.me/Kv72S9 # billsmafia # bills                              |       |                                                    | # #        | 1.98389e+17 | https://twitter.com/billsfeedr/status/198389207151034368      |
|            | 2012-05-04 07:29 |          0 |           0 | Dia de seguir os jogadores draftados pelo # Bills: @ BumpNrunGilm0re @Midnightryder6 @ NigelBradham_13 @ tankcarder @ johnmpotter # FF # BillsMafia |       | @ @Midnightryder6 @ @ @                            | # # #      | 1.98389e+17 | https://twitter.com/BillsBrazil/status/198388972072878080     |
|            | 2012-05-04 07:23 |          0 |           0 | BuffaloRumblings>>> Bills Draft Picks: Nigel Bradham, Ron Brooks, Zebrie Sanders Scouting Reports http://bit.ly/yjZvtb                              |       |                                                    |            | 1.98387e+17 | https://twitter.com/BuffaloBillsZap/status/198387392745455617 |
|            | 2012-05-04 07:23 |          0 |           0 | BuffaloRumblings: Bills Draft Picks: Nigel Bradham, Ron Brooks, Zebrie Sanders Scouting Reports http://bit.ly/wiKhE5                                |       |                                                    |            | 1.98387e+17 | https://twitter.com/BillsZap/status/198387392531546112        |


Table #3
Filename: source_2.csv
Sample Rows in Markdown:
| username   | date             |   retweets |   favorites | text                                                                                                                                     | geo   | mentions   | hashtags   |                 id | permalink                                                     |
|:-----------|:-----------------|-----------:|------------:|:-----------------------------------------------------------------------------------------------------------------------------------------|:------|:-----------|:-----------|-------------------:|:--------------------------------------------------------------|
|            | 2016-03-15 18:54 |          0 |           0 | Dat boy @ NigelBradham_13 wit da eagles                                                                                                  |       | @          |            | 709890545804578816 | https://twitter.com/3k10Milk/status/709890545804578816        |
|            | 2016-03-15 16:31 |          0 |           0 | Nigel Bradham Highlights Welcome To Philly" http://dlvr.it/KnnmTR"                                                                       |       |            |            | 709854476161540096 | https://twitter.com/Reddit_Eagles/status/709854476161540096   |
|            | 2016-03-15 13:11 |          1 |           1 | # PhiladelphiaEagles # Video Inside The Studio: Nigel Bradham # FlyEaglesFly # Eagles http://dld.bz/euv5A                                |       |            | # # # #    | 709804204831936512 | https://twitter.com/PhilEaglesViews/status/709804204831936512 |
|            | 2016-03-15 12:34 |          0 |           0 | [NFL: Philadelphia Eagles] - Inside The Studio: Nigel Bradham http://ift.tt/1LoLInK                                                      |       |            |            | 709794897558163456 | https://twitter.com/NFL_FanTeam_Ldr/status/709794897558163456 |
|            | 2016-03-15 12:30 |          1 |           0 | # NFL FSU Football: Nigel Bradham signs with Philadelphia # Eagles http://wp.me/p78OgF-jgc pic.twitter.com/VHcopxrJB9                    |       |            | # #        | 709794010647277568 | https://twitter.com/Eagles_FZ/status/709794010647277568       |
|            | 2016-03-15 12:23 |          0 |           0 | http://philadelphiaeagles.com >> Inside The Studio: Nigel Bradham http://buzztap.com/-G6r413                                             |       |            |            | 709792192181575680 | https://twitter.com/eaglesbuzztap/status/709792192181575680   |
|            | 2016-03-15 12:22 |          0 |           1 | @ walterfootball Nigel Bradham signing grade next please and thank you                                                                   |       | @          |            | 709791992507539457 | https://twitter.com/patburnett3/status/709791992507539457     |
|            | 2016-03-15 10:25 |          0 |           0 | @ walterfootball grade the Nigel Bradham signing please. contract details came through last night. Check out @ RoobCSN from 11 hours ago |       | @ @        |            | 709762360076931074 | https://twitter.com/patburnett3/status/709762360076931074     |
|            | 2016-03-15 09:21 |          0 |           0 | Joueurs signés : Brandon Brooks (OG) Rodney McLeod (S) Ron Brooks (CB) Leodis McKelvin (CB) Nigel Bradham (LB)                           |       |            |            | 709746312481210368 | https://twitter.com/EaglesFR/status/709746312481210368        |
|            | 2016-03-15 07:57 |          0 |           0 | @ nflnetwork # FASuccess Nigel bradham                                                                                                   |       | @          | #          | 709725295436296192 | https://twitter.com/ImExponents/status/709725295436296192     |


Target Schema:
| username   | date             |   retweets |   favorites | text                                                                                  | geo   | mentions   | hashtags   |          id | permalink                                                     |
|:-----------|:-----------------|-----------:|------------:|:--------------------------------------------------------------------------------------|:------|:-----------|:-----------|------------:|:--------------------------------------------------------------|
|            | 2018-03-19 20:42 |          0 |           0 | I think I shed a tear when the news of your extension broke...                        |       |            |            | 9.7591e+17  | https://twitter.com/PatrickLeipzig2/status/975910387836170241 |
|            | 2018-03-19 20:11 |          0 |           0 | Tackling machine is going to be here for a while!!!                                   |       |            |            | 9.75903e+17 | https://twitter.com/mahl1334/status/975902549147561984        |
|            | 2018-03-19 20:08 |          0 |           0 | Glad your back. Kick me some ass. Fly Eagles Fly.                                     |       |            |            | 9.75902e+17 | https://twitter.com/ConshyBob8/status/975901984921391108      |
|            | 2018-03-19 20:08 |          0 |           0 | So Glad u stayed. Let's get another ring. # FlyEaglesFly                              |       |            | #          | 9.75902e+17 | https://twitter.com/MAnzio77/status/975901826401951745        |
|            | 2018-03-19 20:03 |          0 |           0 | Look forward to seeing you play next season                                           |       |            |            | 9.75901e+17 | https://twitter.com/bmbsqd4/status/975900600947871749         |
|            | 2018-03-19 19:52 |          0 |           3 | I love Nigel Bradham! https://twitter.com/NigelBradham_13/status/975874824869466112 … |       |            |            | 9.75898e+17 | https://twitter.com/Kathyinthe850/status/975897814667587584   |
|            | 2018-03-19 19:00 |          0 |           0 | So stoked your back bro!!! Can’t wait til Sept 6. # FlyEaglesFly                      |       |            | #          | 9.75885e+17 | https://twitter.com/jmargophoto/status/975884747770544128     |
|            | 2018-03-19 18:55 |          0 |           0 | Big year for you this season I can feel it                                            |       |            |            | 9.75883e+17 | https://twitter.com/nancyarobinson1/status/975883420269268992 |
|            | 2018-03-19 18:43 |          0 |           0 |                                                                                       |       |            |            | 9.7588e+17  | https://twitter.com/ThisisWill__/status/975880354304315392    |
|            | 2018-03-19 18:31 |          0 |           0 | My guy # flyeaglesfly                                                                 |       |            | #          | 9.75877e+17 | https://twitter.com/glockboyzrah/status/975877448746270721    |

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