-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
ERR: Disallow multi-char quotechar for C engine #15050
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
ERR: Disallow multi-char quotechar for C engine #15050
Conversation
c9e624d
to
a06b68b
Compare
Current coverage is 84.76% (diff: 100%)@@ master #15050 diff @@
==========================================
Files 145 145
Lines 51146 51151 +5
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 43350 43356 +6
+ Misses 7796 7795 -1
Partials 0 0
|
a06b68b
to
61babcc
Compare
@jreback : Any comments on this PR? Otherwise, everything is green and ready to go. |
@@ -246,6 +246,7 @@ Other API Changes | |||
- ``DataFrame.applymap()`` with an empty ``DataFrame`` will return a copy of the empty ``DataFrame`` instead of a ``Series`` (:issue:`8222`) | |||
|
|||
- ``pd.read_csv()`` will now issue a ``ParserWarning`` whenever there are conflicting values provided by the ``dialect`` parameter and the user (:issue:`14898`) | |||
- ``pd.read_csv()`` will now raise a ``ValueError`` for the C engine if the quote character has a length greater than one (:issue:`11592`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First I misread as multiple characters issue. Should it say single byte character?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds more logical indeed. Done.
engine not in ('python', 'python-fwf')): | ||
fallback_reason = ("the quotechar is > 1 char long, and " | ||
"the 'c' engine does not support such " | ||
"quotechars".format(encoding=encoding)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
encoding
is not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's nice to the reason is more clearer, like "quotechar must be a single byte character, which ord(quotechar) <= 127". pls correct my English:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch fixed.
Raise ValueError or issue ParserWarning when a multi-char quotechar is passed in, and the C engine is used. Closes pandas-devgh-11592.
61babcc
to
68d69fe
Compare
@sinhrks : Addressed all of your comments, and everything is still green. |
Raise
ValueError
or issueParserWarning
(as we do with other unsupported features) when a multi-charquotechar
is passed in, and the C engine is used.Closes #11592.