Skip to content

DEPR: Deprecate pandas.core.datetools #14105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DOC: Replace datetools import in docs
  • Loading branch information
gfyoung committed Sep 3, 2016
commit 6363e59b129d7068f2a4e79b4533dee515c6025a
6 changes: 3 additions & 3 deletions doc/source/timeseries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from datetime import datetime, timedelta, time
import numpy as np
import pandas as pd
from pandas import datetools
from pandas import offsets
np.random.seed(123456)
randn = np.random.randn
randint = np.random.randint
Expand Down Expand Up @@ -1223,7 +1223,7 @@ The shift method accepts an ``freq`` argument which can accept a

.. ipython:: python

ts.shift(5, freq=datetools.bday)
ts.shift(5, freq=offsets.BDay())
ts.shift(5, freq='BM')

Rather than changing the alignment of the data and the index, ``DataFrame`` and
Expand All @@ -1246,7 +1246,7 @@ around ``reindex`` which generates a ``date_range`` and calls ``reindex``.

.. ipython:: python

dr = pd.date_range('1/1/2010', periods=3, freq=3 * datetools.bday)
dr = pd.date_range('1/1/2010', periods=3, freq=3 * offsets.BDay())
ts = pd.Series(randn(3), index=dr)
ts
ts.asfreq(BDay())
Expand Down