eugene
eugene
Mmarimo
Created by eugene on 11/8/2024 in #help-support
How to distinguish marimo notebooks from any other python files robustly and efficiently?
I think this can't be a robust algorithm to test whether a python file is a marimo notebook. For example, run _is_marimo_file on this file exactly will return True 🤔
5 replies
Mmarimo
Created by john_helt on 10/24/2024 in #help-support
differences between mo.ui.dictionary and python dict?
I will add these to the docs
7 replies
Mmarimo
Created by john_helt on 10/24/2024 in #help-support
differences between mo.ui.dictionary and python dict?
The primary distinction between mo.ui.dictionary and a standard Python dictionary lies in how they handle UI elements. In mo.ui.dictionary, each UI element is a clone of the original, meaning interactions with elements in mo.ui.dictionary do not affect the original elements—and vice versa. As demonstrated in the video, interacting with the original UI elements updates the corresponding values in the Python dictionary, but not in mo.ui.dictionary. This allows you to reuse multiple UI components (e.g., sliders, text inputs, or date pickers) independently, ensuring they don’t interfere with each other when managed through mo.ui.dictionary. However, if you use a regular Python dictionary, all references remain synchronized, and changes to one element propagate across all linked instances. Additionally, mo.ui.dictionary makes it easy to apply convenient styling options. For example:
mo.ui.dictionary(
{f"option {i}": mo.ui.slider(1, 10, show_value=True) for i in range(10)}
).vstack() # Can also use .hstack(), .callout(), .center(), etc.
mo.ui.dictionary(
{f"option {i}": mo.ui.slider(1, 10, show_value=True) for i in range(10)}
).vstack() # Can also use .hstack(), .callout(), .center(), etc.
This structure enables quick, organized layouts like vertical or horizontal stacks, callouts, and centering, enhancing UI design without extra complexity.
7 replies
Mmarimo
Created by eugene on 9/30/2024 in #help-support
Terminate a while loop with switch and state
I think run_button can help
3 replies
Mmarimo
Created by Mady on 9/19/2024 in #help-support
Freeze Column Table Argument Not Working as Expected
maybe
mo.ui.table(
df[mask].reset_index(),
show_column_summaries=False,
selection=None,
pagination=None,
freeze_columns_left=["Number", "Name"],
)
mo.ui.table(
df[mask].reset_index(),
show_column_summaries=False,
selection=None,
pagination=None,
freeze_columns_left=["Number", "Name"],
)
this should reset the "Number" index to a regular column
23 replies
Mmarimo
Created by Mady on 9/19/2024 in #help-support
Freeze Column Table Argument Not Working as Expected
I think freeze_columns_left ignores index column for pandas
23 replies
Mmarimo
Created by Mady on 9/19/2024 in #help-support
Freeze Column Table Argument Not Working as Expected
my bad, have limited experience with pandas the only solution I can come of is setting "Number" to a regular column instead of index
23 replies
Mmarimo
Created by Mady on 9/19/2024 in #help-support
Freeze Column Table Argument Not Working as Expected
is "Number" in team_df2[mask].columns? also, you forgot () inside the if condition for reset_index
23 replies
Mmarimo
Created by Mady on 9/19/2024 in #help-support
Freeze Column Table Argument Not Working as Expected
No description
23 replies
Mmarimo
Created by Mady on 9/19/2024 in #help-support
Freeze Column Table Argument Not Working as Expected
In this case, just freeze_columns_left=["Number, "Name"] should work?
23 replies
Mmarimo
Created by Mady on 9/19/2024 in #help-support
Freeze Column Table Argument Not Working as Expected
sorry, I saw you were indexing with mask so assumed that you were using polars then
mo.ui.table(
df[mask].reset_index(),
show_column_summaries=False,
selection=None,
pagination=None,
freeze_columns_left=["index", "Name"],
)
mo.ui.table(
df[mask].reset_index(),
show_column_summaries=False,
selection=None,
pagination=None,
freeze_columns_left=["index", "Name"],
)
should work?
23 replies
Mmarimo
Created by Mady on 9/19/2024 in #help-support
Freeze Column Table Argument Not Working as Expected
I think you need to create a new cell and run the code there Edit in-place doesn't change the pinning, but seems to be fixed in the next release
23 replies
Mmarimo
Created by Mady on 9/19/2024 in #help-support
Freeze Column Table Argument Not Working as Expected
You are using polars right? maybe you can try
mo.ui.table(
df[mask].with_row_index(),
show_column_summaries=False,
selection=None,
pagination=None,
freeze_columns_left=["index", "Name"],
)
mo.ui.table(
df[mask].with_row_index(),
show_column_summaries=False,
selection=None,
pagination=None,
freeze_columns_left=["index", "Name"],
)
23 replies
Mmarimo
Created by Mady on 9/19/2024 in #help-support
Freeze Column Table Argument Not Working as Expected
I think you forgot to add freeze_columns_left=["Name"] inside the if condition 🤔
23 replies
Mmarimo
Created by V3 on 5/7/2024 in #archived-help-and-support
Dropdown Box w/ plotly
maybe it's a problem regarding incorrect markdown format
35 replies
Mmarimo
Created by V3 on 5/7/2024 in #archived-help-and-support
Dropdown Box w/ plotly
don't write them in a single line
35 replies
Mmarimo
Created by V3 on 5/7/2024 in #archived-help-and-support
Dropdown Box w/ plotly
## Distribution of scores by:

{box_plots_dropdown}
## Distribution of scores by:

{box_plots_dropdown}
35 replies
Mmarimo
Created by V3 on 5/7/2024 in #archived-help-and-support
Dropdown Box w/ plotly
i think you maybe should try this:
35 replies
Mmarimo
Created by V3 on 5/7/2024 in #archived-help-and-support
Dropdown Box w/ plotly
it should work fine 🐌
35 replies