I want to calculate the daily mean of an array of values without considering negative values.
I use this array of data:
Val=['45','25','45','26','-999','87','9','5','4','5','78','98','14','25',
'34','15','15','14'...]
that represents the hourly values of one month (30 days).
I tried to remove the negative values from the average but I didn't succeed.
What is the simplest way, in python, to calculate the daily mean and to get an array of 30 values?
Thanks for your help
Here is the code:
f=open('file.csv')
csv_f=csv.reader(f)
val=[]
for row in csv_f:
val.append(row[0])
for i in range(0,len(val[:])-24,24):
j=i+24
mean(val[i:j])