File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 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())
You can’t perform that action at this time.
0 commit comments