Skip to content

how to understand __table__ of following code #199

Closed Answered by auxten
l1t1 asked this question in Q&A
Discussion options

You must be logged in to vote

If you want to refer ret_tbl itself, you must use __table__ which is something like self
Like:

ret_tbl.query('select b, sum(a) from __table__ group by b')

Otherwise, if you want to query on dataframe vars you can query with

cdf.query(sql="select * from __tbl1__ t1 join __tbl2__ t2 on t1.a = t2.c",
                   tbl1=df1, tbl2=df2)

where __tbl1__ refer to tbl1, __tbl2__ refer to tbl2

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by l1t1
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants