I think you are almost there.
- Checkboxes should only be displayed when the DF is clicked.
What do you mean by “when the DF is clicked”?
- User clicks on GetDF button that will generate a DF.
It does, and the DataFrame is assiged to session_state["df1"]
. You can’t see it because you are displaying session_state
before the assignment happens.
- A checkbox will be created that represents a Name in the DF
You create the checkboxes only when session_state["df1"] is True
, but that never happens. It is False
at first, then a DataFrame
after the user clicks the button.