# xarray.load_dataset

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

Open, load into memory, and close a Dataset from a file or file-like
object.

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

* **Returns:**
  **dataset** ([`Dataset`](xarray.Dataset.html.md#xarray.Dataset)) – The newly created Dataset.

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