mwouts / itables

Pandas DataFrames as Interactive DataTables
https://mwouts.github.io/itables/
MIT License
776 stars 57 forks source link

rending bug on Jupyter lab: the table is empty #27

Closed etienne-monier closed 2 years ago

etienne-monier commented 3 years ago

Hi,

Problem

I'm testing a minimal example on Jupyter Lab (I integrated issue #3 patch). The table is non-empty and printing it with pandas is ok, but using itable makes it be rendered as empty.

MWE

import pandas as pd

from IPython.display import HTML, display
from time import sleep

display(HTML("""
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
"""))

sleep(0.1)

from itables import init_notebook_mode
init_notebook_mode(all_interactive=True)

data = {'Name': ["John", "Anna", "Peter", "Linda"],
'Location' : ["New York", "Paris", "Berlin", "London"],
'Age' : [24, 13, 53, 33]
}

data_pandas = pd.DataFrame(data)
data_pandas

The result: itables_bug

My poetry pyproject.toml

I'm running on python 3.8.10 with dependencies:

[tool.poetry.dependencies]
python = "^3.8.1"
jupyterlab = "^3.1.7"
voila = "^0.2.10"
ipywidgets = "^7.6.3"
voila-vuetify = "^0.5.2"
ipyvuetify = "^1.8.1"
pandas = "^1.3.2"
itables = "^0.3.0"

Thanks for helping me :)

mwouts commented 2 years ago

Well, I think I am going to address this issue with the PR #33 . Feel free to comment or reopen if the fix does not work for you. Thanks