Examples
Display Table

Display an interactive table in Jupyter Notebook

Required packages

You will need to instal mercury and pandas packages to run this example.

Notebook

Let's import required packages:

import mercury as mr
import pandas as pd

Please create an example DataFrame by writing following code:

df = pd.DataFrame(
    {
        "name": ["Karol", "Szymon", "Piotr", "Ola"],
        "second name": ["Falkowski", "Niewiński", "Płoński", "Płońska"],
        "age": [20, 25, 38, 36],
    }
)

Then, please write this code to display the table:

mr.Table(df)

The screenshot of the notebook's code in the Jupyter Notebook:

Jupyter Notebook code.

Mercury App

Please start Mercury in the same directory as your notebook:

mercury run

You should see app running at address: http://127.0.0.1:8000

Finall effect should look like this:

Finall effect displayed in Mercury.