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

Query on multiple Pandas DataFrame #89

Merged
merged 3 commits into from
Aug 17, 2023
Merged

Query on multiple Pandas DataFrame #89

merged 3 commits into from
Aug 17, 2023

Conversation

auxten
Copy link
Member

@auxten auxten commented Aug 17, 2023

Support query like this:

import chdb.dataframe as cdf
import pandas as pd
# Join 2 DataFrames
df1 = pd.DataFrame({'a': [1, 2, 3], 'b': ["one", "two", "three"]})
df2 = pd.DataFrame({'c': [1, 2, 3], 'd': ["①", "②", "③"]})
ret_tbl = cdf.query(sql="select * from __tbl1__ t1 join __tbl2__ t2 on t1.a = t2.c",
                  tbl1=df1, tbl2=df2)
print(ret_tbl)
# Query on the DataFrame Table
print(ret_tbl.query('select b, sum(a) from __table__ group by b'))

@auxten auxten linked an issue Aug 17, 2023 that may be closed by this pull request
@auxten auxten merged commit c330249 into main Aug 17, 2023
auxten added a commit that referenced this pull request Nov 9, 2023
* Add dataframe.query() to run sql on multi dataframe

* Add join dataframe test

* Support passing dataframe as table
auxten added a commit that referenced this pull request Dec 8, 2023
* Add dataframe.query() to run sql on multi dataframe

* Add join dataframe test

* Support passing dataframe as table
auxten added a commit that referenced this pull request Jun 7, 2024
* Add dataframe.query() to run sql on multi dataframe

* Add join dataframe test

* Support passing dataframe as table
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 this pull request may close these issues.

Question About Query On Pandas DataFrame
1 participant