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

Fix misdescription in escapechar #24490

Merged
merged 3 commits into from Dec 30, 2018
Merged

Fix misdescription in escapechar #24490

merged 3 commits into from Dec 30, 2018

Conversation

thoo
Copy link
Contributor

@thoo thoo commented Dec 29, 2018

@codecov
Copy link

codecov bot commented Dec 29, 2018

Codecov Report

Merging #24490 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24490   +/-   ##
=======================================
  Coverage    92.3%    92.3%           
=======================================
  Files         166      166           
  Lines       52386    52386           
=======================================
  Hits        48357    48357           
  Misses       4029     4029
Flag Coverage Δ
#multiple 90.73% <ø> (ø) ⬆️
#single 43.07% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/io/parsers.py 95.38% <ø> (ø) ⬆️

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 41b2b18...3d257a1. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 29, 2018

Codecov Report

Merging #24490 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24490   +/-   ##
=======================================
  Coverage   92.31%   92.31%           
=======================================
  Files         166      166           
  Lines       52412    52412           
=======================================
  Hits        48382    48382           
  Misses       4030     4030
Flag Coverage Δ
#multiple 90.73% <ø> (ø) ⬆️
#single 43.05% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/io/parsers.py 95.38% <ø> (ø) ⬆️

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 1ebfd8a...8bea992. Read the comment docs.

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.

@thoo : Thanks for submitting this!

Unfortunately, I think your change, while it does remove the dependence on the quoting variable, makes the description more complicated for end-users. Is it possible to simplify the description?

Also, if you could also correct the default value for the quoting parameter in the docs, that would be great to fully close out this issue.

@gfyoung gfyoung added Docs IO CSV read_csv, to_csv labels Dec 30, 2018
@thoo
Copy link
Contributor Author

thoo commented Dec 30, 2018

@gfyoung Thanks for the review. I thought quoting = 0 is the default for pandas.read_csv. Am I looking at the wrong location?

pandas/pandas/io/parsers.py

Lines 577 to 580 in 1ebfd8a

quotechar='"',
quoting=csv.QUOTE_MINIMAL,
doublequote=True,
escapechar=None,

Any suggestion for the description of escapechar? My impression was the name escapechar itself is already a simple description.

@gfyoung
Copy link
Member

gfyoung commented Dec 30, 2018

Thanks for the review. I thought quoting = 0 is the default for pandas.read_csv. Am I looking at the wrong location?

@thoo : Ah, indeed, you are correct. Then it should be left alone. 🙂

Any suggestion for the description of escapechar? My impression was the name escapechar itself is already a simple description.

How about "One-character string used to escape other characters"

@thoo
Copy link
Contributor Author

thoo commented Dec 30, 2018

@gfyoung Done.

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

jreback commented Dec 30, 2018

lgtm. over to you @gfyoung

@gfyoung gfyoung merged commit 9267e27 into pandas-dev:master Dec 30, 2018
@gfyoung
Copy link
Member

gfyoung commented Dec 30, 2018

Thanks @thoo !

thoo added a commit to thoo/pandas that referenced this pull request Dec 30, 2018
* upstream/master:
  DOC: Fixing broken references in the docs (pandas-dev#24497)
  DOC: Splitting api.rst in several files (pandas-dev#24462)
  Fix misdescription in escapechar (pandas-dev#24490)
  Floor and ceil methods during pandas.eval which are provided by numexpr (pandas-dev#24355)
  BUG: Pandas any() returning false with true values present (GH pandas-dev#23070) (pandas-dev#24434)
  Misc separable pieces of pandas-dev#24024 (pandas-dev#24488)
  use capsys.readouterr() as named tuple (pandas-dev#24489)
  REF/TST: replace capture_stderr with pytest capsys fixture (pandas-dev#24496)
  TST- Fixing issue with test_parquet test unexpectedly passing (pandas-dev#24480)
  DOC: Doc build for a single doc made much faster, and clean up (pandas-dev#24428)
  BUG: Fix+test timezone-preservation in DTA.repeat (pandas-dev#24483)
  Implement reductions from pandas-dev#24024 (pandas-dev#24484)
thoo added a commit to thoo/pandas that referenced this pull request Dec 30, 2018
…strings

* upstream/master:
  TST: Skip db tests unless explicitly specified in -m pattern (pandas-dev#24492)
  Mix EA into DTA/TDA; part of 24024 (pandas-dev#24502)
  DOC: Fix building of a single API document (pandas-dev#24506)
  DOC: Fixing broken references in the docs (pandas-dev#24497)
  DOC: Splitting api.rst in several files (pandas-dev#24462)
  Fix misdescription in escapechar (pandas-dev#24490)
  Floor and ceil methods during pandas.eval which are provided by numexpr (pandas-dev#24355)
  BUG: Pandas any() returning false with true values present (GH pandas-dev#23070) (pandas-dev#24434)
  Misc separable pieces of pandas-dev#24024 (pandas-dev#24488)
  use capsys.readouterr() as named tuple (pandas-dev#24489)
  REF/TST: replace capture_stderr with pytest capsys fixture (pandas-dev#24496)
  TST- Fixing issue with test_parquet test unexpectedly passing (pandas-dev#24480)
  DOC: Doc build for a single doc made much faster, and clean up (pandas-dev#24428)
  BUG: Fix+test timezone-preservation in DTA.repeat (pandas-dev#24483)
  Implement reductions from pandas-dev#24024 (pandas-dev#24484)
@thoo thoo deleted the read_csv-doc branch January 2, 2019 20:26
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs IO CSV read_csv, to_csv
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: Weird documentation (or behavior) of pd.read_csv escapechar= arg
3 participants