2 parts panel app

I want to build a panel app that first loads a dataframe — based on panel.widget choices for date with an added hour-string from IntSlider as the dataframes are stored with filenames as “%Y%m%d%H”, like 2010010100 e.g. — and then has widgets to select which columns to plot and possible to apply some filtering

I got the datetime picker set up and working but now my first question, for confirmation:

  • The only way to keep/store this dataframe, so that it’s available for the 2nd part of the app for selection which parts to plot, is to have class and store it as an attribute, right?

possibly more questions down the road, i’ll make the result available…

No I don’t think so, you can dump it into pn.state.cache["2010010100"] = df.copy() and access it with df = pn.state.cache["2010010100"] (like a typical dict) I believe.

2 Likes

I would recommend using the class to keep track of the dataframe @michaelaye . You can also use pn.state.cache but then its shared across all users.

If you want to really separate out the steps you can build a Pipeline. I’ve not seen many using this approach. But its there.

1 Like

I wonder if there’s a way to specify a cache for each individual user?