I have a dataframe that looks like this:
df:
Start End Value
0 0 98999 0
1 99000 101999 1
2 102000 155999 0
3 156000 161999 1
4 162000 179999 0
I would like to plot a rectangular wave that goes from "Start" to "End" and that has the value in "Value" Could you please help me? thanks!
My attempt:
for j in range(0,df.shape[0]):
plt.figure()
plt.plot(range(df['Start'].iloc[j],df['End'].iloc[j]), np.ones(df['End'].iloc[j]-df['Start'].iloc[j])*df['Value'].iloc[j])
but it plots in different figures...


