Jan-30-2020, 12:48 PM
Hi,
This is the code I have used and the following is the error message.
This is the code I have used and the following is the error message.
def fun_check(): if name in ("spiderman","antman") and salary in range(1000,2000) and city not in ("boston","dubai"): return age+salary else: return age*salary heros=heros.assign(new_col=heros.apply(fun_check,axis=1))
Error:TypeError: ('fun_check() takes 0 positional arguments but 1 was given', 'occurred at index 0')