Skip to content

data frame not showing using ui.output_data_frame #1601

@jwijffels

Description

@jwijffels

I'm using Python 3.12.4 with the latest version of shiny with the following example code but the data frame does not show up

from palmerpenguins import load_penguins
from shiny import App, render, ui

penguins = load_penguins()

app_ui = ui.page_fluid(
    ui.h2("Palmer Penguins"),
    ui.output_data_frame("penguins_df"), 
    "More items" 
)

def server(input, output, session):
    @render.data_frame  
    def penguins_df():
        return render.DataTable(penguins)  

app = App(app_ui, server)

image

pip list
Package            Version
------------------ -----------
anyio              4.4.0
appdirs            1.4.4
asgiref            3.8.1
asttokens          2.4.1
click              8.1.7
colorama           0.4.6
comm               0.2.2
decorator          5.1.1
executing          2.0.1
faicons            0.2.2
h11                0.14.0
htmltools          0.5.3
idna               3.7
ipython            8.18.0
ipywidgets         8.1.3
jedi               0.19.1
jupyter_core       5.7.2
jupyterlab_widgets 3.0.11
linkify-it-py      2.0.3
markdown-it-py     3.0.0
matplotlib-inline  0.1.7
mdit-py-plugins    0.4.1
mdurl              0.1.2
numpy              2.0.1
packaging          24.1
palmerpenguins     0.1.4
pandas             2.2.2
parso              0.8.4
patsy              0.5.6
pip                24.2
platformdirs       4.2.2
plotly             5.23.0
prompt-toolkit     3.0.36
pure_eval          0.2.3
Pygments           2.18.0
python-dateutil    2.9.0.post0
python-multipart   0.0.9
pytz               2024.1
pywin32            306
questionary        2.0.1
ridgeplot          0.1.25
scipy              1.14.0
setuptools         72.1.0
shiny              1.0.0.9000
shinywidgets       0.3.2
six                1.16.0
sniffio            1.3.1
stack-data         0.6.3
starlette          0.38.2
statsmodels        0.14.2
tenacity           9.0.0
traitlets          5.14.3
typing_extensions  4.12.2
tzdata             2024.1
uc-micro-py        1.0.3
uvicorn            0.30.4
watchfiles         0.22.0
wcwidth            0.2.13
websockets         12.0
widgetsnbextension 4.0.11

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions