|
42 | 42 | import pandas.core.algorithms as algos
|
43 | 43 | import pandas.core.common as com
|
44 | 44 | import pandas.core.missing as missing
|
45 |
| -import pandas.core.datetools as datetools |
46 | 45 | from pandas.formats.printing import pprint_thing
|
47 | 46 | from pandas.formats.format import format_percentiles
|
| 47 | +from pandas.tseries.frequencies import to_offset |
48 | 48 | from pandas import compat
|
49 | 49 | from pandas.compat.numpy import function as nv
|
50 | 50 | from pandas.compat import (map, zip, lrange, string_types,
|
@@ -4792,7 +4792,7 @@ def mask(self, cond, other=np.nan, inplace=False, axis=None, level=None,
|
4792 | 4792 | periods : int
|
4793 | 4793 | Number of periods to move, can be positive or negative
|
4794 | 4794 | freq : DateOffset, timedelta, or time rule string, optional
|
4795 |
| - Increment to use from datetools module or time rule (e.g. 'EOM'). |
| 4795 | + Increment to use from the tseries module or time rule (e.g. 'EOM'). |
4796 | 4796 | See Notes.
|
4797 | 4797 | axis : %(axes_single_arg)s
|
4798 | 4798 |
|
@@ -4865,7 +4865,7 @@ def tshift(self, periods=1, freq=None, axis=0):
|
4865 | 4865 | periods : int
|
4866 | 4866 | Number of periods to move, can be positive or negative
|
4867 | 4867 | freq : DateOffset, timedelta, or time rule string, default None
|
4868 |
| - Increment to use from datetools module or time rule (e.g. 'EOM') |
| 4868 | + Increment to use from the tseries module or time rule (e.g. 'EOM') |
4869 | 4869 | axis : int or basestring
|
4870 | 4870 | Corresponds to the axis that contains the Index
|
4871 | 4871 |
|
@@ -4895,11 +4895,11 @@ def tshift(self, periods=1, freq=None, axis=0):
|
4895 | 4895 | return self
|
4896 | 4896 |
|
4897 | 4897 | if isinstance(freq, string_types):
|
4898 |
| - freq = datetools.to_offset(freq) |
| 4898 | + freq = to_offset(freq) |
4899 | 4899 |
|
4900 | 4900 | block_axis = self._get_block_manager_axis(axis)
|
4901 | 4901 | if isinstance(index, PeriodIndex):
|
4902 |
| - orig_freq = datetools.to_offset(index.freq) |
| 4902 | + orig_freq = to_offset(index.freq) |
4903 | 4903 | if freq == orig_freq:
|
4904 | 4904 | new_data = self._data.copy()
|
4905 | 4905 | new_data.axes[block_axis] = index.shift(periods)
|
|
0 commit comments