I want to load a series of data from 6 CSV files and save them per column of the data series. As I call the Column_A
, Column_B
and new_Column_A
, only the last output array of the data series which is the 6th CSV file is saved. Is there a possible way or function that could make me save the array of every data series of every CSV file at the end of the for loop?
Below is the code that I have so far:
for n in range(1,7):
data = np.genfromtxt('data' + str(n) + '_.csv', delimiter=",")
Column_A = data[35, :]
Column_A = np.flip(Column_A )
Column_A = np.reshape(Column_A , (len(Column_A )))
new_Column_A = np.cumsum(Column_A )
Column_B = data[0, :]
Column_B = np.flip(Column_B ) # Reverse Array
Column_B = np.reshape(Column_B , (len(Column_B )))
print(Column_A)
print(Column_B)
print(new_Column_A)