Hello,

I'm stumped by a problem that I think should have a fairly straightforward answer...

I have a few hundred features with a number of attributes, all numerical. Some features have all attributes filled in, but some have a handful of null values. Is there any way of calculating the mean value for each feature that takes into account these null values? For instance, it calculates how many attributes are not null for each feature and uses that to generate the mean?

Would really appreciate any help on this!

Thanks

what is the source type of your data? Featureclass tables? dbase? excel?

And I assume you want to automate the whole process rather than doing the process table by table and field by field.

You could use numpy, and convert the tables to numpy arrays and do the columns all at once.

Then you could cycle through the tables and get the mean

PS 'nan' is the numpy equivalent of None in python and nodata in tables.