Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f1_col1 f1_col2 f2_col1 f2_col2 ... ...
- 0 2.1 0 3.0 ... ...
- 1 4.6 1 4.5 ... ...
- 2 0.6 2 9.4 ... ...
- 3 5.8 ... ...
- 4 4.6 ... ...
- def group_for_display(files_list):
- n = len(files_list)
- X = np.empty(shape=[0, n])
- # loop through all files in the list
- for file_name in files_list:
- # open the file
- with open(file_name) as f:
- # skip first line
- next(f)
- # loop through all lines in the file
- for line in f:
- # split the line into columns
- temp, intens, dummy = line.split(",")
- temp = round(float((temp)))
- intens = float(intens)
- X = np.append(X, [[temp, intens]], axis=0)
- return X
- f1_col1 f1_col2
- 0 2.1
- 1 4.6
- 2 0.6
- 0 3.0
- 1 4.5
- 2 9.4
- 3 5.8
- 4 4.6
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement