ajfriend / pdx

3 stars 0 forks source link

potential confusion points #1

Open ajfriend opened 1 year ago

ajfriend commented 1 year ago

df.sql(s) might be the intended, but users will probably first try writing df.query(s). but query is already used by pandas...

does that mean it makes sense to prefix with df.pqd.query?

ajfriend commented 1 year ago

There's a risk that a query works "accidentally" without specifying the table/df correspondence because duckdb looks for dataframe names in scope. can we turn off this behavior?

# df.sql('select * from df where hour(ts_utc) = 8') # note!! this works because of duckdb defaults
df.sql('select * from tbl where hour(ts_utc) = 8', tbl=tbl2)