common.py 626 B

12345678910111213141516171819202122232425262728293031
  1. from pandas.util._decorators import cache_readonly
  2. import pandas as pd
  3. import pandas.util.testing as tm
  4. _ts = tm.makeTimeSeries()
  5. class TestData(object):
  6. @cache_readonly
  7. def ts(self):
  8. ts = _ts.copy()
  9. ts.name = 'ts'
  10. return ts
  11. @cache_readonly
  12. def series(self):
  13. series = tm.makeStringSeries()
  14. series.name = 'series'
  15. return series
  16. @cache_readonly
  17. def objSeries(self):
  18. objSeries = tm.makeObjectSeries()
  19. objSeries.name = 'objects'
  20. return objSeries
  21. @cache_readonly
  22. def empty(self):
  23. return pd.Series([], index=[])