diff --git a/pandas/core/internals.py b/pandas/core/internals.py index 9db0293044d2d..2877c2b10c92f 100644 --- a/pandas/core/internals.py +++ b/pandas/core/internals.py @@ -3507,7 +3507,7 @@ def create_block_manager_from_arrays(arrays, names, axes): mgr._consolidate_inplace() return mgr except (ValueError) as e: - construction_error(len(arrays), arrays[0].shape[1:], axes, e) + construction_error(len(arrays), arrays[0].shape, axes, e) def form_blocks(arrays, names, axes): diff --git a/pandas/tests/test_frame.py b/pandas/tests/test_frame.py index b68fd62f4b1d7..dd6cf773dcdb7 100644 --- a/pandas/tests/test_frame.py +++ b/pandas/tests/test_frame.py @@ -4032,7 +4032,7 @@ def test_from_records_to_records(self): tm.assert_frame_equal(DataFrame.from_records(arr2), DataFrame(arr2)) # wrong length - msg = r'Shape of passed values is \(3,\), indices imply \(3, 1\)' + msg = r'Shape of passed values is \(3, 2\), indices imply \(3, 1\)' with assertRaisesRegexp(ValueError, msg): DataFrame.from_records(arr, index=index[:-1])