xarray.load_dataarray

Contents

xarray.load_dataarray#

xarray.load_dataarray(filename_or_obj, **kwargs)[source]#

Open, load into memory, and close a DataArray from a file or file-like object containing a single data variable.

This is a thin wrapper around open_dataarray(). It differs from open_dataarray in that it loads the Dataset into memory, closes the file, and returns the Dataset. In contrast, open_dataarray keeps the file handle open and lazy loads its contents. All parameters are passed directly to open_dataarray. See that documentation for further details.

Returns

datarray (DataArray) – The newly created DataArray.

See also

open_dataarray