@@ -323,27 +323,27 @@ Experimental Features
323
323
~~~~~~~~~~~~~~~~~~~~~
324
324
325
325
- Added experimental ``CustomBusinessDay`` class to support ``DateOffsets``
326
- with custom holiday calendars and custom weekmasks. (GH2301_ )
326
+ with custom holiday calendars and custom weekmasks. (:issue:`2301` )
327
327
328
- .. note::
328
+ .. note::
329
329
330
- This uses the ``numpy.busdaycalendar`` API introduced in Numpy 1.7 and
331
- therefore requires Numpy 1.7.0 or newer.
332
-
333
- .. ipython:: python
334
-
335
- from pandas.tseries.offsets import CustomBusinessDay
336
- # As an interesting example, let's look at Egypt where
337
- # a Friday-Saturday weekend is observed.
338
- weekmask_egypt = 'Sun Mon Tue Wed Thu'
339
- # They also observe International Workers' Day so let's
340
- # add that for a couple of years
341
- holidays = ['2012-05-01', datetime(2013, 5, 1), np.datetime64('2014-05-01')]
342
- bday_egypt = CustomBusinessDay(holidays=holidays, weekmask=weekmask_egypt)
343
- dt = datetime(2013, 4, 30)
344
- print dt + 2 * bday_egypt
345
- dts = date_range(dt, periods=5, freq=bday_egypt).to_series()
346
- print Series(dts.weekday, dts).map(Series('Mon Tue Wed Thu Fri Sat Sun'.split()))
330
+ This uses the ``numpy.busdaycalendar`` API introduced in Numpy 1.7 and
331
+ therefore requires Numpy 1.7.0 or newer.
332
+
333
+ .. ipython:: python
334
+
335
+ from pandas.tseries.offsets import CustomBusinessDay
336
+ # As an interesting example, let's look at Egypt where
337
+ # a Friday-Saturday weekend is observed.
338
+ weekmask_egypt = 'Sun Mon Tue Wed Thu'
339
+ # They also observe International Workers' Day so let's
340
+ # add that for a couple of years
341
+ holidays = ['2012-05-01', datetime(2013, 5, 1), np.datetime64('2014-05-01')]
342
+ bday_egypt = CustomBusinessDay(holidays=holidays, weekmask=weekmask_egypt)
343
+ dt = datetime(2013, 4, 30)
344
+ print dt + 2 * bday_egypt
345
+ dts = date_range(dt, periods=5, freq=bday_egypt).to_series()
346
+ print Series(dts.weekday, dts).map(Series('Mon Tue Wed Thu Fri Sat Sun'.split()))
347
347
348
348
Bug Fixes
349
349
~~~~~~~~~
0 commit comments