I created an interactive report that shows a dataframe table. I have an sql cell provided by datalore connected to a clickhouse database and the output is stored in a pandas data frame, default as df_1. I want to include this table in the report, which I want to be interactive, because the user can insert a number in a text field and click a button. When I click recalculate, the data frame becomes empty.
What could be the issue?
I’ve tried it a couple of times with different database connections (alway clickhouse). Still the same outcome. I’ve included df_1.head(), and df_1 as part of the report but still.
Hello Matthew,
Thank you for your question.
From your description, it is not clear how the entered number affects the database query.
Could you create a new support ticket and share the link to the notebook?
I can’t share the notebook, it is private in paid subscription. The entered number (or anything else) does not affect the query. The data frame in the report disappears (becomes empty) when I click the “Recalculate all” button.
So, in a python cell I have just, df_1
and I select this cell to be included in the report. Like this, there is the problem that I describe.
I eventually got this to work by using the following:
from IPython.display import display, HTML
display(HTML(df_1.to_html()))
And then I include this cell in the repot.
Thank you, Matthew.
The privacy of the data is understood. Nonetheless, I was unable to reproduce the issue based on your description.
I’ve created a support ticket for further discussion.