BUG: pprint_thing(..., quote_strings=True)
fails for strings with embedded single-quotes
#60190
Open
3 tasks done
Labels
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
The code above produces the incorrect
''510'
as output, instead of"'510"
as python does, or even'\'510'
.In the current master the cause is clear enough:
Either python's string
repr
could be used (assuming the rest of its behavior is fit for the purpose), or single-quotes could be explicitly backslash-escaped.Expected Behavior
As above.
Installed Versions
As above, but is present in GitHub master as of right now.
The text was updated successfully, but these errors were encountered: