diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 47142daa8b20b..bf9d1cd7d30b9 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -5713,7 +5713,8 @@ def extract_index(data): raw_lengths.append(len(v)) if not indexes and not raw_lengths: - raise ValueError('If use all scalar values, must pass index') + raise ValueError('If using all scalar values, you must must pass' + ' an index') if have_series or have_dicts: index = _union_indexes(indexes) diff --git a/pandas/tests/test_frame.py b/pandas/tests/test_frame.py index 63f92e9fa7a35..8b32b3a641ebb 100644 --- a/pandas/tests/test_frame.py +++ b/pandas/tests/test_frame.py @@ -2245,8 +2245,9 @@ def test_constructor_error_msgs(self): try: DataFrame({'a': False, 'b': True}) except (Exception), detail: + msg = 'If using all scalar values, you must must pass an index' self.assert_(type(detail) == ValueError) - self.assert_("If use all scalar values, must pass index" in str(detail)) + self.assert_(msg in str(detail)) def test_constructor_subclass_dict(self): # Test for passing dict subclass to constructor