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

Change default of float_precision for read_csv and read_table to "high" #36228

Merged
merged 8 commits into from
Sep 13, 2020

Conversation

Dr-Irv
Copy link
Contributor

@Dr-Irv Dr-Irv commented Sep 8, 2020

  • closes read_csv returns different float values for same number #17154
  • tests added / passed
    • modified tests/io/parser/test_c_parser.py to make sure all 4 options are tested
    • added tests/io/parser/test_c_parser.py:test_high_is_default
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry
    • for version 1.2

See discussion at bottom of #36149 for the performance tests. Added float_precision="legacy" so people can pick up the old parser. Can't change default to "high" because of incompatibility with python parser

@Dr-Irv Dr-Irv added this to the 1.2 milestone Sep 8, 2020
@pep8speaks
Copy link

pep8speaks commented Sep 8, 2020

Hello @Dr-Irv! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-09-11 22:09:32 UTC

@Dr-Irv Dr-Irv requested a review from jreback September 9, 2020 01:30
@WillAyd
Copy link
Member

WillAyd commented Sep 9, 2020

If there is no performance difference should we not just get rid of the legacy parsing altogether?

@WillAyd WillAyd added the IO CSV read_csv, to_csv label Sep 9, 2020
@Dr-Irv
Copy link
Contributor Author

Dr-Irv commented Sep 9, 2020

If there is no performance difference should we not just get rid of the legacy parsing altogether?

My only concern here is that maybe someone has code that inadvertently depends on it, so we have to keep it in there for some form of compatibility. I do think we could deprecate the legacy parsing

@jreback
Copy link
Contributor

jreback commented Sep 9, 2020

yep that sounds fine to leave th option

just update the doc string to indicate

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

lgtm

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.

minor comments

@jreback jreback requested a review from gfyoung September 11, 2020 12:59
@Dr-Irv
Copy link
Contributor Author

Dr-Irv commented Sep 11, 2020

@jreback added the check for an invalid float_precision option and now all green

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.

great @Dr-Irv very minor comment can be addressed in a followon (if needed)

@@ -2299,6 +2299,7 @@ def TextParser(*args, **kwds):
values. The options are None for the ordinary converter,
'high' for the high-precision converter, and 'round_trip' for the
round-trip converter.
.. versionchanged:: 1.2
Copy link
Contributor

Choose a reason for hiding this comment

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

check that tis renders ok, I think need a blank line after

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO CSV read_csv, to_csv
Projects
None yet
Development

Successfully merging this pull request may close these issues.

read_csv returns different float values for same number
4 participants