marimo-team / marimo

A reactive notebook for Python — run reproducible experiments, execute as a script, deploy as an app, and version with git.

Home Page:https://marimo.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple tabs in a single notebook

Eloitor opened this issue · comments

Description

I am hoping to be able to have multiple similar examples of some computations on a single document. Having one document for each example is very inefficient.

A single document for related examples makes it easier to share it.

Suggested solution

Each "Tab" could hold a separate example in an independent way.

Maybe some cells could be common to all tabs.

Silly example:

Common cell for all tabs: p=2 + More setup required.

Tab 1: a=1 + some other computations
Tab 2: a=5 + Other computations needed in this case
Tab 3: a=7 + Other computations needed in this case

Alternative

No response

Additional context

No response

My request is having some sort of "global" tabs. And in each tab there would be multiple cells, like a normal notebook.

The point is that the same variable could be defined in each tab with different values without getting an error.

that seems like it would get confusing to know which variable belongs to which.

we do plan to add notebook composition (you can import and embed one notebook in another). you will likely be able to achieve this much more easily with that feature. each notebook would have their own encapsulation of variables

ok that sounds similar than this request.