this is my first posting and I am really new to programming - I have a folder with some files that I want to process and then create a numpy array with the values I need I do:
listing = os.listdir(datapath)
my_array=np.zeros(shape=(0,5))
for infile in listing:
dataset = open(infile).readlines()[1:]
data = np.genfromtxt(dataset, usecols=(1,6,7,8,9))
new_array = np.vstack((my_array, data))
and although I have 2 files in listing (datapath folder) the new_array array overwrites the data and gives me only the values of the second file any ideas? thanks,