BUG: reshape fix for maybe_infer_to_datetimelike() #16395

Closed
wants to merge 4 commits into
from

Conversation

Projects
None yet
3 participants
@RobinFiveWords

RobinFiveWords commented May 20, 2017

  • closes #16362
  • tests added / passed
  • passes git diff upstream/master --name-only -- '*.py' | flake8 --diff
  • whatsnew entry
@jreback

This comment has been minimized.

Show comment
Hide comment
@jreback

jreback May 20, 2017

Contributor

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.

Contributor

jreback commented May 20, 2017

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.

@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot May 20, 2017

Codecov Report

Merging #16395 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16395      +/-   ##
==========================================
- Coverage   90.41%    90.4%   -0.01%     
==========================================
  Files         161      161              
  Lines       50997    50997              
==========================================
- Hits        46107    46106       -1     
- Misses       4890     4891       +1
Flag Coverage Δ
#multiple 88.24% <100%> (-0.01%) ⬇️
#single 40.19% <0%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/dtypes/cast.py 86.89% <100%> (ø) ⬆️
pandas/core/common.py 91.05% <0%> (-0.34%) ⬇️

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 0f55de1...be04d14. Read the comment docs.

codecov bot commented May 20, 2017

Codecov Report

Merging #16395 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16395      +/-   ##
==========================================
- Coverage   90.41%    90.4%   -0.01%     
==========================================
  Files         161      161              
  Lines       50997    50997              
==========================================
- Hits        46107    46106       -1     
- Misses       4890     4891       +1
Flag Coverage Δ
#multiple 88.24% <100%> (-0.01%) ⬇️
#single 40.19% <0%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/dtypes/cast.py 86.89% <100%> (ø) ⬆️
pandas/core/common.py 91.05% <0%> (-0.34%) ⬇️

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 0f55de1...be04d14. Read the comment docs.

@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot May 20, 2017

Codecov Report

Merging #16395 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #16395   +/-   ##
=======================================
  Coverage   90.42%   90.42%           
=======================================
  Files         161      161           
  Lines       51033    51033           
=======================================
  Hits        46148    46148           
  Misses       4885     4885
Flag Coverage Δ
#multiple 88.26% <100%> (ø) ⬆️
#single 40.17% <0%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/dtypes/cast.py 86.89% <100%> (ø) ⬆️

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 7271f50...7ad1e7d. Read the comment docs.

codecov bot commented May 20, 2017

Codecov Report

Merging #16395 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #16395   +/-   ##
=======================================
  Coverage   90.42%   90.42%           
=======================================
  Files         161      161           
  Lines       51033    51033           
=======================================
  Hits        46148    46148           
  Misses       4885     4885
Flag Coverage Δ
#multiple 88.26% <100%> (ø) ⬆️
#single 40.17% <0%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/dtypes/cast.py 86.89% <100%> (ø) ⬆️

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 7271f50...7ad1e7d. Read the comment docs.

@RobinFiveWords

This comment has been minimized.

Show comment
Hide comment
@RobinFiveWords

RobinFiveWords May 24, 2017

@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.

@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.

@jreback

rebase on master

git pull origin/master
git rebase -i origin/master

then when pushing

git push yourupstream yourbranch -f
pandas/tests/dtypes/test_cast.py
@@ -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):
+

This comment has been minimized.

@jreback

jreback May 24, 2017

Contributor

add the issue number here

@jreback

jreback May 24, 2017

Contributor

add the issue number here

pandas/tests/dtypes/test_cast.py
+ def test_maybe_infer_to_datetimelike(self):
+
+ # this construction raises IndexError in pandas=0.20.1
+ result = DataFrame(np.array([[NaT, 'a', 'b', 0],

This comment has been minimized.

@jreback

jreback May 24, 2017

Contributor

use both examples from here: #16362 (comment)

and assert the result to an expected result == 8

@jreback

jreback May 24, 2017

Contributor

use both examples from here: #16362 (comment)

and assert the result to an expected result == 8

@jreback

This comment has been minimized.

Show comment
Hide comment
@jreback

jreback May 24, 2017

Contributor

pls add a whatsnew note in 0.20.2 (bug fixes, reshaping section)

Contributor

jreback commented May 24, 2017

pls add a whatsnew note in 0.20.2 (bug fixes, reshaping section)

RobinFiveWords added some commits May 24, 2017

@TomAugspurger

This comment has been minimized.

Show comment
Hide comment
@TomAugspurger

TomAugspurger May 24, 2017

Contributor

Does cd11b49 look like the full set of changes, aside from the whatsnew?

Contributor

TomAugspurger commented May 24, 2017

Does cd11b49 look like the full set of changes, aside from the whatsnew?

@TomAugspurger

This comment has been minimized.

Show comment
Hide comment
@TomAugspurger

TomAugspurger May 24, 2017

Contributor

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.

Contributor

TomAugspurger commented May 24, 2017

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.

@RobinFiveWords

This comment has been minimized.

Show comment
Hide comment
@RobinFiveWords

RobinFiveWords May 24, 2017

@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 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.

@jreback jreback added this to the 0.20.2 milestone May 24, 2017

@jreback jreback closed this in 05d0667 May 24, 2017

@jreback

This comment has been minimized.

Show comment
Hide comment
@jreback

jreback May 24, 2017

Contributor
Contributor

jreback commented May 24, 2017

TomAugspurger added a commit to TomAugspurger/pandas that referenced this pull request May 29, 2017

BUG: reshape fix for maybe_infer_to_datetimelike()
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)

TomAugspurger added a commit that referenced this pull request May 30, 2017

BUG: reshape fix for maybe_infer_to_datetimelike()
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 added a commit to stangirala/pandas that referenced this pull request Jun 11, 2017

BUG: reshape fix for maybe_infer_to_datetimelike()
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

@RobinFiveWords RobinFiveWords deleted the RobinFiveWords:cast-infer-datetime-reshape-fix branch Jun 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment