How to transform a column before plotting with hvplot?


I often need to plot slightly different versions of my data depending on who’s requesting data from me. Is there a way to plot using hvplot such that I don’t have to keep saving out additional columns in dataframes?

Original Plot: probability as a decimal

demo_df = pd.DataFrame({‘value’:np.random.randn(50),‘probability’:np.random.rand(50)})

Desired: plotting the ‘probability’ as a percentage instead.
I tried…

percent = hv.dim(‘probability’)*100

…but that didn’t work. Is there another simple/recommended way?

I think that should be supported, would you mind filing an issue with hvPlot to support this? For now the only way of doing this is to modify the DataFrame or assign a new column.

I did that… here:

My first issue/feature request.

Thank you! :slightly_smiling_face:

Yay, much appreciated!