itables icon indicating copy to clipboard operation
itables copied to clipboard

feat: support Ibis tables (dataframes)

Open lostmygithubaccount opened this issue 1 year ago • 4 comments

Ibis is a portable Python dataframe library, initially created by the same creator of pandas. Today, it's a well-maintained project that supports 20+ backends including pandas, Polars, Dask, Snowflake, Spark, Oracle, BigQuery, etc.

Ibis tables (dataframes) have to_pandas() and to_pyarrow()/to_pyarrow_batches() methods, so you could already use it with itables, but it'd be good to have more official support and documentation

motivation for this request is that I want to switch over our Ibis analytics dashboard from a Streamlit app to a Quarto dashboard, and perhaps put it directly on the Ibis website

lostmygithubaccount avatar Jan 12 '24 17:01 lostmygithubaccount

Hi, thanks for suggesting this! That's very interesting, and yes I would be very happy to provide support for Ibis. Quick questions for you:

  • Would you like to see the column type displayed? Currently we don't show it, but it would make sense to add an option to show it for Ibis and Polars
  • Are the columns always a list? I mean, there is no complex/nested columns? No index neither?

mwouts avatar Jan 12 '24 23:01 mwouts

Would you like to see the column type displayed? Currently we don't show it, but it would make sense to add an option to show it for Ibis and Polars

I think that would make sense, it's easy to get the data type. Ibis has its own type system that maps to all the backends

Are the columns always a list? I mean, there is no complex/nested columns? No index neither?

Ibis does not itself maintain an index, but some of the backends it support does (perhaps only pandas and Dask?)

there are nested datatypes if the backend supports it

lostmygithubaccount avatar Jan 13 '24 12:01 lostmygithubaccount

To make this happen I would need some hints on the associated PR https://github.com/mwouts/itables/pull/217. Thanks!

mwouts avatar Feb 10 '24 22:02 mwouts

I'll ask the team to take a look!

lostmygithubaccount avatar Feb 10 '24 23:02 lostmygithubaccount