chdb
chdb copied to clipboard
Support complex type in Python Table Engine like Array and Map, Object
Code snippet to reproduce:
df = pd.read_parquet(f'{GRAPHRAG_FOLDER}/create_final_community_reports.parquet',
columns=["id","community","level","title","summary", "findings","rank","rank_explanation"])
batched_import(statement, df)
df.head(2)
df.dtypes
import chdb
df=df.astype({'id': 'string'})
df2=df[["id","level","rank"]]
chdb.query("FROM Python(df2) SELECT max(id),sum(level),avg(rank) group by all").show()
df.dtypes