i have this line:
logical= [value in line for value in Dictionnary["substance_name"].values]
that gave me this error:
TypeError: 'in <string>' requires string as left operand, not NoneType
This is probably due to some gaps in my dictionnary.
So to fix it I thought about adding this:
logical= [value in line for value in Dictionnary["substance_name"].values and value not None]
By the synthax seems to be incorrect. How can I express it correctly? I edited my code:
logical= [value in line for value in DictionnaireMedicHUG["substance_name"].values]
if logical != None:
I am still getting the same error
andtoif. Also, don't you mean.values(), rather than.values?.values()I getTypeError: 'numpy.ndarray' object is not callable