Skip to content

How to return data as an arrow table instead of pandas dataframe? #6347

Discussion options

You must be logged in to vote

Hi @nikhilmakan02, I'd be interested in learning more about your use case here!

I don't think you can set the default of .execute() in any easy way -- I saw earlier that Ibis will likely move toward an explicit to_pandas() method in docs & examples to avoid any confusion.

You can output an Ibis table to Arrow with the to_pyarrow() (or to_pyarrow_batches()) method and create an Ibis table from an Arrow table with ibis.memtable(). I wasn't able to validate with mssql easily (just due to local setup issues) but did with another backend (clickhouse). Note that this would pull the entire table into local memory and could be slow and/or costly depending on your setup and size of data:

# import …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@gforsyth
Comment options

Answer selected by gforsyth
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
3 participants