CLN/INT: remove Index as a sub-class of NDArray by jreback · Pull Request #7891 · pandas-dev/pandas (original) (raw)

@sinhrks

would you mind taking a look at this PR and see if you can figure this out?

seem the PeriodIndex is getting converted to underlying (and not preserverd) like in master.....

thxs

======================================================================
ERROR: test_business_freq (pandas.tseries.tests.test_plotting.TestTSPlot)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/home/jreback/pandas/pandas/tseries/tests/test_plotting.py", line 273, in test_business_freq
    self.assertEqual(PeriodIndex(data=idx).freqstr, 'B')
  File "/mnt/home/jreback/pandas/pandas/tseries/period.py", line 598, in __new__
    ordinal, freq = cls._from_arraylike(data, freq, tz)
  File "/mnt/home/jreback/pandas/pandas/tseries/period.py", line 667, in _from_arraylike
    raise ValueError('freq not specified and cannot be '
ValueError: freq not specified and cannot be inferred from first element

======================================================================
ERROR: test_mixed_freq_hf_first (pandas.tseries.tests.test_plotting.TestTSPlot)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/home/jreback/pandas/pandas/tseries/tests/test_plotting.py", line 639, in test_mixed_freq_hf_first
    self.assertEqual(PeriodIndex(data=l.get_xdata()).freq, 'D')
  File "/mnt/home/jreback/pandas/pandas/tseries/period.py", line 598, in __new__
    ordinal, freq = cls._from_arraylike(data, freq, tz)
  File "/mnt/home/jreback/pandas/pandas/tseries/period.py", line 667, in _from_arraylike
    raise ValueError('freq not specified and cannot be '
ValueError: freq not specified and cannot be inferred from first element