/Designs/Measuring_instruments/ISMS01A/SW/average.py
20,6 → 20,9
value = parser.parse_file(sys.argv[1])
dataSource = value['data_path']
dataArchive = value['data_archive']
dataUpload = value['data_upload']
stationName = value['origin']
 
loop = 1
 
 
64,7 → 67,7
for x in range(0,columnsInd): # for each column
values = values.set_value(0,x,round(df[x].mean(),3),0) #calculates mean value for all cloumns and round it by 3
filename = first[:8]+'000000_VRTY-S1_data_mean.csv'
filename = dataUpload + first[:8]+'000000_' + stationName + '_data_mean.csv'
outfile = open(filename, 'a')
values.to_csv(filename, sep=';', header=None, index=False, mode='a') # save (add) DataFrame to csv
outfile.close()