Skip to content

Fixed WOM offset when n=0 #20549

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 9 commits into from
Apr 21, 2018
Merged

Fixed WOM offset when n=0 #20549

merged 9 commits into from
Apr 21, 2018

Conversation

asdf8601
Copy link
Contributor

@asdf8601 asdf8601 commented Mar 30, 2018

Checklist for other PRs (remove this part if you are doing a PR for the pandas documentation sprint):

asdf8601 added a commit to asdf8601/pandas that referenced this pull request Mar 30, 2018
asdf8601 added a commit to asdf8601/pandas that referenced this pull request Mar 30, 2018
@codecov
Copy link

codecov bot commented Mar 30, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@336fba7). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #20549   +/-   ##
=========================================
  Coverage          ?   91.82%           
=========================================
  Files             ?      153           
  Lines             ?    49305           
  Branches          ?        0           
=========================================
  Hits              ?    45274           
  Misses            ?     4031           
  Partials          ?        0
Flag Coverage Δ
#multiple 90.21% <ø> (?)
#single 41.89% <ø> (?)
Impacted Files Coverage Δ
pandas/tseries/offsets.py 97% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 336fba7...581bfe6. Read the comment docs.

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

@mmngreco can you add a whatsnew note (other enhancements section), and also a test for the date_range (both ones) as you indicated in the issue. otherwise lgtm. ping on green.

@asdf8601
Copy link
Contributor Author

asdf8601 commented Mar 31, 2018

Hi @jreback, I see travis fails https://travis-ci.org/pandas-dev/pandas/jobs/360472961, any idea whats going wrong?

@asdf8601
Copy link
Contributor Author

asdf8601 commented Apr 3, 2018

ping @jreback

@asdf8601
Copy link
Contributor Author

Sorry @jreback, I'm wondering if can I do someting to get this task done?

@jreback
Copy link
Contributor

jreback commented Apr 18, 2018

there is a lint issue

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

small comments, otherwise lgtm. ping on green.

@@ -403,8 +403,10 @@ Other Enhancements
``SQLAlchemy`` dialects supporting multivalue inserts include: ``mysql``, ``postgresql``, ``sqlite`` and any dialect with ``supports_multivalues_insert``. (:issue:`14315`, :issue:`8953`)
- :func:`read_html` now accepts a ``displayed_only`` keyword argument to controls whether or not hidden elements are parsed (``True`` by default) (:issue:`20027`)
- zip compression is supported via ``compression=zip`` in :func:`DataFrame.to_pickle`, :func:`Series.to_pickle`, :func:`DataFrame.to_csv`, :func:`Series.to_csv`, :func:`DataFrame.to_json`, :func:`Series.to_json`. (:issue:`17778`)
- Now is possible create a :class:`WeekOfMonth` offset with `n=0` (:issue:`20517`).
Copy link
Contributor

Choose a reason for hiding this comment

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

re-word this something like: :class:`WeekOfMonth` constuctor will support n=0

@@ -236,6 +236,10 @@ def test_catch_infinite_loop(self):
pytest.raises(Exception, date_range, datetime(2011, 11, 11),
datetime(2011, 11, 12), freq=offset)

def test_wom_len_one(self):
# https://github.com/pandas-dev/pandas/issues/20517
Copy link
Contributor

Choose a reason for hiding this comment

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

can you parametrize on periods=1, 2

@asdf8601
Copy link
Contributor Author

@jreback the JOB="3.5_OSX" travis fails, it doesn't seem to be related with my changes...

@jreback jreback added this to the 0.23.0 milestone Apr 21, 2018
@jreback jreback merged commit 7e75e4a into pandas-dev:master Apr 21, 2018
@jreback
Copy link
Contributor

jreback commented Apr 21, 2018

thanks @mmngreco

@asdf8601 asdf8601 deleted the feature/fix_wom branch April 21, 2018 18:38
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.

date_range fails when I try to generate ones with 1 periods and freq equal WOM-1MON
2 participants