Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/getting-started-guide/quick-overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ objects. You can think of it as a multi-dimensional generalization of the

.. ipython:: python

ds = xr.Dataset({"foo": data, "bar": ("x", [1, 2]), "baz": np.pi})
ds = xr.Dataset(dict(foo=data, bar=("x", [1, 2]), baz=np.pi))
ds


Expand Down
2 changes: 1 addition & 1 deletion doc/internals/duck-arrays-integration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ To avoid duplicated information, this method must omit information about the sha
b = sparse.COO.from_numpy(b)
b

xr.Dataset({"a": ("x", a), "b": (("y", "z"), b)})
xr.Dataset(dict(a=("x", a), b=(("y", "z"), b)))
4 changes: 2 additions & 2 deletions doc/user-guide/data-structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,12 @@ in the dictionary:

.. ipython:: python

xr.Dataset({"bar": foo})
xr.Dataset(dict(bar=foo))


.. ipython:: python

xr.Dataset({"bar": foo.to_pandas()})
xr.Dataset(dict(bar=foo.to_pandas()))

Where a pandas object is supplied as a value, the names of its indexes are used as dimension
names, and its data is aligned to any existing dimensions.
Expand Down