assert df.loc[1, 0] is None
assert df.loc[0, 1] == "2"
+ @pytest.mark.xfail(condition=True,strict=False,raises=ValueError, reason="Interprets list of frame as 3D, https://github.com/pandas-dev/pandas/issues/32289")
def test_constructor_list_frames(self):
# see gh-3243
result = DataFrame([DataFrame()])
DataFrame(index=[0], columns=range(0, 4), data=arr)
# higher dim raise exception
- with pytest.raises(ValueError, match="Must pass 2-d input"):
+ with pytest.raises(ValueError, match="Plain DataFrames must be 2-d"):
DataFrame(np.zeros((3, 3, 3)), columns=["A", "B", "C"], index=[1])
# wrong size axis labels
with pytest.raises(ValueError, match=msg):
DataFrame({"a": False, "b": True})
+ @pytest.mark.xfail(condition=True,strict=False,raises=ValueError, reason="Interprets embedded frame as 3D, https://github.com/pandas-dev/pandas/issues/32289")
def test_constructor_with_embedded_frames(self):
# embedded data frames
DataFrame(mat, columns=["A", "B"], index=[1, 2])
# higher dim raise exception
- with pytest.raises(ValueError, match="Must pass 2-d input"):
+ with pytest.raises(ValueError, match="Plain DataFrames must be 2-d"):
DataFrame(empty((3, 3, 3)), columns=["A", "B", "C"], index=[1])
# automatic labeling