BUG: reshape fix for maybe_infer_to_datetimelike() by RobinFiveWords · Pull Request #16395 · pandas-dev/pandas (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation12 Commits4 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
- closes BUG: Transpose construction/block error with certain dtypes #16362
- tests added / passed
- passes
git diff upstream/master --name-only -- '*.py' | flake8 --diff
- whatsnew entry
tests should always be included. generally I write them first to ensure that they are picking up the bug. you can push to this PR itself.
@jreback I might need some guidance...I might not have needed to touch this -- the branch had a new conflict, I imagine because of other merged PRs, but only with whatsnew. Now I'm not sure how to fix it back to a state where tests pass.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rebase on master
git pull origin/master
git rebase -i origin/master
then when pushing
git push yourupstream yourbranch -f
@@ -213,6 +213,13 @@ def test_maybe_convert_scalar(self): |
---|
result = maybe_convert_scalar(Timedelta('1 day 1 min')) |
assert result == Timedelta('1 day 1 min').value |
def test_maybe_infer_to_datetimelike(self): |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add the issue number here
def test_maybe_infer_to_datetimelike(self): |
---|
# this construction raises IndexError in pandas=0.20.1 |
result = DataFrame(np.array([[NaT, 'a', 'b', 0], |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use both examples from here: #16362 (comment)
and assert the result to an expected result == 8
pls add a whatsnew note in 0.20.2 (bug fixes, reshaping section)
RobinFiveWords added 3 commits
Does cd11b49 look like the full set of changes, aside from the whatsnew?
It looks like you lost some changes, but you should be able to recover them with your git reflog, assuming you haven't cleared it manually. Or maybe even a git reset --soft cd11b49
. If you ping me on gitter I can walk you through the recover steps.
@TomAugspurger thanks, didn't have much time today and thankfully this is such a small change so I just redid the changes. I did add one more test assertion this morning upon Jeff's recommendation, and that's included here as well.
TomAugspurger pushed a commit to TomAugspurger/pandas that referenced this pull request
closes pandas-dev#16362
Author: RobinFiveWords robinfishbein@Robins-MacBook-Pro.local
Closes pandas-dev#16395 from RobinFiveWords/cast-infer-datetime-reshape-fix and squashes the following commits:
7ad1e7d [RobinFiveWords] redid lost changes to cast.py and test_cast.py afa2eeb [RobinFiveWords] added whatsnew0.20.2 entry 7a35624 [RobinFiveWords] removed whatsnew entry again 2ec60a6 [RobinFiveWords] added back whatsnew change
(cherry picked from commit 05d0667)
TomAugspurger pushed a commit that referenced this pull request
closes #16362
Author: RobinFiveWords robinfishbein@Robins-MacBook-Pro.local
Closes #16395 from RobinFiveWords/cast-infer-datetime-reshape-fix and squashes the following commits:
7ad1e7d [RobinFiveWords] redid lost changes to cast.py and test_cast.py afa2eeb [RobinFiveWords] added whatsnew0.20.2 entry 7a35624 [RobinFiveWords] removed whatsnew entry again 2ec60a6 [RobinFiveWords] added back whatsnew change
(cherry picked from commit 05d0667)
stangirala pushed a commit to stangirala/pandas that referenced this pull request
closes pandas-dev#16362
Author: RobinFiveWords robinfishbein@Robins-MacBook-Pro.local
Closes pandas-dev#16395 from RobinFiveWords/cast-infer-datetime-reshape-fix and squashes the following commits:
7ad1e7d [RobinFiveWords] redid lost changes to cast.py and test_cast.py afa2eeb [RobinFiveWords] added whatsnew0.20.2 entry 7a35624 [RobinFiveWords] removed whatsnew entry again 2ec60a6 [RobinFiveWords] added back whatsnew change