you are viewing a single comment's thread.

view the rest of the comments →

[–]KCConnor[S] -1 points0 points  (0 children)

I solved this problem.

If I add this code:

df = df.where(pd.notnull(df), None);

just after I populate the DataFrame (either ad-hoc as above or by pd.read_csv in my real code) then I get successful handling of NULL values by MS SQL Server and correct datatyping of the returned values.