nctoolkit.DataSet.na_frac#

DataSet.na_frac(over='time', align='right')#

na_frac: Calculate the fraction of missing values in each grid cell across all time steps.

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”

Examples

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