I have the following code below, which outputs “<param.Dict object at 0x1a074ws534c1>”. How do I access .param.selected_data values this being a Dict? .keys() or .values does not work.
import panel as pn
pane = pn.pane.Plotly()
data = pane.param.selected_data
print(data)
Your pane
object is an instance of a Plotly
pane and as such is also, like the other objects provided by Panel, a Parameterized object. Parameterized objects have a .param
namespace that allows to access to methods provided by Param (such as param.watch
) and to the Parameters (such as param['selected_data']
). To access the value of a Parameter you do it as you would do it with a bare/normal Python class, i.e. with pane.selected_data
.