I am running jupyter lab via the latest official Jupyter docker “minimal-notebook” image, i.e “jupyter/minimal-notebook”. I have installed panel via “pip install panel”
Via the following code snippet I am trying to edit a Dataframe interactivel( by double clicking).
import panel as pn
import pandas as pd
pn.extension('tabulator')
df = pd.DataFrame([1,2,3])
pn.widgets.Tabulator(df)
However the edits are not visible within the underlying Dataframe, when i inspect the df variable afterwards.
I noted that outside the docker image, in a virtualenv (where I installed just jupyterlab and panel), it did work.
I found the issue, it has nothing to do with docker, but something to do with the fact that I am using py:percent notebooks via Jupytext (see Notebooks as code — Jupytext documentation). I use this format for version control purposes.
These py:percent notebooks do not have an .ipynb extension, but a .py extension that are loaded via Jupytext, which I suspect might be related to the issue.
When I create a new notebook with an .ipynb I have no issue
Thanks for thinking along. So to clarify, I also got it to work in “Jupytext-less” context, i.e. by just using normal notebooks (with .ipynb extension). When doing the same thing in a py:percent notebook (via Jupytext) however, it does not seem to work. See the difference in action below:
For context, I am using jupytext v1.16.0 (newest version) and this is the output of jupyter --version:
JupyterLab v4.0.7
/opt/conda/share/jupyter/labextensions
jupyterlab_pygments v0.2.2 enabled X (python, jupyterlab_pygments)
jupyterlab-plotly v5.18.0 enabled X
jupyterlab-jupytext v1.4.1 enabled OK (python, jupytext)
nbdime-jupyterlab v2.2.0 enabled X
jupyter-matplotlib v0.11.3 enabled OK
@jupyter-notebook/lab-extension v7.0.6 enabled OK
@jupyterhub/jupyter-server-proxy v4.1.0 enabled OK
@pyviz/jupyterlab_pyviz v3.0.0 enabled OK
@jupyterlab/git v0.41.0 enabled X (python, jupyterlab-git)
@jupyter-widgets/jupyterlab-manager v5.0.9 enabled OK (python, jupyterlab_widgets)
The following extensions are outdated:
jupyterlab_pygments
jupyterlab-plotly
nbdime-jupyterlab
@jupyterlab/git
Consider checking if an update is available for these packages.
Other labextensions (built into JupyterLab)
app dir: /opt/conda/share/jupyter/lab
@plotly/dash-jupyterlab v0.4.3 enabled X
The following extensions are outdated:
@plotly/dash-jupyterlab
Consider checking if an update is available for these packages.