I have a pandas df like this:
A B C D E F G H
0 1033548.0 0.0 20190324.0 2019-04-13 NaT 10176.0 NaN 40360001.0
1 1033549.0 0.0 20190324.0 2019-04-13 2019-04-13 10182.0 NaN 41360562.0
2 1033550.0 0.0 20190324.0 2019-04-13 NaT 10433.0 NaN 45180156.0
3 1033551.0 0.0 20190324.0 2019-04-13 NaT 10019.0 123 NaN
4 1033552.0 0.0 20190324.0 2019-04-13 NaT 10333.0 NaN 40120165.0
5 1033553.0 0.0 20190324.0 2019-04-13 NaT 10246.0 NaN 40820596.0
6 1033554.0 0.0 20190324.0 NaT NaT 10107.0 NaN NaN
7 1033555.0 0.0 20190324.0 2019-04-13 NaT 10131.0 NaN 41190549.0
8 1033556.0 0.0 20190324.0 2019-04-13 NaT 10057.0 NaN 40430581.0
9 1033557.0 0.0 20190324.0 2019-04-13 NaT 10009.0 NaN 40360012.0
I want to write this df to my Oracle Database Table
using SQL Insert Statement
. But since my df contains NaNs and NaTs, so its giving me error: cx_Oracle.DatabaseError: DPI-1043: invalid number
.
How can I write this df to the oracle table using SQL which will not give me any error?
Any help would be appreciated.