Skip to content

Commit 20ef6f5

Browse files
committed
Test fixes for dims/sizes
1 parent 83102b0 commit 20ef6f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/tests/generic/test_to_xarray.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def test_to_xarray_empty(self, df):
6262

6363
df.index.name = "foo"
6464
result = df[0:0].to_xarray()
65-
assert result.dims["foo"] == 0
65+
assert result.sizes["foo"] == 0
6666
assert isinstance(result, Dataset)
6767

6868
def test_to_xarray_with_multiindex(self, df, using_infer_string):
@@ -71,8 +71,8 @@ def test_to_xarray_with_multiindex(self, df, using_infer_string):
7171
# MultiIndex
7272
df.index = MultiIndex.from_product([["a"], range(4)], names=["one", "two"])
7373
result = df.to_xarray()
74-
assert result.dims["one"] == 1
75-
assert result.dims["two"] == 4
74+
assert result.sizes["one"] == 1
75+
assert result.sizes["two"] == 4
7676
assert len(result.coords) == 2
7777
assert len(result.data_vars) == 8
7878
tm.assert_almost_equal(list(result.coords.keys()), ["one", "two"])

0 commit comments

Comments
 (0)