From 1e579fbc7a81c65ead985bf5ca6bf10dc04eaea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20M=C3=BChlbauer?= Date: Thu, 17 Oct 2024 19:41:45 +0200 Subject: [PATCH] Fix error and missing code cell in io.rst (#9641) * Fix error and probably missing code cell in io.rst * Make this even simpler, remove link to same section --- doc/user-guide/io.rst | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/doc/user-guide/io.rst b/doc/user-guide/io.rst index 92303298292..5687e1399cc 100644 --- a/doc/user-guide/io.rst +++ b/doc/user-guide/io.rst @@ -19,16 +19,11 @@ format (recommended). np.random.seed(123456) -You can `read different types of files `_ -in `xr.open_dataset` by specifying the engine to be used: +You can read different types of files in `xr.open_dataset` by specifying the engine to be used: -.. ipython:: python - :okexcept: - :suppress: - - import xarray as xr +.. code:: python - xr.open_dataset("my_file.grib", engine="cfgrib") + xr.open_dataset("example.nc", engine="netcdf4") The "engine" provides a set of instructions that tells xarray how to read the data and pack them into a `dataset` (or `dataarray`).