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.37785e+09 |           4 |                            10400 |           52      |        0.5      |                        1.63434e+07 |         0           |                             0 |                      0.133333  |                            0         |                                 1       |
|      1.37748e+09 |           4 |                            10400 |           45.0666 |        0.433333 |                        1.6341e+07  |         0           |                             0 |                      0         |                            0         |                                 1       |
|      1.37678e+09 |           4 |                            10400 |           27.7333 |        0.266667 |                        1.63389e+07 |         0           |                             0 |                      0.466667  |                            0         |                                 1       |
|      1.37599e+09 |           4 |                            10400 |          161.2    |        1.55     |                        1.63389e+07 |         6.01743e+06 |                             2 |                    112.6       |                           77.3333    |                                 1.73333 |
|      1.37649e+09 |           4 |                            10400 |          355.333  |        3.41667  |                        1.63389e+07 |         3.95942e+06 |                             0 |                      1.06667   |                            0.0666667 |                                 1       |
|      1.37705e+09 |           4 |                            10400 |           26      |        0.25     |                        1.63389e+07 |     22369.6         |                             0 |                      0.0666667 |                            0         |                                 1       |
|      1.37635e+09 |           4 |                            10400 |         8732.53   |       83.9667   |                        1.63389e+07 |         2.47184e+06 |                             0 |                      7.86667   |                            0.266667  |                                 0.6     |
|      1.3758e+09  |           4 |                            10400 |        10795.2    |      103.8      |                        1.63389e+07 |    671088           |                             0 |                      0.2       |                            0.333333  |                                 0.4     |
|      1.37556e+09 |           4 |                            10400 |         1161.33   |       11.1667   |                        1.63389e+07 |         5.23449e+06 |                             0 |                    132.8       |                          113.533     |                                 1.8     |
|      1.37699e+09 |           4 |                            10400 |         9044.53   |       86.9667   |                        1.63389e+07 |         5.9615e+06  |                             0 |                     18.9333    |                           11.3333    |                                 1.13333 |


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.37696e+09 |           1 |                             2600 |           52      |        2        |                        2.09715e+06 |              144003 |                             0 |                        8.2     |                             22.6667  |                                15.0667  |
|      1.37717e+09 |           1 |                             2600 |           46.8    |        1.8      |                        2.09715e+06 |              164974 |                             0 |                        8.66667 |                             16.1333  |                                12.6667  |
|      1.37705e+09 |           1 |                             2600 |           52      |        2        |                        2.09715e+06 |              153790 |                             0 |                        8.46667 |                             23.2     |                                16.0667  |
|      1.3766e+09  |           1 |                             2600 |           31.2    |        1.2      |                        2.09715e+06 |              171965 |                             0 |                        8.2     |                             15.9333  |                                11.7333  |
|      1.37692e+09 |           1 |                             2600 |           48.5333 |        1.86667  |                        2.09715e+06 |              164975 |                             0 |                        8.26667 |                             24.4     |                                18.2667  |
|      1.37778e+09 |           1 |                             2600 |           29.4667 |        1.13333  |                        2.09715e+06 |              157983 |                             0 |                        8.93333 |                              9.86667 |                                 9.6     |
|      1.37724e+09 |           1 |                             2600 |           46.8    |        1.8      |                        2.09715e+06 |              195732 |                             0 |                        8.33333 |                             16.1333  |                                12.2667  |
|      1.3771e+09  |           1 |                             2600 |           52      |        2        |                        2.09715e+06 |              174761 |                             0 |                        8.26667 |                             17.0667  |                                13.3333  |
|      1.37739e+09 |           1 |                             2600 |           50.2667 |        1.93333  |                        2.09715e+06 |              130022 |                             0 |                        8.46667 |                             15.8     |                                11.7333  |
|      1.3761e+09  |           1 |                             2600 |           24.2667 |        0.933333 |                        2.09715e+06 |              153790 |                             0 |                        8.13333 |                              1.6     |                                 3.33333 |


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.37597e+09 |           1 |                             2600 |                 0 |               0 |                        4.05504e+06 |                8388 |                             0 |                         0      |                               0      |                               0         |
|      1.37596e+09 |           1 |                             2600 |                 0 |               0 |                        4.05504e+06 |                   0 |                             0 |                         0      |                               0      |                               0         |
|      1.37714e+09 |           1 |                             2600 |                 0 |               0 |                        4.05504e+06 |               19572 |                             0 |                         0      |                               0      |                               0         |
|      1.37651e+09 |           1 |                             2600 |                 0 |               0 |                        4.05504e+06 |                   0 |                             0 |                         0      |                               0      |                               0         |
|      1.37567e+09 |           1 |                             2600 |                52 |               2 |                        4.05504e+06 |               30756 |                             0 |                        20.2667 |                              17.0667 |                               0.0666667 |
|      1.37676e+09 |           1 |                             2600 |                 0 |               0 |                        4.05504e+06 |                   0 |                             0 |                         0      |                               0      |                               0         |
|      1.37703e+09 |           1 |                             2600 |                 0 |               0 |                        4.05504e+06 |                8388 |                             0 |                         0      |                               0      |                               0         |
|      1.37536e+09 |           1 |                             2600 |                 0 |               0 |                        4.03661e+06 |               25164 |                             0 |                        34.0667 |                              29.8667 |                               0         |
|      1.37547e+09 |           1 |                             2600 |                 0 |               0 |                        4.05504e+06 |               41942 |                             0 |                        20.1333 |                              17.1333 |                               0         |
|      1.3773e+09  |           1 |                             2600 |                 0 |               0 |                        4.05504e+06 |               36348 |                             0 |                         0      |                               0      |                               0         |


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.37732e+09 |           1 |                             2600 |           55.4667 |         2.13333 |                        2.09715e+06 |              233480 |                     0.0666667 |                       10.1333  |                             0.733333 |                                1.73333  |
|      1.3771e+09  |           1 |                             2600 |           55.4667 |         2.13333 |                        2.09715e+06 |              334144 |                     0         |                        9.93333 |                             0.533333 |                                1.53333  |
|      1.37564e+09 |           1 |                             2600 |           86.6666 |         3.33333 |                        2.09715e+06 |              654310 |                     0.0666667 |                       13.7333  |                             0.933333 |                                0.466667 |
|      1.37613e+09 |           1 |                             2600 |           46.8    |         1.8     |                        2.09715e+06 |              177557 |                     0         |                        8.66667 |                             1.2      |                                8.6      |
|      1.37552e+09 |           1 |                             2600 |           58.9333 |         2.26667 |                        2.09715e+06 |              538267 |                     0.133333  |                       15.0667  |                             1.2      |                                0.733333 |
|      1.37606e+09 |           1 |                             2600 |           36.4    |         1.4     |                        2.09715e+06 |              171965 |                     0.2       |                        8.86667 |                             0        |                                1.6      |
|      1.37683e+09 |           1 |                             2600 |           32.9333 |         1.26667 |                        2.09715e+06 |              174761 |                    12.5333    |                       16.4     |                             0        |                                1.2      |
|      1.37724e+09 |           1 |                             2600 |           57.2    |         2.2     |                        2.09715e+06 |              251656 |                     0         |                        9.2     |                             0.6      |                                1.53333  |
|      1.37585e+09 |           1 |                             2600 |           15.6    |         0.6     |                        2.09715e+06 |              149596 |                     0.0666667 |                        7.13333 |                             0        |                                0.4      |
|      1.37612e+09 |           1 |                             2600 |           31.2    |         1.2     |                        2.09715e+06 |              178955 |                     0         |                        7.53333 |                             0        |                                1.13333  |


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.37694e+09 |           4 |                            11704 |           200.919 |         1.71667 |                        1.67035e+07 |              234881 |                             0 |                        3.13333 |                              0       |                               0         |
|      1.37707e+09 |           4 |                            11704 |           208.721 |         1.78333 |                        1.67035e+07 |              201326 |                             0 |                        2.46667 |                              0       |                               0         |
|      1.37614e+09 |           4 |                            11704 |           212.623 |         1.81667 |                        1.67035e+07 |              167772 |                             0 |                       12.2     |                              4.6     |                               0         |
|      1.37764e+09 |           4 |                            11704 |           228.228 |         1.95    |                        1.67035e+07 |              346729 |                             0 |                       18       |                              4.53333 |                               0.0666667 |
|      1.37571e+09 |           4 |                            11704 |           197.017 |         1.68333 |                        1.67035e+07 |              257250 |                             0 |                       11.6667  |                              4.46667 |                               0.0666667 |
|      1.37582e+09 |           4 |                            11704 |           206.771 |         1.76667 |                        1.67035e+07 |              178957 |                             0 |                       12.3333  |                              4.46667 |                               0         |
|      1.37613e+09 |           4 |                            11704 |           210.672 |         1.8     |                        1.67035e+07 |              234881 |                             0 |                       12.6     |                              4.46667 |                               0         |
|      1.3755e+09  |           4 |                            11704 |           197.017 |         1.68333 |                        1.67035e+07 |              335544 |                             0 |                       12       |                              4.4     |                               0.0666667 |
|      1.37718e+09 |           4 |                            11704 |           204.82  |         1.75    |                        1.67035e+07 |                   0 |                             0 |                        2.66667 |                              0       |                               0         |
|      1.37748e+09 |           4 |                            11704 |           232.129 |         1.98333 |                        1.67035e+07 |              167772 |                             0 |                       13.6667  |                              4.66667 |                               0.2       |


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.37739e+09 |           4 |                            10400 |           175.067 |         1.68333 |                        5.48045e+06 |            156587   |                             0 |                        2.33333 |                            0         |                               0         |
|      1.37654e+09 |           4 |                            10400 |           175.067 |         1.68333 |                        2.22413e+06 |            100663   |                             0 |                        3.33333 |                            0.0666667 |                               0         |
|      1.3755e+09  |           4 |                            10400 |           221.867 |         2.13333 |                        1.67035e+07 |            290805   |                             0 |                       13.5333  |                            4.4       |                               0         |
|      1.37614e+09 |           4 |                            10400 |           204.533 |         1.96667 |                        2.22413e+06 |                 0   |                             0 |                       12.3333  |                            4.53333   |                               0         |
|      1.37533e+09 |           4 |                            10400 |           180.267 |         1.73333 |                        1.67035e+07 |            223696   |                             0 |                       12.4667  |                            4.33333   |                               0         |
|      1.37645e+09 |           4 |                            10400 |           168.133 |         1.61667 |                        2.22413e+06 |             44739.2 |                             0 |                        2.73333 |                            0         |                               0         |
|      1.37762e+09 |           4 |                            10400 |           208     |         2       |                        5.48045e+06 |            223696   |                             0 |                       12.6667  |                            4.53333   |                               0.0666667 |
|      1.37744e+09 |           4 |                            10400 |           192.4   |         1.85    |                        5.48045e+06 |            156587   |                             0 |                       12.9333  |                            4.46667   |                               0.0666667 |
|      1.37722e+09 |           4 |                            10400 |           194.133 |         1.86667 |                        5.48045e+06 |                 0   |                             0 |                       15.1333  |                            4.86667   |                               0.133333  |
|      1.37753e+09 |           4 |                            10400 |           188.933 |         1.81667 |                        5.48045e+06 |            234881   |                             0 |                       13       |                            4.6       |                               0         |


Table #7
Filename: source_6.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.37656e+09 |           4 |                            10400 |           161.2   |         1.55    |                        2.99008e+06 |            100663   |                             0 |                        2.46667 |                              0       |                               0         |
|      1.37564e+09 |           4 |                            10400 |           150.8   |         1.45    |                        2.03366e+06 |             67108.8 |                             0 |                       11.4667  |                              4.4     |                               0         |
|      1.37579e+09 |           4 |                            10400 |           162.933 |         1.56667 |                        2.03366e+06 |            111848   |                             0 |                       12.6     |                              4.46667 |                               0.0666667 |
|      1.37542e+09 |           4 |                            10400 |           152.533 |         1.46667 |                        2.03366e+06 |            100663   |                             0 |                       11.4     |                              4.53333 |                               0         |
|      1.37696e+09 |           4 |                            10400 |           154.267 |         1.48333 |                        2.99008e+06 |            167772   |                             0 |                        2.4     |                              0       |                               0         |
|      1.37587e+09 |           4 |                            10400 |           159.467 |         1.53333 |                        2.03366e+06 |             44739.2 |                             0 |                       12       |                              4.4     |                               0         |
|      1.37571e+09 |           4 |                            10400 |           152.533 |         1.46667 |                        2.03366e+06 |                 0   |                             0 |                       11.8     |                              4.4     |                               0.0666667 |
|      1.37594e+09 |           4 |                            10400 |           161.2   |         1.55    |                        2.03776e+06 |            134218   |                             0 |                       12.0667  |                              4.53333 |                               0.0666667 |
|      1.37565e+09 |           4 |                            10400 |           157.733 |         1.51667 |                        2.03366e+06 |            100663   |                             0 |                       12.6667  |                              4.46667 |                               0.0666667 |
|      1.37645e+09 |           4 |                            10400 |           130     |         1.25    |                        2.99008e+06 |            134218   |                             0 |                        2.53333 |                              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           |
|-----------------:|------------:|---------------------------------:|------------------:|----------------:|-----------------------------------:|--------------------:|------------------------------:|-------------------------------:|-------------------------------------:|----------------------------------------:|:--------------------|
|       1376939508 |           4 |                            11704 |           200.919 |         1.71667 |                           16703488 |              234881 |                             0 |                        3.13333 |                              0       |                               0         | 2013-08-19 19:11:48 |
|       1377069432 |           4 |                            11704 |           208.721 |         1.78333 |                           16703488 |              201326 |                             0 |                        2.46667 |                              0       |                               0         | 2013-08-21 07:17:12 |
|       1376137232 |           4 |                            11704 |           212.623 |         1.81667 |                           16703488 |              167772 |                             0 |                       12.2     |                              4.6     |                               0         | 2013-08-10 12:20:32 |
|       1377636180 |           4 |                            11704 |           228.228 |         1.95    |                           16703488 |              346729 |                             0 |                       18       |                              4.53333 |                               0.0666667 | 2013-08-27 20:43:00 |
|       1375707595 |           4 |                            11704 |           197.017 |         1.68333 |                           16703488 |              257250 |                             0 |                       11.6667  |                              4.46667 |                               0.0666667 | 2013-08-05 12:59:55 |
|       1375821005 |           4 |                            11704 |           206.771 |         1.76667 |                           16703488 |              178957 |                             0 |                       12.3333  |                              4.46667 |                               0         | 2013-08-06 20:30:05 |
|       1376126731 |           4 |                            11704 |           210.672 |         1.8     |                           16703488 |              234881 |                             0 |                       12.6     |                              4.46667 |                               0         | 2013-08-10 09:25:31 |
|       1375496376 |           4 |                            11704 |           197.017 |         1.68333 |                           16703488 |              335544 |                             0 |                       12       |                              4.4     |                               0.0666667 | 2013-08-03 02:19:36 |
|       1377184942 |           4 |                            11704 |           204.82  |         1.75    |                           16703488 |                   0 |                             0 |                        2.66667 |                              0       |                               0         | 2013-08-22 15:22:22 |
|       1377481068 |           4 |                            11704 |           232.129 |         1.98333 |                           16703488 |              167772 |                             0 |                       13.6667  |                              4.66667 |                               0.2       | 2013-08-26 01:37:48 |

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