piush
piush

Reputation: 1

typeError 'str' is not callable. invoke a class function using dictionary value

#Class and function class cf: def duplicate(**kwargs) .... return df[df[field].isnull()

#There is a dictionary r={'field':'con','function':'cf.duplicate'}

#Trying to call function looping above dictionary r for a in r: a['function'] a['field'] #this line is showing error as str object is not callable...and as checked a['function'] is string.

need to call a class method duplicate and give output and fetching the variable from dict

Upvotes: 0

Views: 24

Answers (0)

Related Questions