I want to take difference of each column data and see if it is equal to 0.6. I am using pandas (v2.0.2) read_csv to try to accomplish this.
main.py:
import pandas as pd
file = "C:/Users/Documents/proj/data.csv"
df = pd.read_csv(file)
out = df["colA"].diff().eq(0.6)
print(out)
The output I get is:
0 False
1 False
2 False
3 False
The expected output should be:
0 False
1 True
2 True
3 True
data.csv contains:
colA
1.2
1.8
2.4
3
I don't understand why this is not working - Any suggestion is much appreciated