-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
pandas.read_sql_table switches double quotation wrapping keys and values to single quotation in JSON columns #30087
Comments
Same issue here. pd.show_versions()INSTALLED VERSIONScommit : 66e3805 pandas : 1.3.5 |
im facing the same issue unfortunately. |
I stumbled upon this issue as well 😢 |
I solved it, temporarily, by using https://docs.python.org/3/library/ast.html#ast.literal_eval |
+1 |
Code Sample
Problem description
I used
pandas.read_sql_table()
to fetch a table, in which there is a JSON column. In the returned dataframe, the double quotations wrapping the keys and values are all changed to single quotations.Example of returned dataframe:
However, JSON standards requires double quotation, on top of that, other Python package like
json
doesn't recognize JSON with single quotations.Expected Output
Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: