rgbkrk / display.js

Rich Displays for Jupyter JavaScript Kernels
https://deno.land/x/display
BSD 3-Clause "New" or "Revised" License
20 stars 1 forks source link

make polars dataframe display more informative #17

Open oscar6echo opened 3 months ago

oscar6echo commented 3 months ago

Suggestion

Instead of displaying the first 50 rows of the df, maybe :

This would make the deno kernel behave similarly to the python kernel.

What do you think ?

rgbkrk commented 3 months ago

Sounds great to me. While I'll take a PR for it, I tend to just use the version built directly into polars now. There's no need to use this library for display. Here's the place to make it happen:

https://github.com/pola-rs/nodejs-polars/blob/95191dfdc9abcee12dc09533aaeb608d596006e1/polars/dataframe.ts#L1925-L1936

oscar6echo commented 3 months ago

Thx for the clarification and redirect - and the fast reply !
I brought the conversation over to this repo: https://github.com/pola-rs/nodejs-polars/issues/250

Is this lib still useful to display plots (html, svg) ? I know it is as I have used it here for example.
But would you recommend something else ? some improvement ?
Is it mature ? If so any plan to publish to jsr ? or npmjs ?

rgbkrk commented 3 months ago

I think most everything from in this repo has moved into Deno.jupyter.display directly so that it isn't needed anymore. I'm going to have to double check, but I just use the built in stuff now.

oscar6echo commented 2 months ago

I think most everything from in this repo has moved into Deno.jupyter.display directly so that it isn't needed anymore.

Indeed, this is what it seems, from my trials.

oscar6echo commented 2 months ago

For reference in case somebody follows the same train of thought, I found that:

The default display of a TS object, presumably using a default [Symbol.for('jupyter.display')](), is still quite obscure.

In the case of this example:
image

I observed that:

image