Skip to content

Commit

Permalink
fix doctests: pandas 2.1 MultiIndex repr with nan (#8141)
Browse files Browse the repository at this point in the history
Co-authored-by: Mathias Hauser <[email protected]>
  • Loading branch information
benbovy and mathause authored Sep 5, 2023
1 parent e9c1962 commit f13da94
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xarray/core/dataarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -2904,9 +2904,9 @@ def to_unstacked_dataset(self, dim: Hashable, level: int | Hashable = 0) -> Data
b (x) int64 0 3
>>> stacked = data.to_stacked_array("z", ["x"])
>>> stacked.indexes["z"]
MultiIndex([('a', 0.0),
('a', 1.0),
('a', 2.0),
MultiIndex([('a', 0),
('a', 1),
('a', 2),
('b', nan)],
name='z')
>>> roundtripped = stacked.to_unstacked_dataset(dim="z")
Expand Down

0 comments on commit f13da94

Please sign in to comment.