| 1966 | align(res, test, join="exact") |
| 1967 | |
| 1968 | def test_categorical_multiindex(self) -> None: |
| 1969 | i1 = pd.Series([0, 0]) |
| 1970 | cat = pd.CategoricalDtype(categories=["foo", "baz", "bar"]) |
| 1971 | i2 = pd.Series(["baz", "bar"], dtype=cat) |
| 1972 | |
| 1973 | df = pd.DataFrame({"i1": i1, "i2": i2, "values": [1, 2]}).set_index( |
| 1974 | ["i1", "i2"] |
| 1975 | ) |
| 1976 | actual = df.to_xarray() |
| 1977 | assert actual["values"].shape == (1, 2) |
| 1978 | |
| 1979 | def test_sel_drop(self) -> None: |
| 1980 | data = Dataset({"foo": ("x", [1, 2, 3])}, {"x": [0, 1, 2]}) |