Aggregation
Xarray supports many of the aggregations methods that numpy has. A partial list includes: all, any, argmax, argmin, max, mean, median, min, prod, sum, std, var.
Whereas the numpy syntax would require scalar axes, xarray can use dimension names:
import xarray as xr
ds = xr.open_dataset("../data/air_temperature.nc")
da = ds['air']
da
da.mean()
da.mean(dim=['lat', 'lon'])
da.median(dim='time')
da.std(dim='time')
%load_ext watermark
%watermark --iversion -g -m -v -u -d