Data Explorer¶
The data explorer UI element outputs a visual editor explore your data via plotting and intelligent recommendations. You can incrementally build your “main” plot by adding different encodings: x-axis, y-axis, color, size, and shape. As you build your plot, the UI element will suggest further plots by intelligently “exploding” an additional encoding derived from your base plot.
Pandas Required
In order to use the dataframe UI element, you must have the pandas
package installed.
You can install it with pip install pandas
.
- class marimo.ui.data_explorer(df: pd.DataFrame | pl.DataFrame | pa.Table, on_change: Callable[[Dict[str, Any]], None] | None = None)¶
Quickly explore a DataFrame with automatically suggested visualizations.
Example.
mo.ui.data_explorer(data)
Attributes.
value
: the resulting DataFrame chart spec
Initialization Args.
df
: the DataFrame to visualize
Public methods
Inherited from
UIElement
form
([label, bordered, loading, ...])Create a submittable form out of this
UIElement
.send_message
(message, buffers)Send a message to the element rendered on the frontend from the backend.
Inherited from
Html
batch
(**elements)Convert an HTML object with templated text into a UI element.
center
()Center an item.
right
()Right-justify.
left
()Left-justify.
callout
([kind])Create a callout containing this HTML element.
style
(style)Wrap an object in a styled container.
Public Data Attributes:
Inherited from
UIElement
value
The element’s current value.
Inherited from
Html
text
A string of HTML representing this element.