ibis icon indicating copy to clipboard operation
ibis copied to clipboard

docs: operation support matrix

Open seb-afk opened this issue 1 year ago • 3 comments
trafficstars

Please describe the issue

The header seems to be missing in the operation support matrix download.

image

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

seb-afk avatar Feb 18 '24 18:02 seb-afk

@seb-afk Thanks for the report!

We'll look into this and see if there's something we can do about it. We're a bit at the mercy of itables here, but hopefully there's an option we can set to enable the header.

cpcloud avatar Feb 18 '24 19:02 cpcloud

Sounds good! Not really a problem since one can just copy-paste them from the website I just thought it is worth mentioning :)

seb-afk avatar Feb 18 '24 20:02 seb-afk

Much appreciated!

cpcloud avatar Feb 18 '24 21:02 cpcloud

@mwouts Is there a way to include the header when copying, downloading csv/excel?

cpcloud avatar Feb 23 '24 18:02 cpcloud

@mwouts Is there a way to include the header when copying, downloading csv/excel?

Oh that's interesting. Note that itables==1.7.0 does not support buttons. I would like to add them in 2.0.0, which is currently a work in progress. But anyway it's great to see the buttons work already in Quarto.

I think the missing header might comes from the fact that the header is passed as HTML while the core of the table is passed as a JSON data. Would you like to try passing the whole table as HTML with the use_to_html option? Also, it's worth checking that there is no header=False option passed to datatables.net.

mwouts avatar Feb 23 '24 20:02 mwouts

Thanks for the reply! Lemme fiddle with those bits and see if anything shakes out.

cpcloud avatar Feb 23 '24 20:02 cpcloud

I tried passing:

    buttons=[{ "extend": "copy", "header": True }, {"extend":"excel","header":True}, {"extend": "csv", "header":True}],

to show (based on the example link)

and none of the buttons produced headers 😞

use_to_html has a couple of issues, but the main one is that it removes the buttons entirely.

cpcloud avatar Feb 23 '24 21:02 cpcloud

Closing this out for now. If someone wants to figure out how to get the header into the copy/download buttons a PR would be more than welcome!

cpcloud avatar Feb 25 '24 15:02 cpcloud

Hey @seb-afk , @cpcloud , the buttons will be officially supported in itables==2.0.0. I've not seen any issue like the one reported here, but I'd be curious to try with your dataframe, maybe it has a specific shape that causes this?

mwouts avatar Mar 13 '24 21:03 mwouts

This appears to be fixed with itables==2.0 🎉

image

cpcloud avatar Mar 17 '24 12:03 cpcloud

The first row of the downloaded file looks like this:

❯ head -1 ~/downloads/Ibis\ –\ Operation\ support\ matrix\ \(2\).csv
"","Backend","bigquery","clickhouse","dask","datafusion","druid","duckdb","exasol","flink","impala","mssql","mysql","oracle","pandas","polars","postgres","pyspark","risingwave","snowflake","sqlite","trino"

cpcloud avatar Mar 17 '24 12:03 cpcloud