t_values.sort()
num_rows = len(t_values)
num_columns = len(column_names)
num_datasets = len(filenames)
idx = [t_values.searchsorted(data[n][:, (0)]) for n in range(num_datasets)]
data2 = np.ma.zeros((num_rows, num_columns, num_datasets))
for n in range(num_datasets):
    data2[(idx[n]), :, (n)] = data[n][:, :]
data2 = np.ma.masked_equal(data2, 0)
averages = data2.mean(axis=-1)
print(averages)
Using Numpy to find average value across data sets, with some missing data