Skip to content

Simple method for column transformations before plotting. #497

@conodeen

Description

@conodeen

Hello,

I often need to plot slightly different versions of my data depending on who’s requesting data from me. I was hoping for a simple way of transforming columns such that I don’t have to keep altering my dataframes for every plot.

Here's an example use case:

Original Plot: probability as a decimal

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

image


Desired: plotting the probability as a percentage instead.
Something like this might be nice:

percent = hv.dim(‘probability’)*100
demo_df.hvplot.scatter(x=‘value’,y=percent,ylabel='probability_as_percentage')

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions