pre-selecting a table row
I'm wondering if there's a way to pre-select a table row, similarly to that of a dropdown or multiselect component?
should --sandbox with uv require manually reinstalling packages each time Marimo is restarted?
when running marimo edit --sandbox and installing packages with uv, i'm seeing a ModuleNotFound error and the missing packages pop-over each time the notebook is re-opened after marimo is restarted. is that expected? or should the packages be reinstalled automatically/persisted between runs?
FWIW the package metadata is added to the top of the script...
pytest - best practices
I was wondering what the best practices are related to pytest. I can't run pytest.main() within the marimo notebook (error); and running it in the command line is not working neither (I guess I would have to export it into a classical python file first. Is there a recommend best approach to run tests?
help with project
I am currently made an application in marimo for indeed job posting job search information and I trying to create a docker instance of the app but not getting the same results as in my notebook.
here is my code that is working. the issue is it is not showing any of the app outputs for the charts that i am seeing in my notebook. also think that my start button is not working as I attend it to. (user press start to submit text information above....
DataFrame as Tool
Is there a way to make just a dataframe as tool for the chat interface? This is a bit different than the filterer version from the blog.
How to make cell for code generation?
The clip in https://docs.marimo.io/guides/editor_features/ai_completion.html#generate-code-with-our-ai-assistant shows cell enabled for code generation, but I don't see how to make cell for this generative mode, I mean where's the option to be turned on to allow cell for this? Marimo config:
.$ marimo config show ... [ai.open_ai] model = "qwen2.5-coder:1.5b"...
.$ marimo config show ... [ai.open_ai] model = "qwen2.5-coder:1.5b"...
Solution:
sorry, i missed this part of docs https://docs.marimo.io/guides/editor_features/ai_completion.html#generate-code-with-our-ai-assistant CTRL+SHIFT+e , thanks!
How to inject custom css into wasm notebook?
I have tried and failed in every way. I created the custom.css file in the notebook's folder, but even if I copy the example from the Theming part of documentation, it does not change anything. What am I doing wrong?
differences between mo.ui.dictionary and python dict?
I find it unclear from the documentation, why I should use a marimo dictionary, and not just a python dict to hold UI elements. What is the fundamental difference, and when should you use one, and not the other, and vice verse?
Solution:
The main reason to use
mo.ui.dictionary
is for reactive execution — when you interact with an element in a mo.ui.dictionary
, all cells that reference the mo.ui.dictionary
run automatically, just like all other ui elements. When you use a regular dictionary, you don’t get this reactivity. This is the main reason to use mo.ui.dictionary
.dataframe transformer datetime filter no time range?
Would be useful if time range is provided as part of datetime column filter
Solution:
running async inside sync cells
I have a long chained function call, which needs to call some async function to fetch data from a database. I was thinking I could use asyncio to get the running loop, and then run the function inside that loop using "run_until_complete", but I just get an runtimeerror "this event loop is already running". How can I handle this without having to rewrite all my functions to async instead?
Shift enter not working from time to time
Hi team, from time to time shift enter (run and new below) is not working. Not sure what is causing this and how to solve it. On the other hand, ctrl enter works all the time.
Import from a different project
Is it possible to import stuff from one project to another on the marimo.io dashboard?
Hide code in a notebook in a Collection
I have a collection of notebooks in the marimo.io/dashboard/... and I would like to either hide the code by default or exclude it. So I would like a ntb to open as marimo.io/p/@kejtos/slug?include-code=False (or ?show-code=False) when someone opens it at marimo.io/c/@kejtos/collection_name. I have tried various things in the settings, but I have not been able to figure it out. Thanks.
Label widget placement
Hello everyone, is there a way to have the widget label above the widget instead of on the left? When putting
in a custom css, it doesn't work. Thanks...
.flex-row {
flex-direction: column;
}
.flex-row {
flex-direction: column;
}
highlighted elements in markdown
This is moreso for my understanding of the syntax, but the elements for the unordered list lost their color scheme after I closed the first sub-list
Keep ui table state of selected rows
Is there any way to keep the state of selected rows of ui table which is part of the items in accordion (or tabs)? The table always get re-rendered on switching between items, thereby losing the state of selected rows of the table
pyodide installation through uvx sandboxing fails
Was "sanboxifying" a notebook with uv (for inline dependency scripts); the notebook just had pyodide as it's main requirement (this is the Post Approval Study Recommender notebook shared by Mustjaab; on clicking the install button (with the popup on the top left), it seemed to fail.
This is whta I got in the terminal:
"ValueError: Pyodide is a Python distribution that runs in the browser or Node.js. It cannot be installed from PyPi.
See https://github.com/pyodide/pyodide for how to use Pyodide."...
Altair performance questions
Hi team, thanks for your work on this package. Apologies for the dumb question, I have been using large datasets and used altair for dynamic plotting with slider filters.
Using on jupyter:
alt.data_transformers.enable("vegafusion")
alt.renderers.enable("jupyter", offline=True), this is very fast (less than 1 sec for the update).
I tried to achieve the same filtering using marimo sliders directly on my polars dataframe and then plotting, this works but it is slower as obviously polars needs to do the filtering and run 2 cells (2-5 seconds)....