I am reading a list of values from a csv file into another list, and then calculating the mean of those values in the new list. The only issue is that some of the values in that list are simply the string "na" where no data was collected. If I want to skip over these "na" values, is it as simple as writing an if statement such as:
if soil_anom=='na':
pass
else:
SA.append(float(soil_anom))
I then have a numpy function to quickly calculate the mean of SA.
Aucun commentaire:
Enregistrer un commentaire