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:
| 0                     | 1      | 2                                                              |   3 |     4 | 5   | 6                                                                                                                                                                                |    7 | 8   |
|:----------------------|:-------|:---------------------------------------------------------------|----:|------:|:----|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----:|:----|
| [12/Mar/2017:20:40:00 | +0100] | GET /history/apollo/apollo-13/images/70HC314.GIF HTTP/1.0      | 200 |  3100 | -   | loic loic 128.203.13.237 0 Mozilla/5.0 (Windows; U; Windows NT 6.0; sv-SE) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1                                |  874 | -   |
| [18/Apr/2017:07:20:00 | +0200] | GET /shuttle/ HTTP/1.0                                         | 200 | 11378 | -   | ted ted 128.162.211.17 0 Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko                                                                                |  540 | -   |
| [06/Nov/2017:15:40:00 | +0100] | GET /shuttle/missions/sts-71/images/KSC-95EC-0871.gif HTTP/1.0 | 200 | 18476 | -   | leo leo 189.119.131.40 0 Mozilla/5.0 (Windows; U; Windows NT 6.0; sv-SE) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1                                  |  531 | -   |
| [19/Aug/2017:14:55:00 | +0200] | GET /history/ HTTP/1.0                                         | 200 | 11760 | -   | alice alice 128.194.49.7 0 Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/4.0; GTB7.4; InfoPath.3; SV1; .NET CLR 3.1.76908; WOW64; en-US)                            |  596 | -   |
| [06/Nov/2017:23:45:00 | +0100] | GET /history/apollo/apollo-11/images/ HTTP/1.0                 | 200 | 21877 | -   | ced ced 128.240.128.1 0 Mozilla/5.0 (Linux; Android 5.1.1; Nexus 5 Build/LMY48B; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/43.0.2357.65 Mobile Safari/537.36 |  628 | -   |
| [14/Aug/2017:17:40:00 | +0200] | GET /shuttle/missions/sts-71/images/KSC-95EC-0613.gif HTTP/1.0 | 200 | 27653 | -   | leo leo 128.228.41.30 0 Mozilla/5.0 (Windows; U; Windows NT 6.0; sv-SE) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1                                   |  391 | -   |
| [06/Dec/2017:05:30:00 | +0100] | GET /history/apollo/apollo-11/images/69HC680.GIF HTTP/1.0      | 200 |  5191 | -   | alice alice 128.107.81.37 0 Windows-RSS-Platform/2.0 (IE 11.0; Windows NT 6.1)                                                                                                   |  635 | -   |
| [20/Feb/2017:14:50:00 | +0100] | GET /history/mercury/ma-6/ma-6-patch-small.gif HTTP/1.0        | 200 | 15333 | -   | dimi dimi 128.62.138.239 0 Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko                                                                              |  453 | -   |
| [08/May/2017:08:30:00 | +0200] | GET /shuttle/missions/sts-37/sts-37-patch-small.gif HTTP/1.0   | 200 | 21251 | -   | ced iloveyou 189.145.150.68 1 Windows-RSS-Platform/2.0 (IE 11.0; Windows NT 6.1)                                                                                                 | 1225 | -   |
| [18/Nov/2017:04:25:00 | +0100] | GET /shuttle/missions/sts-72/sts-72-patch-small.gif HTTP/1.0   | 200 | 25931 | -   | ced ced 189.159.131.21 0 Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/4.0; GTB7.4; InfoPath.3; SV1; .NET CLR 3.1.76908; WOW64; en-US)                              |  847 | -   |


Target Schema:
| 0                     | 1      | 2                                                           |   3 |     4 | 5   | 6                                                                                                                                                                          |   7 | 8   | date        |   hour |   minute |   seconds |   zone |
|:----------------------|:-------|:------------------------------------------------------------|----:|------:|:----|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----:|:----|:------------|-------:|---------:|----------:|-------:|
| [10/May/2017:01:40:00 | +0200] | GET /shuttle/resources/orbiters/endeavour-logo.gif HTTP/1.0 | 200 |  8758 | -   | ced ced 189.237.233.211 0 Mozilla/5.0 (Windows; U; Windows NT 6.0; sv-SE) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1                           | 798 | -   | 10/May/2017 |      1 |       40 |         0 |    200 |
| [10/Jun/2017:23:55:00 | +0200] | GET /cgi-bin/imagemap/countdown?99,173 HTTP/1.0             | 200 | 25104 | -   | hacker hacker 128.15.214.185 0 Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/4.0; GTB7.4; InfoPath.3; SV1; .NET CLR 3.1.76908; WOW64; en-US)                  | 377 | -   | 10/Jun/2017 |     23 |       55 |         0 |    200 |
| [29/Jan/2017:01:25:00 | +0100] | GET /shuttle/countdown/countdown.html HTTP/1.0              | 200 | 13446 | -   | julien julien 189.224.214.185 0 Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/4.0; GTB7.4; InfoPath.3; SV1; .NET CLR 3.1.76908; WOW64; en-US)                 | 567 | -   | 29/Jan/2017 |      1 |       25 |         0 |    100 |
| [21/Jul/2017:11:00:00 | +0200] | GET /cgi-bin/imagemap/countdown?375,272 HTTP/1.0            | 200 | 20899 | -   | bob bob 128.247.34.123 0 Windows-RSS-Platform/2.0 (IE 11.0; Windows NT 6.1)                                                                                                | 611 | -   | 21/Jul/2017 |     11 |        0 |         0 |    200 |
| [02/Nov/2017:16:35:00 | +0100] | GET /images/WORLD-logosmall.gif HTTP/1.0                    | 200 |  9731 | -   | alice alice 128.191.191.42 0 Mozilla/5.0 (iPad; U; CPU OS 4_3_5 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5   | 592 | -   | 02/Nov/2017 |     16 |       35 |         0 |    100 |
| [10/Aug/2017:01:25:00 | +0200] | GET /cgi-bin/imagemap/countdown?99,113 HTTP/1.0             | 200 | 27960 | -   | dimi dimi 128.231.112.195 0 Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/4.0; GTB7.4; InfoPath.3; SV1; .NET CLR 3.1.76908; WOW64; en-US)                     | 847 | -   | 10/Aug/2017 |      1 |       25 |         0 |    200 |
| [31/May/2017:21:05:00 | +0200] | GET /pub/winvn/readme.txt HTTP/1.0                          | 200 | 17938 | -   | julien julien 128.241.194.70 0 Mozilla/5.0 (iPad; U; CPU OS 4_3_5 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5 | 468 | -   | 31/May/2017 |     21 |        5 |         0 |    200 |
| [07/Jun/2017:19:50:00 | +0200] | GET /cgi-bin/imagemap/countdown?99,176 HTTP/1.0             | 200 | 17110 | -   | phil phil 128.178.212.82 0 Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko                                                                        | 666 | -   | 07/Jun/2017 |     19 |       50 |         0 |    200 |
| [30/Jan/2017:20:50:00 | +0100] | GET /software HTTP/1.0                                      | 200 | 29780 | -   | jerome jerome 128.226.31.178 0 Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko                                                                    | 487 | -   | 30/Jan/2017 |     20 |       50 |         0 |    100 |
| [17/Feb/2017:20:20:00 | +0100] | GET /shuttle/countdown/lps/fr.html HTTP/1.0                 | 200 | 16702 | -   | leo leo 128.118.44.103 0 Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko                                                                          | 857 | -   | 17/Feb/2017 |     20 |       20 |         0 |    100 |

Return only the final code in markdown codeblock format, without any additional text or explanation. 



target: target.csv
train: source_0.csv
test: test_0.csv