diff --git a/pandas/tests/arrays/sparse/test_array.py b/pandas/tests/arrays/sparse/test_array.py index 9c13a20726553..11b5bcf702e75 100644 --- a/pandas/tests/arrays/sparse/test_array.py +++ b/pandas/tests/arrays/sparse/test_array.py @@ -1091,11 +1091,11 @@ def test_from_coo(self): row = [0, 3, 1, 0] col = [0, 3, 1, 2] data = [4, 5, 7, 9] - sp_array = sparse.coo_matrix(data, (row, col)) + sp_array = sparse.coo_matrix((data, (row, col))) result = pd.Series.sparse.from_coo(sp_array) - index = pd.MultiIndex.from_product([[0], [0, 1, 2, 3]]) - expected = pd.Series(data, index=index, dtype='Sparse[int]') + index = pd.MultiIndex.from_arrays([[0, 0, 1, 3], [0, 2, 1, 3]]) + expected = pd.Series([4, 9, 7, 5], index=index, dtype='Sparse[int]') tm.assert_series_equal(result, expected) def test_to_coo(self):