Skip to content

dataset __repr__ updates #5580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Aug 21, 2021
5 changes: 5 additions & 0 deletions doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ Breaking changes
pre-existing array values. This is a safer default than the prior ``mode="a"``,
and allows for higher performance writes (:pull:`5252`).
By `Stephan Hoyer <https://github.com/shoyer>`_.
- The ``__repr__`` of a :py:class:`xarray.Dataset`'s ``attrs``, ``coords``,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that .attrs is a standard python dict, so there's no custom repr:

Suggested change
- The ``__repr__`` of a :py:class:`xarray.Dataset`'s ``attrs``, ``coords``,
- The ``__repr__`` of a :py:class:`xarray.Dataset`'s ``coords``

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, there is a attrs_repr in xarray/core/formatting.py.
But I already changed the whats_new entry, probably I'll have to revert that again.

and ``data_vars`` ignore ``xarray.set_option(display_max_rows=...)`` and
show the full output when called directly as, e.g., ``ds.data_vars`` or
``print(ds.data_vars)`` (:issue:`5545`, :pull:`5580`).
By `Stefan Bender <https://github.com/st-bender>`_.

Deprecations
~~~~~~~~~~~~
Expand Down