diff --git a/doc/user-guide/io.rst b/doc/user-guide/io.rst index d7596d953df..5687e1399cc 100644 --- a/doc/user-guide/io.rst +++ b/doc/user-guide/io.rst @@ -19,18 +19,9 @@ format (recommended). np.random.seed(123456) - ds = xr.Dataset( - {"foo": (("x", "y"), np.random.rand(4, 5))}, - ) - - ds.to_netcdf("example.nc") - -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 - - import xarray as xr +.. code:: python xr.open_dataset("example.nc", engine="netcdf4")