parsed_json = kstream.map(lambda(k,v): json.loads()), invalid syntax错误问题
parsed_json = kstream.map(lambda (k,v): json.loads()), invalid syntax error problem
出现以下错误:
SyntaxError: invalid syntax error on this line of the code ->
parsed_json = kstream.map(lambda (k,v): json.loads()) arrow indicating
(>k,a), link to the code is
https://github.com/patilankita79/Location-based-Restaurants-Recommendation-System/blob/master/BigDataProject/Consumer.py
lambda 函数签名中存在错误。正确的是:
kstream.map(lambda k, v: json.loads(v))
出现以下错误:
SyntaxError: invalid syntax error on this line of the code -> parsed_json = kstream.map(lambda (k,v): json.loads()) arrow indicating (>k,a), link to the code is https://github.com/patilankita79/Location-based-Restaurants-Recommendation-System/blob/master/BigDataProject/Consumer.py
lambda 函数签名中存在错误。正确的是:
kstream.map(lambda k, v: json.loads(v))