'Exception not-all-arguments-converted-during-string-formatting-python

Hello i have a string which is loaded from json to a function , the function executes this string using eval , but i am getting some error with % modulo operator which need to perform modulo operation can any one help me with it

"((column['salary']%100)<3,(column['salary']%1000)<4,(column['salary']%10000)<5)"

in the function the column gets replaced to df

"((df['salary']%100)<3,(df['salary']%1000)<4,(df['salary']%10000)<5)"​

eval("((df['salary']%100)<3,(df['salary']%1000)<4,(df['salary']%10000)<5)")

and eval of string gives error Exception not-all-arguments-converted-during-string-formatting-python

and the data frame is in below pic

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source