The Problem
I'm attempting to search through a pandas dataframe to find a single value. The dataframe columns I'm searching through are of type float64.
Working Example
Here is a working example of what I'd like, with a dataframe of type int64.
myseries = pd.Series([1,4,0,7,5], index=[0,1,2,3,4])
myseries
The output is the following:
0 1
1 4
2 0
3 7
4 5
dtype: int64
Now for the search:
myseries == 4
Results:
0 False
1 True
2 False
3 False
4 False
dtype: bool
Not Working Example
Here is a sample of my data.
df['difference']
Result
0 -2.979296
1 -0.423903
2 0.396515
...
48 0.450493
49 -1.216324
Name: priceDiff1, dtype: float64
As you can see, it is of type float64. Now here's the issue. If I copy the value on row 2, and create a conditional statement like before, it doesn't return the True.
df['difference'] == 0.396515
Output
0 False
1 False
2 False
...
48 False
49 False
Name: priceDiff1, dtype: bool
Row 2 should be True. Any assistance at this issue with this issue would be great. What I believe is happening, is that my query isn't setting the type to float64 and might be assuming it's a different type. I've tested this by downcasting the column type from float64 to float32, with no luck.