You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating a nested DataFrame (which was already not recommended)
via the constructor no longer works.
Give a clearer error and xfail the tests.
Author: Rebecca N. Palmer <[email protected]>
Bug: pandas-dev/pandas#32289
Bug-Debian: https://bugs.debian.org/963817
Forwarded: no
Gbp-Pq: Name numpy119_compat.patch
Copy file name to clipboardExpand all lines: pandas/core/internals/construction.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -292,7 +292,7 @@ def convert(v):
292
292
ifvalues.ndim==1:
293
293
values=values.reshape((values.shape[0], 1))
294
294
elifvalues.ndim!=2:
295
-
raiseValueError("Must pass 2-d input")
295
+
raiseValueError("Plain DataFrames must be 2-d - for higher dimensions use MultiIndex or the python3-xarray package. If you are trying to create a nested DataFrame (which is not recommended) see https://github.com/pandas-dev/pandas/issues/32289")
@pytest.mark.xfail(_is_numpy_dev,reason="Interprets list of frame as 3D")
148
+
@pytest.mark.xfail(condition=True,strict=False,raises=ValueError,reason="Interprets list of frame as 3D, https://github.com/pandas-dev/pandas/issues/32289")
0 commit comments