chdb-io / chdb

chDB is an in-process OLAP SQL Engine 🚀 powered by ClickHouse
https://clickhouse.com/docs/en/chdb
Apache License 2.0
2.03k stars 72 forks source link

Convert chdb result to pandas/DataFrame format #4

Closed auxten closed 1 year ago

auxten commented 1 year ago

Use case

Convert chdb result to pandas/DataFrame format

Describe the solution you'd like

Make chdb query result work with pandas

Describe alternatives you've considered

Maybe a built-in  result.to_df() method or just an example of to_df(result).

Additional context

This requirement has the following constraints

  1. Do not add necessary external Python library dependent implementations for chdb, similar to pyarrow
  2. Try not to add additional C++ library dependencies
  3. result.to_df() is recommended, but it is also acceptable to provide a utility function similar to to_df(result)
auxten commented 1 year ago

Maybe a better way query("select 1", Dataframe)