When attempting to use executemanycolumns with SQL Server, I get this error: "Unable to cast Python instance to C++ type (compile in debug mode for details) "
I know that Turbodbc does not like numpy nulls (NaN or NaT) so to remove these I use:
df= df.where((pd.notnull(df)), None)
After running this however, I then get an error saying a column is not contiguous. These are always columns of int64 datatype. To counteract this, I check each array using arr.flags['C_CONTIGUOUS'] and use np.ascontiguousarray(arr) if False. I then receive the "Unable to cast Python instance to C++ type (compile in debug mode for details) " error again.
My dataframe contains no NaNs or NaTs. Any idea as to what is causing this error? Thanks for any help!