I've having an issue checking is a value is in the following dataframe:
index | open | high | SignalEMA25M50M | PositionEMA25M50M |
---|---|---|---|---|
2021-03-30 05:35:00 | 0.000059 | 0.000059 | 0 | -1.0 |
2021-03-30 05:40:00 | 0.000059 | 0.000059 | 0 | 0.0 |
2021-03-30 05:45:00 | 0.000059 | 0.000059 | 0 | 0.0 |
i am trying to simply return true if the PositionEMA25M50M contains -1.0
i have tried:
if -1.0 in indicator_5min_df.PositionEMA25M50M:
print('true')
else:
print('false')
however this returns false every time... i assume this is something to do with PositionEMA25M50M being of type float64 however i've also tried
if np.float64(-1.0) in indicator_5min_df.PositionEMA25M50M:
print('true')
else:
print('false')
which has given me the same result...
any ideas how i can fix this?