Skip to main content
Version: devel

Explore your data with marimo

marimo is a reactive Python notebook. It completely revamps the Jupyter notebook experience. Whenever code is executed or you interact with a UI element, dependent cells are re-executed ensuring consistency between code and displayed outputs.

This page shows how dlt + marimo + ibis provide a rich environment to explore loaded data, write data transformations, and create data applications.

Prerequisites

To install marimo and ibis with the duckdb extras, run the following command:

pip install marimo ibis-framework[duckdb]

Launch marimo

Use this command to launch marimo (replace my_notebook.py with desired name). It will print a link to access the notebook web app.

marimo edit my_notebook.py

> Edit my_notebook.py in your browser 📝
> ➜ URL: http://localhost:2718?access_token=Qfo_Hj2RbXqiqM4VT3XOwA

Here's a screenshot of the interface you should see:

Features

View dataset tables and columns

After loading data with dlt, you can access it via the dataset interface, including a native ibis connection.

In marimo, the Datasources panel provides a GUI to explore data tables and columns. When a cell contains a variable that's an ibis connection, it is automatically registered.

Accessing data with SQL

Clicking on the Add table to notebook button will create a new SQL cell that you can use to query data. The output cell provides a rich and interactive results dataframe.

note

The Datasources displays a limited range of data types.

Accessing data with Python

You can also retrieve Ibis tables (lazy expressions) using Python. The Datasources panel will show under Python the output schema of your Ibis query, and the cell output will display detailed query planning.

Use .execute(), .to_pandas(), .to_polars(), or .to_pyarrow() to execute the Ibis expression and retrieve data that can displayed in a rich and interactive dataframe.

note

The Datasources displays a limited range of data types.

Create a dashboard and data apps

marimo notebooks can be deployed as web applications with interactive UI and charts and the code hidden. Try adding marimo UI input elements, rich markdown, and charts (matplotlib, plotly, altair, etc.). Combined, dlt + marimo + ibis make it easy to build a simple dashboard on top of fresh data.

Further reading

This demo works on codespaces. Codespaces is a development environment available for free to anyone with a Github account. You'll be asked to fork the demo repository and from there the README guides you with further steps.
The demo uses the Continue VSCode extension.

Off to codespaces!

DHelp

Ask a question

Welcome to "Codex Central", your next-gen help center, driven by OpenAI's GPT-4 model. It's more than just a forum or a FAQ hub – it's a dynamic knowledge base where coders can find AI-assisted solutions to their pressing problems. With GPT-4's powerful comprehension and predictive abilities, Codex Central provides instantaneous issue resolution, insightful debugging, and personalized guidance. Get your code running smoothly with the unparalleled support at Codex Central - coding help reimagined with AI prowess.