Converting NaN to Oracle Nulls within Python Pandas
问题 I get this error on executing the below function & It is because NaN is tried to be inserted into numeric column. Replacing NaN with 0 throughout does work but replacement with None does not. Any ideas would be appreciated def insertData(table_name, schema_name, df): if not df.empty: #input_data[file].fillna(0, inplace=True) # This works but replacing with 0's is not ideal df.where(pd.notnull(df), None) #This does not work values = df.to_dict(orient='records') table = sa.Table(table_name ,