I have a dataframe with float columns, some values in which are NaN. I would like to write this dataframe to a snowflake database using the simple df.to_sql() function provided by pandas.
Here is the issue: snowflake only accepts NaN (not NULL) as a float value. to_sql(), on the other hand, tries to uses the value NULL when it constructs the sql statement as mentioned in this SO thread.
I don't see a way to override how to_sql tries to pass null values to the database in the docs for the to_sql function.
Can this value be overwritten (for FLOAT columns, specifically)? Otherwise I will probably have to manually construct these sql statements.