Quantcast
Viewing all articles
Browse latest Browse all 14011

Insert data from dataframe to clickhouse table ERROR

I'm trying to insert data from dataframe to my clickhouse table. Types are matching, I don't have any FLOAT fields, still get an error: 'TypeError: object of type 'float' has no len()'

Table table_main:

client.command('''CREATE TABLE db1.table_main (                 scroll_id String,                took Int64,                timed_out Boolean,                shards_total Int64,                shards_successful Int64,                shards_skipped Int64,                shards_failed Int64,                hits_total_value Int64,                hits_total_relation String,                hits_max_score String,                key Int64,                terminated_early String)                 ENGINE MergeTree                ORDER BY key''')

Dataframe table_main:

scroll_id              objecttook                    int64timed_out                boolshards_total            int64shards_successful       int64shards_skipped          int64shards_failed           int64hits_total_value        int64hits_total_relation    objecthits_max_score         objectkey                     int64terminated_early       objectdtype: object

Command:

client.insert_df('db1.table_main', table_main)

Could you please give any guess what's wrong?Thanks a lot.


Viewing all articles
Browse latest Browse all 14011

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>