Skip to content

Commit 6363e59

Browse files
committed
DOC: Replace datetools import in docs
1 parent b1e44b0 commit 6363e59

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/source/timeseries.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from datetime import datetime, timedelta, time
88
import numpy as np
99
import pandas as pd
10-
from pandas import datetools
10+
from pandas import offsets
1111
np.random.seed(123456)
1212
randn = np.random.randn
1313
randint = np.random.randint
@@ -1223,7 +1223,7 @@ The shift method accepts an ``freq`` argument which can accept a
12231223

12241224
.. ipython:: python
12251225
1226-
ts.shift(5, freq=datetools.bday)
1226+
ts.shift(5, freq=offsets.BDay())
12271227
ts.shift(5, freq='BM')
12281228
12291229
Rather than changing the alignment of the data and the index, ``DataFrame`` and
@@ -1246,7 +1246,7 @@ around ``reindex`` which generates a ``date_range`` and calls ``reindex``.
12461246

12471247
.. ipython:: python
12481248
1249-
dr = pd.date_range('1/1/2010', periods=3, freq=3 * datetools.bday)
1249+
dr = pd.date_range('1/1/2010', periods=3, freq=3 * offsets.BDay())
12501250
ts = pd.Series(randn(3), index=dr)
12511251
ts
12521252
ts.asfreq(BDay())

0 commit comments

Comments
 (0)