jf328
jf328

Reputation: 7341

python pandas: offset Timestamp by business day

The DateOffset seems to be the way to go, but I'm confused with the documentation. How can I offset by business days?

Thanks.

Upvotes: 7

Views: 7720

Answers (1)

Alexander
Alexander

Reputation: 109528

import datetime as dt
from pandas.datetools import BDay

ts = pd.Timestamp(dt.datetime.now())
>>> ts + BDay(5)

Out[42]: Timestamp('2015-03-24 06:48:50.133321')

Upvotes: 7

Related Questions