Skip to content
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

Convert chdb result to pandas/DataFrame format #4

Closed
auxten opened this issue Apr 10, 2023 · 1 comment · Fixed by #6
Closed

Convert chdb result to pandas/DataFrame format #4

auxten opened this issue Apr 10, 2023 · 1 comment · Fixed by #6

Comments

@auxten
Copy link
Member

auxten commented Apr 10, 2023

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
Copy link
Member Author

auxten commented Apr 11, 2023

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

@auxten auxten linked a pull request Apr 16, 2023 that will close this issue
@auxten auxten closed this as completed Apr 16, 2023
auxten added a commit that referenced this issue Sep 24, 2024
    root@0a8b55995b6e:/auxten/chdb# python utils/rej_to_patch.py src/Client/ClientBase.h.rej
    Conversion complete: src/Client/ClientBase.h.patch
    root@0a8b55995b6e:/auxten/chdb# patch -p1 --fuzz=10 < src/Client/ClientBase.h.patch
    patching file src/Client/ClientBase.h
    Hunk #1 FAILED at 1.
    Hunk #2 FAILED at 61.
    Hunk #3 succeeded at 241 with fuzz 1 (offset 42 lines).
    Hunk #4 succeeded at 292 with fuzz 1 (offset 41 lines).
    Hunk #5 succeeded at 331 with fuzz 3 (offset 47 lines).
    2 out of 5 hunks FAILED -- saving rejects to file src/Client/ClientBase.h.rej
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant