I am looking for a script that will delete an entire row, if ['D1'] does not give a remainder of 0, when divided by 0.02. Thanks in advance!
Input:
D1 Value
0.01 2
0.02 1
0.03 4
0.04 3
0.05 6
0.06 5
Desired Output:
D1 Value
0.02 1
0.04 3
0.06 5
The code I have tested:
for q in range(len(df)):
if (df.loc[q, 'D1']) % 0.02 != 0:
df.drop(q)