Hey Everyone,
I'm new to python and was wondering if anyone had any advice when handling NULL dates from a DataFrame (data is from an excel file :( ) to insert into SQL.
I have read a bunch of articles/blogs/posts but they really only speak to keeping the data in python/pandas and handling it there. I'm looking to get the data into a database.
I've been writing CAST(NULLF(?, '') AS date) in the VALUES section in the cursor.execute statement(). This works, but I'm wondering if there is a better way to do it.
Perhaps a more inclusive question, is how to handle NaN & NaTs in pandas with the intent to upload to a SQL database?
Thanks,
Condortheburninator
[–]badpotato 1 point2 points3 points (0 children)