I am new to hvplot and trying to include a call to .hvplot()
inside a function definition, but it's not working. The following code works and displays a figure as expected:
import pandas as pd
import hvplot.pandas
df = pd.DataFrame([1, 5, 3, 4, 2])
df.hvplot()
but if I try something like:
def plot(df):
df.hvplot()
plot(df)
I get no output. This is in a Jupyter Notebook. What am I missing?
question from:https://stackoverflow.com/questions/65907096/hvplot-call-inside-function-does-not-display-in-jupyter-notebook