Skip to content

Commit baab1d5

Browse files
Daniel SaxtonDaniel Saxton
Daniel Saxton
authored and
Daniel Saxton
committed
Construct from tuples in test
1 parent d1a953b commit baab1d5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/tests/indexing/multiindex/test_multiindex.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ def test_nested_tuples_duplicates(self):
114114

115115
def test_multiindex_from_product_contains_na(self):
116116
# https://github.com/pandas-dev/pandas/issues/31883
117-
values1 = [np.array([0.0, pd.NA], dtype="object"), ["a", "b"]]
118-
values2 = [np.array([0.0, np.nan], dtype="object"), ["a", "b"]]
117+
values = [np.array([0.0, pd.NA], dtype="object"), ["a", "b"]]
118+
tuples = [(0.0, "a"), (0.0, "b"), (np.nan, "a"), (np.nan, "b")]
119119

120-
result = pd.MultiIndex.from_product(values1)
121-
expected = pd.MultiIndex.from_product(values2)
120+
result = pd.MultiIndex.from_product(values)
121+
expected = pd.MultiIndex.from_tuples(tuples)
122122

123123
tm.assert_index_equal(result, expected)

0 commit comments

Comments
 (0)