# xarray.load_dataarray

### xarray.load_dataarray(filename_or_obj, \*\*kwargs)[[source]](https://github.com/pydata/xarray/blob/main/xarray/backends/api.py#L170-L193)

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()`](xarray.open_dataarray.html.md#xarray.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`](xarray.DataArray.html.md#xarray.DataArray)) – The newly created DataArray.

#### SEE ALSO
[`open_dataarray`](xarray.open_dataarray.html.md#xarray.open_dataarray)
