VSpan for dataframe columns

Hi,
I have a dataframe with columns dtype:float64. VSpan doesn’t like that when I try VSpan(df[‘column1’],df[‘column2’]) and I get this error:
ValueError: ClassSelector parameter ‘x1’ value must be an instance of (Number, datetime64, datetime, date, time, Timestamp, DatetimeTZDtype, Period), not stimulus_presentation_id

Does anybody know what should I do?

1 Like

Hi @RobertoDF

Welcome to the community.

Could you provide a minimum, reproducible code example? That would make it much easier to try to help.

Thanks.

Sorry for being unclear, I wrote the post quite in a rush.
I have a pd.Dataframe called “stimuli” with two columns: ‘start_time’ and ‘stop_time’, both float64.
The command hv.VSpan(stimuli['start_time'],stimuli['stop_time']) gives back the error I posted before.
I just realised that VSpan accept only singular values not multiple values so the following works:
hv.VSpan(stimuli['start_time'][0],stimuli['stop_time'][0])
However, I need to plot 70000 “patches”, is there a simple way to achieve this in the holoviz ecosystem?

Thanks!