I have 3 pandas columns; date, value and position.
I want to plot a scatter on all values where position == 1.
This script gives no errors and no scatter plot.
Blockquote
fig.add_scatter(x=df[‘Date’], y=df[(df[‘MA20’] != 0.0) & (df[‘positions’].values != ‘0.0’)], name=‘MyMA-20’,
mode=‘markers + lines’, line=dict(color=‘red’), marker=dict(size=12))
Blockquote
This script has no ‘where’ clause but prints on every Date.
Blockquote
fig.add_scatter(x=df.Date, y=df.MA20, name=‘MyMA-20’, mode=‘markers’,
line=dict(color=‘red’), marker=dict(size=2)) #, markersize=15, color=‘m’)
Blockquote
Where is my error?
Thanks