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

Proper boxing of scalars in DataFrame.to_dict #23921

Merged
merged 8 commits into from
Dec 2, 2018

Conversation

bourbaki
Copy link
Contributor

@bourbaki bourbaki commented Nov 26, 2018

@pep8speaks
Copy link

pep8speaks commented Nov 26, 2018

Hello @Ma3aXaKa! Thanks for updating the PR.

Comment last updated on November 28, 2018 at 15:07 Hours UTC

@gfyoung gfyoung added Bug Dtype Conversions Unexpected or buggy dtype conversions Numeric Operations Arithmetic, Comparison, and Logical operations DataFrame DataFrame data structure labels Nov 26, 2018
Copy link
Member

@gfyoung gfyoung left a comment

Choose a reason for hiding this comment

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

Good start! I left some comments. In general, I would try to refrain from making too many extraneous changes (i.e. unrelated to the actual fix / PR). For larger PR's, it would certainly complicate reviewing.

doc/source/whatsnew/v0.23.5.txt Outdated Show resolved Hide resolved
pandas/core/frame.py Outdated Show resolved Hide resolved
pandas/core/frame.py Outdated Show resolved Hide resolved
pandas/core/frame.py Outdated Show resolved Hide resolved
pandas/tests/frame/test_convert_to.py Outdated Show resolved Hide resolved
pandas/tests/frame/test_convert_to.py Outdated Show resolved Hide resolved
@bourbaki
Copy link
Contributor Author

OK, thanks for the review. I will fix it tomorrow.

@bourbaki
Copy link
Contributor Author

done

@gfyoung
Copy link
Member

gfyoung commented Nov 27, 2018

@Ma3aXaKa : This is looking good! Can you fix the merge conflict in the whatsnew?

@bourbaki
Copy link
Contributor Author

done

@bourbaki
Copy link
Contributor Author

there are some strange errors in CI

@gfyoung
Copy link
Member

gfyoung commented Nov 28, 2018

@Ma3aXaKa : Looks like you have a linting failure

https://travis-ci.org/pandas-dev/pandas/jobs/460677489#L2851

@bourbaki
Copy link
Contributor Author

bourbaki commented Nov 28, 2018

Hm. Now it's failing on CircleCI with some error in timeseries test.

@bourbaki
Copy link
Contributor Author

bourbaki commented Dec 1, 2018

@gfyoung Could you launch a rebuild on CircleCI?

@codecov
Copy link

codecov bot commented Dec 2, 2018

Codecov Report

Merging #23921 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #23921      +/-   ##
==========================================
+ Coverage   92.31%   92.31%   +<.01%     
==========================================
  Files         161      161              
  Lines       51471    51473       +2     
==========================================
+ Hits        47515    47517       +2     
  Misses       3956     3956
Flag Coverage Δ
#multiple 90.7% <100%> (ø) ⬆️
#single 42.43% <0%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/frame.py 97.02% <100%> (ø) ⬆️
pandas/plotting/_core.py 83.63% <0%> (ø) ⬆️
pandas/plotting/_compat.py 87.5% <0%> (ø) ⬆️
pandas/plotting/_style.py 77.41% <0%> (ø) ⬆️
pandas/plotting/_timeseries.py 65.28% <0%> (ø) ⬆️
pandas/plotting/_misc.py 38.68% <0%> (ø) ⬆️
pandas/plotting/_converter.py 63.67% <0%> (ø) ⬆️
pandas/plotting/_tools.py 78.77% <0%> (ø) ⬆️
pandas/io/formats/style.py 96.71% <0%> (+0.01%) ⬆️

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 0e7cf48...e3f2d13. Read the comment docs.

3 similar comments
@codecov
Copy link

codecov bot commented Dec 2, 2018

Codecov Report

Merging #23921 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #23921      +/-   ##
==========================================
+ Coverage   92.31%   92.31%   +<.01%     
==========================================
  Files         161      161              
  Lines       51471    51473       +2     
==========================================
+ Hits        47515    47517       +2     
  Misses       3956     3956
Flag Coverage Δ
#multiple 90.7% <100%> (ø) ⬆️
#single 42.43% <0%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/frame.py 97.02% <100%> (ø) ⬆️
pandas/plotting/_core.py 83.63% <0%> (ø) ⬆️
pandas/plotting/_compat.py 87.5% <0%> (ø) ⬆️
pandas/plotting/_style.py 77.41% <0%> (ø) ⬆️
pandas/plotting/_timeseries.py 65.28% <0%> (ø) ⬆️
pandas/plotting/_misc.py 38.68% <0%> (ø) ⬆️
pandas/plotting/_converter.py 63.67% <0%> (ø) ⬆️
pandas/plotting/_tools.py 78.77% <0%> (ø) ⬆️
pandas/io/formats/style.py 96.71% <0%> (+0.01%) ⬆️

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 0e7cf48...e3f2d13. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 2, 2018

Codecov Report

Merging #23921 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #23921      +/-   ##
==========================================
+ Coverage   92.31%   92.31%   +<.01%     
==========================================
  Files         161      161              
  Lines       51471    51473       +2     
==========================================
+ Hits        47515    47517       +2     
  Misses       3956     3956
Flag Coverage Δ
#multiple 90.7% <100%> (ø) ⬆️
#single 42.43% <0%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/frame.py 97.02% <100%> (ø) ⬆️
pandas/plotting/_core.py 83.63% <0%> (ø) ⬆️
pandas/plotting/_compat.py 87.5% <0%> (ø) ⬆️
pandas/plotting/_style.py 77.41% <0%> (ø) ⬆️
pandas/plotting/_timeseries.py 65.28% <0%> (ø) ⬆️
pandas/plotting/_misc.py 38.68% <0%> (ø) ⬆️
pandas/plotting/_converter.py 63.67% <0%> (ø) ⬆️
pandas/plotting/_tools.py 78.77% <0%> (ø) ⬆️
pandas/io/formats/style.py 96.71% <0%> (+0.01%) ⬆️

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 0e7cf48...e3f2d13. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 2, 2018

Codecov Report

Merging #23921 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #23921      +/-   ##
==========================================
+ Coverage   92.31%   92.31%   +<.01%     
==========================================
  Files         161      161              
  Lines       51471    51473       +2     
==========================================
+ Hits        47515    47517       +2     
  Misses       3956     3956
Flag Coverage Δ
#multiple 90.7% <100%> (ø) ⬆️
#single 42.43% <0%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/frame.py 97.02% <100%> (ø) ⬆️
pandas/plotting/_core.py 83.63% <0%> (ø) ⬆️
pandas/plotting/_compat.py 87.5% <0%> (ø) ⬆️
pandas/plotting/_style.py 77.41% <0%> (ø) ⬆️
pandas/plotting/_timeseries.py 65.28% <0%> (ø) ⬆️
pandas/plotting/_misc.py 38.68% <0%> (ø) ⬆️
pandas/plotting/_converter.py 63.67% <0%> (ø) ⬆️
pandas/plotting/_tools.py 78.77% <0%> (ø) ⬆️
pandas/io/formats/style.py 96.71% <0%> (+0.01%) ⬆️

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 0e7cf48...e3f2d13. Read the comment docs.

@jreback jreback added this to the 0.24.0 milestone Dec 2, 2018
@jreback
Copy link
Contributor

jreback commented Dec 2, 2018

lgtm. @gfyoung over to you.

@gfyoung gfyoung merged commit 92d25f0 into pandas-dev:master Dec 2, 2018
@gfyoung
Copy link
Member

gfyoung commented Dec 2, 2018

Thanks @Ma3aXaKa !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug DataFrame DataFrame data structure Dtype Conversions Unexpected or buggy dtype conversions Numeric Operations Arithmetic, Comparison, and Logical operations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataFrame.to_dict returning numpy scalars in certain cases
4 participants