Skip to content

implement non-controversial cleanup portions of #18762 #18959

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

Closed

Conversation

jbrockmendel
Copy link
Member

#18762 touches a lot of code and is currently in limbo pending discussion of roll_monthday and roll_convention. This separates out unrelated cleanup portions of that PR, the idea being that making the diff there simpler will make things easier.

  • closes #xxxx
  • tests added / passed
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

@codecov
Copy link

codecov bot commented Dec 27, 2017

Codecov Report

Merging #18959 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18959      +/-   ##
==========================================
+ Coverage   91.57%   91.59%   +0.02%     
==========================================
  Files         150      150              
  Lines       48964    48920      -44     
==========================================
- Hits        44838    44809      -29     
+ Misses       4126     4111      -15
Flag Coverage Δ
#multiple 89.95% <100%> (+0.02%) ⬆️
#single 41.16% <54.16%> (+0.03%) ⬆️
Impacted Files Coverage Δ
pandas/tseries/offsets.py 96.77% <100%> (-0.02%) ⬇️
pandas/core/indexes/timedeltas.py 91.08% <0%> (-0.18%) ⬇️
pandas/core/indexes/numeric.py 97.28% <0%> (-0.09%) ⬇️
pandas/core/indexes/interval.py 93.81% <0%> (-0.08%) ⬇️
pandas/core/series.py 94.61% <0%> (-0.05%) ⬇️
pandas/core/indexes/datetimes.py 95.57% <0%> (-0.05%) ⬇️
pandas/core/categorical.py 95.91% <0%> (-0.03%) ⬇️
pandas/core/panel.py 96.85% <0%> (ø) ⬆️
pandas/core/frame.py 97.68% <0%> (ø) ⬆️
pandas/core/indexes/base.py 96.45% <0%> (ø) ⬆️
... and 4 more

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 feef904...2393cd8. Read the comment docs.

day_opt : 'start', 'end'
'start': returns 1
'end': returns last day of the month
month : reference month giving the first month of the year
Copy link
Contributor

Choose a reason for hiding this comment

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

I would make this a required parameter and pass it. its more obvious.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good. Just pushed.

@jreback jreback added the Frequency DateOffsets label Dec 27, 2017
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.

may day_opt in shift_month required as well. optional args to these routines are quite error prone.

@jreback jreback added the Clean label Dec 27, 2017
@jreback
Copy link
Contributor

jreback commented Dec 27, 2017

looks fine. do we need additional test coverage of shift_months, roll_yearday to account for not having None's? (I think yes, if nothing broke with this change)

@jbrockmendel
Copy link
Member Author

do we need additional test coverage of shift_months, roll_yearday to account for not having None's? (I think yes, if nothing broke with this change)

I'm fine with adding that to the todo list, but don't want this PR to descend into yak shaving.

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.

this is not yak shaving. believe me you would know that! rather putting fixes in a single PR is better for review.

"""
Given an int64-based datetime index, shift all elements
specified number of months using DateOffset semantics

day: {None, 'start', 'end'}
day: {None, 'start', 'end', 'business_start', 'business_end'}
Copy link
Contributor

Choose a reason for hiding this comment

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

remove the None as a valid argument or is it? also need to fix the code

Copy link
Member Author

Choose a reason for hiding this comment

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

None is valid.

@jreback
Copy link
Contributor

jreback commented Dec 29, 2017

superseded by #18762

@jreback jreback closed this Dec 29, 2017
@jbrockmendel jbrockmendel deleted the semi_month_cleanup branch February 11, 2018 22:00
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