I have a function like this:
import ibis def my_function(df): t = ibis.memtable(df) t = t.mutate(ibis._['a'] + 1) return to.to_arrow() My question is - if I pass it a pandas dataframe, then which backend is t going to use to do its calculations? The pandas one, or the duckdb one (which the docs say is the default)?
Also:
- how do I force it to use the pandas backend?
- how do I force it to use the duckdb backend?
Note that my_function needs to receive a dataframe as input, I can't change that. But inside my_function, I'd like to use Ibis.
set_backend-- note that without that, DuckDB is the default backend. In terms of needing to receive a dataframe as input, all of our backends can use Pandas DataFrame as an input format, you don't need to use thepandasbackend for this (and in fact, we recommend using DuckDB, it will be faster)