Skip to content

REF: de-duplicate code in liboffsets #34778

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 5 commits into from
Jun 15, 2020

Conversation

jbrockmendel
Copy link
Member

In [2]: dti = pd.date_range("2016-01-01", periods=10000, freq="S")              
In [3]: off = pd.offsets.BMonthEnd(2)                                           
In [4]: %timeit dti + off                                                       
3.36 ms ± 14 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)  # <-- master
998 µs ± 12.5 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)  # <-- PR

@jreback jreback added Clean Frequency DateOffsets labels Jun 14, 2020
@jreback jreback added this to the 1.1 milestone Jun 14, 2020
@@ -4086,15 +3958,15 @@ cdef inline int get_day_of_month(npy_datetimestruct* dts, day_opt) nogil except?
cdef:
int days_in_month

if day_opt == 'start':
if day_opt == "start":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe want to make these an enum

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yah i looked at this, there are a couple of usages that dont follow this pattern yet

@jreback
Copy link
Contributor

jreback commented Jun 14, 2020

ahh guess merge something else, can you rebase again

@jbrockmendel
Copy link
Member Author

rebased+green. i think just one de-duplication branch after this

@jreback jreback merged commit b05e6b1 into pandas-dev:master Jun 15, 2020
@jbrockmendel jbrockmendel deleted the ref-liboffsets-dedup branch June 15, 2020 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants