When using read_sql
in pandas, some None data from DB will be converted to 0/Nan, while other None stay as None.
- Q #1: how does pandas determine when to convert None to zero or None to Nan, and when not to convert None (leave as is)
I understand that I can set coerce_float=False
to disable this auto-conversion.
- Q #2 I wonder, is there a way to just avoid converting
None
data but still try converting other not-None data?
Note:
- Sorry, I don't have the required reputation to add
pandas
tag. Please help if you can.