Refresh Input Data

It is not safe to use global variables in dash. Instead, I recommend storing the df inside a hidden div inside the layout and using that hidden div as its own Input in the remaining callback functions.
For more information, see: