Open alenastern opened 5 years ago
I don't see the full trace, but I'm guessing this is because aequitas relies on pandas to create the table, and pandas imputes column types?
I would guess the easiest way to ensure these are proper is to pass dtype={…}
, e.g.:
data_frame.pg_copy_to(
'aequitas_group',
engine,
dtype={
'col0': sqlalchemy.Boolean,
…
}
)
Alternatively, you could remove columns that have null values by doing something like
data_frame.drop(data_frame.columns[[#fill with col numbers that need to be removed]], axis=1, inplace=True)
Another way to remove null values is to use Pandas dataframe dropna( ) function
new_data_frame = data_frame.dropna()
doing this will return a new dataframe with the rows/cols with Null/NaN values removed. More info on pandas dropna() function can be found here
Issue with writing new rows to table when previous rows in column had null value. Postgres expects double precision when col should be boolean per error message below.