This library provides some helpers for xarray I find useful.
pip install git+https://github.com/jklymak/jmkxarray
clone first and then change into the new directory, and then run:
pip install -e .
To use, just add import jmkxarray at top of any script or notebook.