

def test_asfreq(self):
    ts = Series([0.0, 1.0, 2.0], index=[datetime(2009, 10, 30), datetime(2009, 11, 30), datetime(2009, 12, 31)])
    daily_ts = ts.asfreq('B')
    monthly_ts = daily_ts.asfreq('BM')
    self.assert_numpy_array_equal(monthly_ts, ts)
    daily_ts = ts.asfreq('B', method='pad')
    monthly_ts = daily_ts.asfreq('BM')
    self.assert_numpy_array_equal(monthly_ts, self)
    daily_ts = ts.asfreq(datetools.bday)
    monthly_ts = daily_ts.asfreq(datetools.bmonthEnd)
    self.assert_numpy_array_equal(monthly_ts, ts)
    result = ts[:0].asfreq('M')
    self.assertEqual(len(result), 0)
    self.assertIsNot(result, ts)

dataset/ETHPy150Open pydata/pandas/pandas/tests/series/test_timeseries.py TestSeriesTimeSeries.test_asfreq/VarMisuse@109/152 `ts`->`self`