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:
|   Timestamp [ms] |   CPU cores |   CPU capacity provisioned [MHZ] |   CPU usage [MHZ] |   CPU usage [%] |   Memory capacity provisioned [KB] |   Memory usage [KB] |   Disk read throughput [KB/s] |   Disk write throughput [KB/s] |   Network received throughput [KB/s] |   Network transmitted throughput [KB/s] |
|-----------------:|------------:|---------------------------------:|------------------:|----------------:|-----------------------------------:|--------------------:|------------------------------:|-------------------------------:|-------------------------------------:|----------------------------------------:|
|      1.37755e+09 |           1 |                             2600 |           0       |        0        |                        4.05504e+06 |                 0   |                             0 |                      0         |                              0       |                                 0       |
|      1.37696e+09 |           1 |                             2600 |           0       |        0        |                        4.05504e+06 |             19572   |                             0 |                      0         |                              0       |                                 0       |
|      1.37778e+09 |           1 |                             2600 |           0       |        0        |                        4.05504e+06 |                 0   |                             0 |                      0         |                              0       |                                 0       |
|      1.37621e+09 |           1 |                             2600 |           0       |        0        |                        4.05504e+06 |             41940   |                             0 |                     18.3333    |                              1.66667 |                                 1.33333 |
|      1.37551e+09 |           1 |                             2600 |           8.66666 |        0.333333 |                        4.05504e+06 |             16776.8 |                             0 |                     15.4       |                             12.8     |                                 0       |
|      1.37588e+09 |           1 |                             2600 |          10.4     |        0.4      |                        4.05504e+06 |            405448   |                           873 |                      0.0666667 |                              4.8     |                              1359.4     |
|      1.37685e+09 |           1 |                             2600 |           0       |        0        |                        4.05504e+06 |                 0   |                             0 |                      0         |                              0       |                                 0       |
|      1.3754e+09  |           1 |                             2600 |           0       |        0        |                        4.05504e+06 |              5592   |                             0 |                     33.4       |                             29.0667  |                                 0       |
|      1.37552e+09 |           1 |                             2600 |           0       |        0        |                        4.05504e+06 |                 0   |                             0 |                     18.7333    |                             16.2     |                                 0       |
|      1.37614e+09 |           1 |                             2600 |           0       |        0        |                        4.05504e+06 |                 0   |                             0 |                      0         |                              0       |                                 0       |


Table #2
Filename: source_1.csv
Sample Rows in Markdown:
|   Timestamp [ms] |   CPU cores |   CPU capacity provisioned [MHZ] |   CPU usage [MHZ] |   CPU usage [%] |   Memory capacity provisioned [KB] |   Memory usage [KB] |   Disk read throughput [KB/s] |   Disk write throughput [KB/s] |   Network received throughput [KB/s] |   Network transmitted throughput [KB/s] |
|-----------------:|------------:|---------------------------------:|------------------:|----------------:|-----------------------------------:|--------------------:|------------------------------:|-------------------------------:|-------------------------------------:|----------------------------------------:|
|      1.37661e+09 |           4 |                            10400 |         1407.47   |       13.5333   |                        1.63389e+07 |         2.14748e+06 |                             0 |                     83.9333    |                           29.8       |                                1.8      |
|      1.37674e+09 |           4 |                            10400 |           29.4667 |        0.283333 |                        1.63389e+07 |     33554.4         |                             0 |                      0         |                            0         |                                1        |
|      1.37713e+09 |           4 |                            10400 |           62.4    |        0.6      |                        1.63389e+07 |         0           |                             0 |                      0.0666667 |                            0         |                                1        |
|      1.37721e+09 |           4 |                            10400 |        10725.9    |      103.133    |                        1.63389e+07 |    760566           |                             0 |                      0.133333  |                            0         |                                0.333333 |
|      1.37787e+09 |           4 |                            10400 |        10592.4    |      101.85     |                        1.63434e+07 |         1.31981e+06 |                             0 |                      0.133333  |                            0         |                                0.4      |
|      1.37556e+09 |           4 |                            10400 |        10781.3    |      103.667    |                        1.63389e+07 |         4.11601e+06 |                             0 |                      0.8       |                            0         |                                0.466667 |
|      1.37744e+09 |           4 |                            10400 |          123.067  |        1.18333  |                        1.6341e+07  |    894784           |                             0 |                      3.4       |                            0         |                                1        |
|      1.37602e+09 |           4 |                            10400 |           26      |        0.25     |                        1.63389e+07 |         0           |                             0 |                      3.06667   |                            0.0666667 |                                1.06667  |
|      1.37552e+09 |           4 |                            10400 |         8460.4    |       81.35     |                        1.63389e+07 |    760566           |                             0 |                      6.6       |                            0.333333  |                                1.06667  |
|      1.37538e+09 |           4 |                            10400 |         2787.2    |       26.8      |                        1.63389e+07 |    234881           |                             0 |                      0.2       |                            0         |                                1        |


Table #3
Filename: source_2.csv
Sample Rows in Markdown:
|   Timestamp [ms] |   CPU cores |   CPU capacity provisioned [MHZ] |   CPU usage [MHZ] |   CPU usage [%] |   Memory capacity provisioned [KB] |   Memory usage [KB] |   Disk read throughput [KB/s] |   Disk write throughput [KB/s] |   Network received throughput [KB/s] |   Network transmitted throughput [KB/s] |
|-----------------:|------------:|---------------------------------:|------------------:|----------------:|-----------------------------------:|--------------------:|------------------------------:|-------------------------------:|-------------------------------------:|----------------------------------------:|
|      1.37669e+09 |           1 |                             2600 |           34.6667 |        1.33333  |                        2.09715e+06 |              162178 |                             0 |                        8.2     |                             16.4667  |                                13.1333  |
|      1.3772e+09  |           1 |                             2600 |           48.5333 |        1.86667  |                        2.09715e+06 |              170567 |                             0 |                        9.86667 |                             16.1333  |                                12.7333  |
|      1.3776e+09  |           1 |                             2600 |           38.1333 |        1.46667  |                        2.09715e+06 |              192936 |                             0 |                        8.73333 |                             11.2667  |                                11.7333  |
|      1.37703e+09 |           1 |                             2600 |           52      |        2        |                        2.09715e+06 |              164975 |                             0 |                        9.13333 |                             24.7333  |                                17.7333  |
|      1.37617e+09 |           1 |                             2600 |           20.8    |        0.8      |                        2.09715e+06 |              128624 |                             0 |                        8.26667 |                              4.86667 |                                 2.8     |
|      1.37659e+09 |           1 |                             2600 |           34.6667 |        1.33333  |                        2.09715e+06 |              145401 |                             0 |                        8.53333 |                             15.6667  |                                11.3333  |
|      1.37655e+09 |           1 |                             2600 |           26      |        1        |                        2.09715e+06 |              127226 |                             0 |                        8.26667 |                              1.73333 |                                 3.53333 |
|      1.37619e+09 |           1 |                             2600 |           24.2667 |        0.933333 |                        2.09715e+06 |              209713 |                             0 |                        8       |                              1.26667 |                                 2.46667 |
|      1.37606e+09 |           1 |                             2600 |           22.5333 |        0.866667 |                        2.09715e+06 |              153790 |                             0 |                        8.13333 |                              2.06667 |                                 3.86667 |
|      1.37639e+09 |           1 |                             2600 |           31.2    |        1.2      |                        2.09715e+06 |              130022 |                             0 |                        7.93333 |                              1.66667 |                                 3       |


Table #4
Filename: source_3.csv
Sample Rows in Markdown:
|   Timestamp [ms] |   CPU cores |   CPU capacity provisioned [MHZ] |   CPU usage [MHZ] |   CPU usage [%] |   Memory capacity provisioned [KB] |   Memory usage [KB] |   Disk read throughput [KB/s] |   Disk write throughput [KB/s] |   Network received throughput [KB/s] |   Network transmitted throughput [KB/s] |
|-----------------:|------------:|---------------------------------:|------------------:|----------------:|-----------------------------------:|--------------------:|------------------------------:|-------------------------------:|-------------------------------------:|----------------------------------------:|
|      1.37624e+09 |           4 |                            11704 |           218.475 |         1.86667 |                        1.67035e+07 |    156587           |                             0 |                       12.4667  |                              4.53333 |                               0.0666667 |
|      1.37599e+09 |           4 |                            11704 |           204.82  |         1.75    |                        1.67035e+07 |    301990           |                             0 |                       12.4667  |                              4.66667 |                               0         |
|      1.37553e+09 |           4 |                            11704 |           202.869 |         1.73333 |                        1.67035e+07 |    223696           |                             0 |                       12       |                              4.33333 |                               0.0666667 |
|      1.37758e+09 |           4 |                            11704 |           236.031 |         2.01667 |                        1.67035e+07 |    167772           |                             0 |                       12.4     |                              4.6     |                               0.0666667 |
|      1.37653e+09 |           4 |                            11704 |           224.327 |         1.91667 |                        1.67035e+07 |    279620           |                             0 |                        9.06667 |                              0       |                               0.133333  |
|      1.37551e+09 |           4 |                            11704 |           197.017 |         1.68333 |                        1.67035e+07 |         0           |                             0 |                       12.2667  |                              4.46667 |                               0.0666667 |
|      1.37575e+09 |           4 |                            11704 |           969.481 |         8.28333 |                        1.67035e+07 |         1.77838e+06 |                             0 |                       17       |                            102       |                              37.0667    |
|      1.37685e+09 |           4 |                            11704 |           185.313 |         1.58333 |                        1.67035e+07 |    111848           |                             0 |                        3       |                              0       |                               0         |
|      1.37558e+09 |           4 |                            11704 |           228.228 |         1.95    |                        1.67035e+07 |    178957           |                             0 |                       25.0667  |                             11.4667  |                               2.86667   |
|      1.37615e+09 |           4 |                            11704 |           212.623 |         1.81667 |                        1.67035e+07 |    190142           |                             0 |                       12.2     |                              4.73333 |                               0         |


Table #5
Filename: source_4.csv
Sample Rows in Markdown:
|   Timestamp [ms] |   CPU cores |   CPU capacity provisioned [MHZ] |   CPU usage [MHZ] |   CPU usage [%] |   Memory capacity provisioned [KB] |   Memory usage [KB] |   Disk read throughput [KB/s] |   Disk write throughput [KB/s] |   Network received throughput [KB/s] |   Network transmitted throughput [KB/s] |
|-----------------:|------------:|---------------------------------:|------------------:|----------------:|-----------------------------------:|--------------------:|------------------------------:|-------------------------------:|-------------------------------------:|----------------------------------------:|
|      1.37747e+09 |           1 |                             2600 |           65.8666 |        2.53333  |                        2.09715e+06 |              383078 |                     0         |                       10.7333  |                             0.6      |                                2.33333  |
|      1.37585e+09 |           1 |                             2600 |           31.2    |        1.2      |                        2.09715e+06 |              121634 |                     0.133333  |                        8.86667 |                             1.13333  |                                7.6      |
|      1.37734e+09 |           1 |                             2600 |           62.4    |        2.4      |                        2.09715e+06 |              299192 |                     0.0666667 |                       11.0667  |                             0.4      |                                2.2      |
|      1.37782e+09 |           1 |                             2600 |          239.2    |        9.2      |                        2.09715e+06 |              465566 |                     0.0666667 |                       12.5333  |                             2.2      |                                4.53333  |
|      1.37595e+09 |           1 |                             2600 |           31.2    |        1.2      |                        2.09715e+06 |              155187 |                     0.0666667 |                        7.73333 |                             0.133333 |                                1.26667  |
|      1.37535e+09 |           1 |                             2600 |           58.9333 |        2.26667  |                        2.09715e+06 |              553647 |                     0.4       |                       14.3333  |                             1        |                                0.733333 |
|      1.37604e+09 |           1 |                             2600 |           29.4667 |        1.13333  |                        2.09715e+06 |              134217 |                     0.0666667 |                        7.2     |                             0.266667 |                                1.53333  |
|      1.37639e+09 |           1 |                             2600 |           29.4667 |        1.13333  |                        2.09715e+06 |              144004 |                     0         |                        7.13333 |                             0        |                                1.06667  |
|      1.37687e+09 |           1 |                             2600 |           31.2    |        1.2      |                        2.09715e+06 |              171965 |                     0         |                        6.93333 |                             0        |                                1.4      |
|      1.37569e+09 |           1 |                             2600 |           17.3333 |        0.666667 |                        2.09715e+06 |              120235 |                     0.0666667 |                        6.93333 |                             0        |                                0.4      |


Table #6
Filename: source_5.csv
Sample Rows in Markdown:
|   Timestamp [ms] |   CPU cores |   CPU capacity provisioned [MHZ] |   CPU usage [MHZ] |   CPU usage [%] |   Memory capacity provisioned [KB] |   Memory usage [KB] |   Disk read throughput [KB/s] |   Disk write throughput [KB/s] |   Network received throughput [KB/s] |   Network transmitted throughput [KB/s] |
|-----------------:|------------:|---------------------------------:|------------------:|----------------:|-----------------------------------:|--------------------:|------------------------------:|-------------------------------:|-------------------------------------:|----------------------------------------:|
|      1.37784e+09 |           4 |                            10400 |           188.933 |         1.81667 |                        5.66886e+06 |             78293.6 |                             0 |                       12.6667  |                              4.6     |                                       0 |
|      1.37687e+09 |           4 |                            10400 |           168.133 |         1.61667 |                        3.00646e+06 |                 0   |                             0 |                        3.13333 |                              0       |                                       0 |
|      1.37534e+09 |           4 |                            10400 |           187.2   |         1.8     |                        1.67035e+07 |            201326   |                             0 |                       12.2     |                              4.4     |                                       0 |
|      1.37684e+09 |           4 |                            10400 |           161.2   |         1.55    |                        3.00646e+06 |             33554.4 |                             0 |                        2.66667 |                              0       |                                       0 |
|      1.3767e+09  |           4 |                            10400 |           176.8   |         1.7     |                        3.00646e+06 |             33554.4 |                             0 |                        2.6     |                              0       |                                       0 |
|      1.37626e+09 |           4 |                            10400 |           192.4   |         1.85    |                        2.22413e+06 |             33554.4 |                             0 |                       12.1333  |                              4.66667 |                                       0 |
|      1.37574e+09 |           4 |                            10400 |           223.6   |         2.15    |                        1.67035e+07 |            212511   |                             0 |                       13.1333  |                              4.2     |                                       0 |
|      1.37662e+09 |           4 |                            10400 |           176.8   |         1.7     |                        3.00646e+06 |             11184.8 |                             0 |                        2.53333 |                              0       |                                       0 |
|      1.37617e+09 |           4 |                            10400 |           199.333 |         1.91667 |                        2.22413e+06 |            223696   |                             0 |                       12.2667  |                              4.46667 |                                       0 |
|      1.37668e+09 |           4 |                            10400 |           166.4   |         1.6     |                        3.00646e+06 |             33554.4 |                             0 |                        2.33333 |                              0       |                                       0 |


Target Schema:
|   Timestamp [ms] |   CPU cores |   CPU capacity provisioned [MHZ] |   CPU usage [MHZ] |   CPU usage [%] |   Memory capacity provisioned [KB] |   Memory usage [KB] |   Disk read throughput [KB/s] |   Disk write throughput [KB/s] |   Network received throughput [KB/s] |   Network transmitted throughput [KB/s] | Timestamp           |
|-----------------:|------------:|---------------------------------:|------------------:|----------------:|-----------------------------------:|--------------------:|------------------------------:|-------------------------------:|-------------------------------------:|----------------------------------------:|:--------------------|
|       1376240440 |           4 |                            11704 |           218.475 |         1.86667 |                           16703488 |    156587           |                             0 |                       12.4667  |                              4.53333 |                               0.0666667 | 2013-08-11 17:00:40 |
|       1375989619 |           4 |                            11704 |           204.82  |         1.75    |                           16703488 |    301990           |                             0 |                       12.4667  |                              4.66667 |                               0         | 2013-08-08 19:20:19 |
|       1375534779 |           4 |                            11704 |           202.869 |         1.73333 |                           16703488 |    223696           |                             0 |                       12       |                              4.33333 |                               0.0666667 | 2013-08-03 12:59:39 |
|       1377584577 |           4 |                            11704 |           236.031 |         2.01667 |                           16703488 |    167772           |                             0 |                       12.4     |                              4.6     |                               0.0666667 | 2013-08-27 06:22:57 |
|       1376532366 |           4 |                            11704 |           224.327 |         1.91667 |                           16703488 |    279620           |                             0 |                        9.06667 |                              0       |                               0.133333  | 2013-08-15 02:06:06 |
|       1375512877 |           4 |                            11704 |           197.017 |         1.68333 |                           16703488 |         0           |                             0 |                       12.2667  |                              4.46667 |                               0.0666667 | 2013-08-03 06:54:37 |
|       1375750798 |           4 |                            11704 |           969.481 |         8.28333 |                           16703488 |         1.77838e+06 |                             0 |                       17       |                            102       |                              37.0667    | 2013-08-06 00:59:58 |
|       1376850096 |           4 |                            11704 |           185.313 |         1.58333 |                           16703488 |    111848           |                             0 |                        3       |                              0       |                               0         | 2013-08-18 18:21:36 |
|       1375582484 |           4 |                            11704 |           228.228 |         1.95    |                           16703488 |    178957           |                             0 |                       25.0667  |                             11.4667  |                               2.86667   | 2013-08-04 02:14:44 |
|       1376147733 |           4 |                            11704 |           212.623 |         1.81667 |                           16703488 |    190142           |                             0 |                       12.2     |                              4.73333 |                               0         | 2013-08-10 15:15:33 |

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
source_5.csv
test: test_0.csv
test_1.csv
test_2.csv
test_3.csv
test_4.csv
test_5.csv