Skip to content

Commit b1e44b0

Browse files
committed
MAINT: Replace datetools import internally
1 parent 64f5917 commit b1e44b0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pandas/core/generic.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242
import pandas.core.algorithms as algos
4343
import pandas.core.common as com
4444
import pandas.core.missing as missing
45-
import pandas.core.datetools as datetools
4645
from pandas.formats.printing import pprint_thing
4746
from pandas.formats.format import format_percentiles
47+
from pandas.tseries.frequencies import to_offset
4848
from pandas import compat
4949
from pandas.compat.numpy import function as nv
5050
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,
47924792
periods : int
47934793
Number of periods to move, can be positive or negative
47944794
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').
47964796
See Notes.
47974797
axis : %(axes_single_arg)s
47984798
@@ -4865,7 +4865,7 @@ def tshift(self, periods=1, freq=None, axis=0):
48654865
periods : int
48664866
Number of periods to move, can be positive or negative
48674867
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')
48694869
axis : int or basestring
48704870
Corresponds to the axis that contains the Index
48714871
@@ -4895,11 +4895,11 @@ def tshift(self, periods=1, freq=None, axis=0):
48954895
return self
48964896

48974897
if isinstance(freq, string_types):
4898-
freq = datetools.to_offset(freq)
4898+
freq = to_offset(freq)
48994899

49004900
block_axis = self._get_block_manager_axis(axis)
49014901
if isinstance(index, PeriodIndex):
4902-
orig_freq = datetools.to_offset(index.freq)
4902+
orig_freq = to_offset(index.freq)
49034903
if freq == orig_freq:
49044904
new_data = self._data.copy()
49054905
new_data.axes[block_axis] = index.shift(periods)

0 commit comments

Comments
 (0)