You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to use .insert_df to insert a DataFrame into a ClickHouse table that includes a UInt256 column, the operation fails with an AttributeError. Specifically, it appears that the code attempts to call the to_bytes method on a numpy.int64 object, which does not have this method even when dtype of column is Python built-in int.
Steps to reproduce
Create a ClickHouse table with a UInt256 column.
Use the insert_df method a pandas DataFrame containing a column meant to populate the UInt256 column.
Observe error.
Expected behaviour
The .insert_df method should successfully convert the pandas DataFrame column to the appropriate format for insertion into the UInt256 column in ClickHouse.
Describe the bug
When attempting to use
.insert_df
to insert a DataFrame into a ClickHouse table that includes aUInt256
column, the operation fails with anAttributeError
. Specifically, it appears that the code attempts to call theto_bytes
method on anumpy.int64
object, which does not have this method even whendtype
of column is Python built-inint
.Steps to reproduce
UInt256
column.insert_df
method a pandas DataFrame containing a column meant to populate the UInt256 column.Expected behaviour
The
.insert_df
method should successfully convert the pandas DataFrame column to the appropriate format for insertion into theUInt256
column in ClickHouse.Code example
clickhouse-connect and/or ClickHouse server logs
Configuration
Environment
ClickHouse server
The text was updated successfully, but these errors were encountered: