nctoolkit.DataSet.na_count

DataSet.na_count(over='time', align='right', window=None)

na_count: Calculate the number of missing values.

Parameters:
  • over (str or list) – Time periods to to the count over over. Options are ‘time’, ‘year’, ‘month’, ‘day’.

  • align (str) – This determines whether the output time is at the left, centre or right hand side of the time window. Options are “left”, “centre” and “right”

  • window (int) – This determines the number of time steps to calculate, on a non-rolling basis. This is useful if you need to calculate the sum every 5 days, for example.

Examples

If you want to calculate the number of missing values over all time steps. Do the following: >>> ds.na_count() If you want to calculate the number of missing values in each year: >>> ds.na_count(over=”year”)