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   |
|:----------------------|:-------|:--------------------------------------------------------------------|----:|------:|:----|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----:|:----|
| [04/Mar/2017:10:45:00 | +0100] | GET /shuttle/missions/sts-71/sts-71-info.html HTTP/1.0              | 200 |  8166 | -   | ced ced 128.7.144.55 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        |  855 | -   |
| [11/Sep/2017:17:55:00 | +0200] | GET /shuttle/missions/sts-68/images/ksc-upclose.gif HTTP/1.0        | 200 | 21143 | -   | phil phil 128.86.66.157 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)                                   |  645 | -   |
| [27/Apr/2017:17:25:00 | +0200] | GET /shuttle/missions/51-l/51-l-info.html HTTP/1.0                  | 200 | 15665 | -   | leo leo 189.178.12.63 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)                                     |  849 | -   |
| [26/Apr/2017:01:20:00 | +0200] | GET /cgi-bin/imagemap/countdown?99,213 HTTP/1.0                     | 200 |  3565 | -   | leo leo 128.178.79.197 0 Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko                                                                                      |  368 | -   |
| [11/Aug/2017:01:45:00 | +0200] | GET /cgi-bin/imagemap/countdown?100,114 HTTP/1.0                    | 200 | 28674 | -   | loic password 189.29.151.83 1 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 | 1474 | -   |
| [29/Apr/2017:05:20:00 | +0200] | GET /shuttle/missions/sts-71/images/KSC-95EC-0443.gif HTTP/1.0      | 200 | 14377 | -   | bob bob 128.201.193.74 0 Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko                                                                                      |  679 | -   |
| [14/Jul/2017:22:50:00 | +0200] | GET /shuttle/missions/100th.html HTTP/1.0                           | 200 | 28075 | -   | leo leo 128.128.130.47 0 Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko                                                                                      |  540 | -   |
| [24/Mar/2017:22:00:00 | +0100] | GET /shuttle/missions/sts-71/movies/crew-arrival-t38.mpg HTTP/1.0   | 200 |  2320 | -   | geoff geoff 128.128.113.128 0 Windows-RSS-Platform/2.0 (IE 11.0; Windows NT 6.1)                                                                                                       |  740 | -   |
| [23/Nov/2017:02:10:00 | +0100] | GET /shuttle/missions/sts-71/sts-71-day-03-highlights.html HTTP/1.0 | 200 | 17096 | -   | bob bob 189.155.209.197 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                                       |  457 | -   |
| [14/Dec/2017:20:15:00 | +0100] | GET /cgi-bin/imagemap/countdown?302,275 HTTP/1.0                    | 200 | 23684 | -   | frank 555555 189.244.2.76 1 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   |  767 | -   |


Target Schema:
| 0                     | 1      | 2                                                              |   3 |     4 | 5   | 6                                                                                                                                                         |   7 | 8   | date        |   hour |   minute |   seconds | zone   |
|:----------------------|:-------|:---------------------------------------------------------------|----:|------:|:----|:----------------------------------------------------------------------------------------------------------------------------------------------------------|----:|:----|:------------|-------:|---------:|----------:|:-------|
| [27/May/2017:06:30:00 | +0200] | GET /shuttle/missions/sts-71/images/images.html HTTP/1.0       | 200 | 13618 | -   | phil phil 128.198.84.207 0 Windows-RSS-Platform/2.0 (IE 11.0; Windows NT 6.1)                                                                             | 343 | -   | 27/May/2017 |      6 |       30 |         0 | 0200]  |
| [27/Oct/2017:03:50:00 | +0200] | GET /shuttle/missions/sts-71/images/KSC-95EC-0869.jpg HTTP/1.0 | 200 | 22579 | -   | julien julien 128.49.220.252 0 Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko                                                   | 502 | -   | 27/Oct/2017 |      3 |       50 |         0 | 0200]  |
| [29/Jul/2017:00:55:00 | +0200] | GET /history/apollo/apollo-11/images/index.gif HTTP/1.0        | 200 | 26191 | -   | frank frank 189.67.112.15 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)    | 390 | -   | 29/Jul/2017 |      0 |       55 |         0 | 0200]  |
| [18/Aug/2017:14:25:00 | +0200] | GET /shuttle/missions/51-l/51-l-patch-small.gif HTTP/1.0       | 200 |  6009 | -   | julien julien 189.238.62.238 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) | 302 | -   | 18/Aug/2017 |     14 |       25 |         0 | 0200]  |
| [21/Dec/2017:22:10:00 | +0100] | GET /history/apollo/apollo-11/images/690700.GIF HTTP/1.0       | 200 |  3840 | -   | geoff geoff 128.53.202.6 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         | 347 | -   | 21/Dec/2017 |     22 |       10 |         0 | 0100]  |
| [20/Mar/2017:07:30:00 | +0100] | GET /cgi-bin/imagemap/countdown?102,174 HTTP/1.0               | 200 | 20288 | -   | geoff qwertyuiop 189.145.100.188 1 Windows-RSS-Platform/2.0 (IE 11.0; Windows NT 6.1)                                                                     | 628 | -   | 20/Mar/2017 |      7 |       30 |         0 | 0100]  |
| [26/May/2017:12:00:00 | +0200] | GET /cgi-bin/imagemap/countdown?102,174 HTTP/1.0               | 200 | 25915 | -   | ced ced 128.111.120.58 0 Windows-RSS-Platform/2.0 (IE 11.0; Windows NT 6.1)                                                                               | 722 | -   | 26/May/2017 |     12 |        0 |         0 | 0200]  |
| [03/Dec/2017:13:40:00 | +0100] | GET /shuttle/resources/orbiters/endeavour-logo.gif HTTP/1.0    | 200 |  1824 | -   | ted ted 128.181.33.87 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            | 470 | -   | 03/Dec/2017 |     13 |       40 |         0 | 0100]  |
| [25/Nov/2017:01:25:00 | +0100] | GET /shuttle/missions/sts-73/mission-sts-73.html HTTP/1.0      | 200 | 11415 | -   | hacker hacker 189.79.77.28 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)   | 423 | -   | 25/Nov/2017 |      1 |       25 |         0 | 0100]  |
| [09/Jun/2017:17:25:00 | +0200] | GET /images/construct.gif HTTP/1.0                             | 200 | 11806 | -   | julien julien 189.251.232.83 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) | 612 | -   | 09/Jun/2017 |     17 |       25 |         0 | 0200]  |

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