(self)
| 1868 | ) |
| 1869 | |
| 1870 | def test_sel_categorical(self) -> None: |
| 1871 | ind = pd.Series(["foo", "bar"], dtype="category") |
| 1872 | df = pd.DataFrame({"ind": ind, "values": [1, 2]}) |
| 1873 | ds = df.set_index("ind").to_xarray() |
| 1874 | actual = ds.sel(ind="bar") |
| 1875 | expected = ds.isel(ind=1) |
| 1876 | assert_identical(expected, actual) |
| 1877 | |
| 1878 | def test_sel_categorical_error(self) -> None: |
| 1879 | ind = pd.Series(["foo", "bar"], dtype="category") |
nothing calls this directly
no test coverage detected