marimo-team / marimo

A reactive notebook for Python — run reproducible experiments, execute as a script, deploy as an app, and version with git.
https://marimo.io
Apache License 2.0
6.16k stars 200 forks source link

support for spyder-like view of dataframes and arrays #2114

Open Zaf4 opened 3 weeks ago

Zaf4 commented 3 weeks ago

Description

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

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.

mscolnick commented 3 weeks ago

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

Would that suffice?

Zaf4 commented 2 weeks ago

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.

mscolnick commented 2 days ago

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

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.

Zaf4 commented 1 day ago

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.