pydata/pandas — pull request #8950 by springcoil (2014-12-01 08:24:17+00:00)
Title: Updating generic.py error message #8618 - New branch

I deleted the previous branch that was causing problems and submitted this.
This is my first attempt at a PR. I just made a little change to allow an error message. Would appreciate some feedback.
closes #8015
@jreback @jorisvandenbossche @hayd

The tests failures are:
======================================================================
FAIL: test_trailing_spaces (pandas.io.tests.test_parsers.TestCParserHighMemory)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/peadarcoyle/Code/pandas/pandas/io/tests/test_parsers.py", line 3068, in test_trailing_spaces
tm.assert_frame_equal(df, expected)
File "/home/peadarcoyle/Code/pandas/pandas/util/testing.py", line 703, in assert_frame_equal
assert_index_equal(left.index, right.index)
File "/home/peadarcoyle/Code/pandas/pandas/util/testing.py", line 534, in assert_index_equal
right.dtype))
AssertionError: [index] left [int64 Int64Index([0, 1, 2], dtype='int64')], right [Int64Index([0, 1], dtype='int64') int64]

======================================================================
FAIL: test_calendar (pandas.tseries.tests.test_offsets.TestCustomBusinessDay)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/peadarcoyle/Code/pandas/pandas/tseries/tests/test_offsets.py", line 852, in test_calendar
assertEq(CDay(calendar=calendar), dt, datetime(2014, 1, 21))
File "/home/peadarcoyle/Code/pandas/pandas/tseries/tests/test_offsets.py", line 2803, in assertEq
(expected, actual, offset, base))
AssertionError:
Expected: 2014-01-21 00:00:00
Actual: 2014-01-20 00:00:00
For Offset: )
At Date: 2014-01-17 00:00:00

======================================================================
FAIL: test_datetimeindex (pandas.tseries.tests.test_offsets.TestCustomBusinessMonthBegin)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/peadarcoyle/Code/pandas/pandas/tseries/tests/test_offsets.py", line 1160, in test_datetimeindex
datetime(2012,1,3))
AssertionError: Timestamp('2012-01-02 00:00:00', offset='CBMS') != datetime.datetime(2012, 1, 3, 0, 0)

======================================================================
FAIL: test_properties_nat (pandas.tseries.tests.test_period.TestPeriodProperties)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/peadarcoyle/Code/pandas/pandas/tseries/tests/test_period.py", line 503, in test_properties_nat
self.assertTrue(np.isnan(getattr(p_nat, f)))
AssertionError: False is not true

======================================================================
FAIL: test_nat_scalar_field_access (pandas.tseries.tests.test_timeseries.TestTimeSeries)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/peadarcoyle/Code/pandas/pandas/tseries/tests/test_timeseries.py", line 952, in test_nat_scalar_field_access
self.assertTrue(np.isnan(result))
AssertionError: False is not true

======================================================================
FAIL: test_utc_z_designator (pandas.tseries.tests.test_tslib.TestTimestamp)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/peadarcoyle/Code/pandas/pandas/tseries/tests/test_tslib.py", line 302, in test_utc_z_designator
self.assertEqual(get_timezone(Timestamp('2014-11-02 01:00Z').tzinfo), 'UTC')
AssertionError: None != 'UTC'

======================================================================
FAIL: test_loc_getitem_label_slice (pandas.tests.test_indexing.TestIndexing)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/peadarcoyle/Code/pandas/pandas/tests/test_indexing.py", line 929, in test_loc_getitem_label_slice
self.check_result('ts slice', 'loc', slice('20130102','20130104'), 'ix', slice('20130102','20130104'), typs = ['ts'], axes=0)
File "/home/peadarcoyle/Code/pandas/pandas/tests/test_indexing.py", line 257, in check_result
_eq(t, o, a, obj, key1, k2)
File "/home/peadarcoyle/Code/pandas/pandas/tests/test_indexing.py", line 225, in _eq
raise AssertionError(_print(result, error = detail))
AssertionError: None

======================================================================
FAIL: test_per_axis_per_level_getitem (pandas.tests.test_indexing.TestIndexing)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/peadarcoyle/Code/pandas/pandas/tests/test_indexing.py", line 1749, in test_per_axis_per_level_getitem
self.assertRaises(KeyError, lambda : df.loc[slice(None),[1]])
File "/home/peadarcoyle/Code/pandas/pandas/util/testing.py", line 1555, in assertRaises
_callable(*args, **kwargs)
File "/home/peadarcoyle/Code/pandas/pandas/tests/test_indexing.py", line 1749, in
self.assertRaises(KeyError, lambda : df.loc[slice(None),[1]])
File "/home/peadarcoyle/Code/pandas/pandas/core/indexing.py", line 1200, in __getitem__
return self._getitem_tuple(key)
File "/home/peadarcoyle/Code/pandas/pandas/core/indexing.py", line 699, in _getitem_tuple
return self._getitem_lowerdim(tup)
File "/home/peadarcoyle/Code/pandas/pandas/core/indexing.py", line 807, in _getitem_lowerdim
return self._getitem_nested_tuple(tup)
File "/home/peadarcoyle/Code/pandas/pandas/core/indexing.py", line 879, in _getitem_nested_tuple
obj = getattr(obj, self.name)._getitem_axis(key, axis=axis)
File "/home/peadarcoyle/Code/pandas/pandas/core/indexing.py", line 1335, in _getitem_axis
return self._getitem_iterable(key, axis=axis)
File "/home/peadarcoyle/Code/pandas/pandas/core/indexing.py", line 982, in _getitem_iterable
return _reindex(keyarr, level=level)
File "/home/peadarcoyle/Code/pandas/pandas/core/indexing.py", line 943, in _reindex
raise AssertionError('axis must be 0')
AssertionError: axis must be 0