-
Notifications
You must be signed in to change notification settings - Fork 105
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
PandasCursor converts NULL values in Sttring columns to empty String #168
Comments
It seems that the query in this example is wrong. In this case, what kind of query are you executing? |
@laughingman7743 Apologies, there was a copy-paste error in my second query. I've edited the original post. |
And regarding #118: I understand that I can use I guess this cannot be circumvented, as the information is already lost in the Athena-generated CSV? |
If you check the CSV file output from Athena, you'll see that empty characters are double-quoted, while null characters are not.
If you can handle them well, you should be able to identify null and empty characters. But I don't know how to configure the read_csv method's options to better read this CSV. |
I see. One approach would be to disable quoting and remove the quotes afterwards. With your example in mind:
This is not very elegant, but if CSVs written by Athena are guaranteed to contain quotes Strings, this should always work. What do you think? |
In #117, a fix was made for NULL results not being returned by PandasCursor. This now work as expected:
However, NULL values for String columns are secretly converted to empty Strings:
Is this the expected behaviour? I believe
NULL
should always be converted to NaN, regardless ofna_values
orkeep_default_na
.The text was updated successfully, but these errors were encountered: