marimo icon indicating copy to clipboard operation
marimo copied to clipboard

support for spyder-like view of dataframes and arrays

Open Zaf4 opened this issue 1 year ago • 4 comments

Description

In Spyder IDE there is a very good feature within the variable explorer that enables:

  • viewing of arrays and dataframes with background coloring (according to the value of the cell compared to the min or max of array or dataframe) which I think make it exceptionally intutive to work with dataframes and arrays.

image

  • browsing through multi-dimensional arrays (green highlighted part) image

these are extremely helpful features especially for data scientists. Also opening up a data on a viewer is much better than doing df.head() everytime which shows limited number of rows with no background coloring.

Suggested solution

implementing a similar feature would greatly improve the marimo and the user experience.

Alternative

background highlighting could be an expensive feature that could be by default turned off.

Additional context

Spyder IDE opens up a scrollable pop-up window which is dedicated to chosen variable for the view.

Zaf4 avatar Aug 25 '24 23:08 Zaf4

There are some examples of doing this from this package: https://posit-dev.github.io/great-tables/examples/

Would that suffice?

mscolnick avatar Aug 26 '24 01:08 mscolnick

This is indeed a pretty good library. However, I think great-tables produces formatted output rather than a scrollable viewer. But, for background highlighting, it is similar to what I had in mind.

Zaf4 avatar Aug 27 '24 01:08 Zaf4

@Zaf4 - i am looking into this over the weekend. probably 2 separate things:

  • the color highlighting / heatmap
  • browsing multi-dimensional arrays

for browsing multi-dimensional arrays, do you think that UI got it right? would there be any improvements? maybe i would get used to it, but from the screenshot, i find it a little confusing or maybe hard to navigate.

mscolnick avatar Sep 13 '24 22:09 mscolnick

for browsing multi-dimensional arrays, do you think that UI got it right? would there be any improvements? maybe i would get used to it, but from the screenshot, i find it a little confusing or maybe hard to navigate.

Yes, I think UI is not very intuitive and could use some improvements but I don't have any suggestions in mind for index and axis. Maybe that Shape part is static; so, it could be on upper-left rather than navigation region. Also, maybe format and resize should not exist at all.

Zaf4 avatar Sep 14 '24 17:09 Zaf4