Skip to content
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

Custom Business Month #6866

Merged
merged 1 commit into from
Apr 22, 2014
Merged

Custom Business Month #6866

merged 1 commit into from
Apr 22, 2014

Conversation

bjonen
Copy link
Contributor

@bjonen bjonen commented Apr 10, 2014

This extends the offsets.py module with a CBMonthEnd based on CustomBusinessDay. Tests are found in test_offsets.py.

A few small points still open:

  • Implement CBMonthBegin
  • Improve speed. Main speed drag is DateOffset.onOffset.

Also some of the tests are not passing, but the errors seem unrelated.
e.g.

======================================================================
ERROR: test_pickle (pandas.tseries.tests.test_timeseries.TestTimeSeries)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/benjamin/workspace/pandas/pandas/tseries/tests/test_timeseries.py", line 1827, in test_pickle
    p = pick.loads(pick.dumps(NaT))
  File "/usr/lib/python2.7/pickle.py", line 1382, in loads
    return Unpickler(file).load()
  File "/usr/lib/python2.7/pickle.py", line 858, in load
    dispatch[key](self)
  File "/usr/lib/python2.7/pickle.py", line 1133, in load_reduce
    value = func(*args)
TypeError: __new__() takes exactly one argument (2 given)

@jreback
Copy link
Contributor

jreback commented Apr 10, 2014

did u rebuild extensions? this was just added in cython

python setup.py build_ext --inplace

@bjonen
Copy link
Contributor Author

bjonen commented Apr 11, 2014

Ok that was part of it. Apparently Travis is on numpy 1.6 so the CBMonth (requires numpy 1.7) tests are failing.

@jreback
Copy link
Contributor

jreback commented Apr 11, 2014

their are multiple versions of numpy tested with Travis
look at the very end of the build u can see the print_versions

@bjonen
Copy link
Contributor Author

bjonen commented Apr 11, 2014

Ah good hint, found the problem, will send an update later tonight.

@bjonen
Copy link
Contributor Author

bjonen commented Apr 13, 2014

I added CBMonthBegin and squashed the changes. Anything else to do?

@jreback
Copy link
Contributor

jreback commented Apr 13, 2014

pls rebase (u need to incorporate #6873 the apply_nat)

@bjonen
Copy link
Contributor Author

bjonen commented Apr 13, 2014

How should I reference the enhancement in v0.14.0.txt? :issue:6866 ?

@jreback
Copy link
Contributor

jreback commented Apr 13, 2014

yep (when no associated issue the pr number works too)

@bjonen
Copy link
Contributor Author

bjonen commented Apr 13, 2014

Rebased, added a small section to the docs. Anything else?

@jreback
Copy link
Contributor

jreback commented Apr 13, 2014

can u do the Apply_nat decorator like other apply? it's just more consistent that way

@jorisvandenbossche @TomAugspurger

comments?

@jreback jreback added this to the 0.14.0 milestone Apr 22, 2014
@jreback
Copy link
Contributor

jreback commented Apr 22, 2014

@bjonen can you rebase?

@bjonen
Copy link
Contributor Author

bjonen commented Apr 22, 2014

done

jreback added a commit that referenced this pull request Apr 22, 2014
@jreback jreback merged commit e8e64ef into pandas-dev:master Apr 22, 2014
@jreback
Copy link
Contributor

jreback commented Apr 22, 2014

thank you sir!

@jreback
Copy link
Contributor

jreback commented Apr 22, 2014

FYI, had to do this little patch a189d5d

was failing on windows 2.6 for some reason (and not sure why didn't fail on linux)

@bjonen
Copy link
Contributor Author

bjonen commented Apr 23, 2014

Ok, thanks!

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