Code that has error:
if (code in list(changed_code['Old material code'])): temp_index = changed_code.loc[changed_code['Old material code'] == code].index
The type of code is float
Cause of python Error: ValueError
In this code, the value cannot be of float type.
Solution for python Error: ValueError
You have to just convert float type into int type.
if (int(code) in list(changed_code['Old material code'])):
temp_index = changed_code.loc[changed_code['Old material code'] == code].index
Also Read | [Solved] How to Solve Python picamera and raspistill error