Skip to content
Snippets Groups Projects
Commit 12e2b346 authored by sr1009's avatar sr1009
Browse files

commit

parent 294750ce
No related branches found
No related tags found
No related merge requests found
%% Cell type:code id: tags:
``` python
import pandas as pd
import os
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
```
%% Cell type:code id: tags:
``` python
path = 'HGS/3213/'
directories = os.listdir(path)
columns = ['s'+str(i) for i in range(1,19)]
columns = ['instance','cost_solution'] + columns
```
%% Cell type:code id: tags:
``` python
dfs = [pd.read_csv(path + i, sep=';',names = columns) for i in directories]
df = pd.concat(dfs)
df.head()
```
%% Output
instance cost_solution s1 s2 s3 s4 s5 \
0 XML100_3213_01 22793 136.101 93.2145 0.0566 0.0419 987.636
1 XML100_3213_01 22504 180.084 110.4310 0.0712 0.0528 1055.800
2 XML100_3213_01 21594 233.753 189.6580 0.0967 0.0878 986.200
3 XML100_3213_01 22866 107.146 45.6872 0.0567 0.0560 1002.450
4 XML100_3213_01 22756 150.963 97.8176 0.0596 0.0459 976.273
s6 s7 s8 s9 s10 s11 s12 s13 s14 \
0 342.830 0 847.909 0.3881 0.1454 1421.36 0.3657 0.1828 0.2584
1 296.176 0 902.200 0.3873 0.1777 1358.10 0.2000 0.1000 0.0000
2 361.022 0 818.400 0.3592 0.1083 1472.60 0.2000 0.1000 0.0000
3 340.854 0 826.818 0.3789 0.1060 1483.09 0.3657 0.1828 0.2584
4 339.827 0 834.636 0.3861 0.1338 1427.09 0.3657 0.1828 0.2584
s15 s16 s17 s18
0 696.380 506.898 2.5745 5.2841
1 613.798 462.556 0.0000 6.7722
2 753.834 484.767 0.0000 5.5556
3 682.954 516.207 2.5745 5.0379
4 697.418 507.348 2.5745 5.0360
%% Cell type:code id: tags:
``` python
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment