Skip to content

CLN: Refactor pd.offsets.CustomBusinessDay #8458

Closed
@bjonen

Description

@bjonen

xref #8293

The code has evolved quite a bit and could probably benefit from refactoring.

In particular warpping the busdaycalendar logic in a wrapper class could make the code easier.

Notes about the current implementation:

  • CustomBusinessDay uses np.busdaycalendar to do the computations.
  • To speed up creation of new CustomBusinessDay offsets the calendar is cached in kwds.
  • To check equality of two CustomBusinessDay instances, the attributes holidays and weekdays are used.
  • remove EXPERIMENTAL (in docs, but check off in the experimental issue EXPM: re-evaluate experimental #5049)
  • might be some docs that say requires numpy >= 1.7 (but now all of pandas on that, so can cleanup)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions