How to collapse by default the attributes section of a rich Dataset representation? #9066
-
Hello, I wonder if there is maybe a xarray global option to collapse by default the attribute section in case of an extremely long attribute to prevent attribute spamming. An example: xds = xr.Dataset({"variable_name": np.arange(10)}, attrs={"one_long_attr": "lorem ipsum " * 10000})
xds The text-only version is immune against this issue as the attribute can only express itself in the space of a line: print(xds)
ℹ️ I already made an issue on the Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
you can use xr.set_options(display_expand_attrs=False) for that. (see also the documentation of |
Beta Was this translation helpful? Give feedback.
-
@eschalkargans please have a look here https://docs.xarray.dev/en/stable/user-guide/options.html |
Beta Was this translation helpful? Give feedback.
you can use
for that.
(see also the documentation of
xr.set_options
for a full list of available options)