I had a simillar situation, while converting some Postgres Databases into MySQL.
I tried other solutions, until I found your post.
The approach that worked clean and softly, was inserting this line, after saving the rows on a DataFrame variable:
data = data.astype(object).where(pandas.notnull(data), None)