-
-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pandas interop #9
Comments
Hi, @kszucs! Integration with different data sources is a good idea. But it should be in wrapper packages, not in the core package. There are many sources to integrate with. Interfaces for communication can change really fast. Unfortunately I'm not familiar with all data sources and I can't stay in touch with these changes. You can write you wrapper and place it on pypi. Feel free to ask if you need any information about integration. I'll try to help. Note: latest release contains version of driver: from clickhouse_driver import VERSION It might help with flawless integration. |
Hi @xzkostyan Actually I try to implement a columnar version of I'm kinda blocked because the tests are running really slowly (I don't know why), so instead I share my findings: master...kszucs:columnar_block |
Hi, @kszucs. Yup, you are right. There is some inconsistencies in
That's why You can check this branch: https://github.com/mymarilyn/clickhouse-driver/tree/feature-deferred-rows-length-validation. There are some speed optimizations on If you want to do some research on performance you can use following profiling snippets: from clickhouse_driver import Client
c = Client('localhost')
%prun c.execute('SELECT * FROM large_table') from clickhouse_driver import Client
c = Client('localhost')
%prun c.execute('INSERT INTO test (a, b, c) VALUES', [(x, x, x) for x in range(N)]) |
If you need only to implement columnar version of That's it. |
I've created a PR according to your comment. |
@xzkostyan would You mint to draft a new release? I'd like to use here the columnar result extending fix. |
Sure! I'll make new release on Saturday or Sunday. |
Great! Thanks Kostya! |
Hi, @kszucs! 0.0.8 version is released. |
Eventually pandas interop will be released in ibis, so I'm closing this ticket now. Thanks! |
It might worth considering to support (optionally) pandas dataframes as inputs and outputs in clickhouse-driver.
Creating pandas dataframe would be quite straightforward from the block stream before transposing to row oriented block.
Here is a basic pandas dtype -> clickhouse type mapping: https://github.com/kszucs/ibis/blob/0101250a9d96f6a387129fcd770f3e092856dc56/ibis/clickhouse/types.py#L14
@xzkostyan would You like to include pandas support?
The text was updated successfully, but these errors were encountered: