def field_value_convert(data: List[dict]) -> List[dict]:标签:convert,python,res,List,dict,func,line,bug From: https://www.cnblogs.com/zhaomifan/p/16812444.html
# 对列进行排序,并且对数据进行转换
# 分组项对应的列转换
res: List[dict] = []
for i in data:
line = {}
for k, v in i.items():
if convert_func := CONVERT_FUNC_MAP.get(k):
line[k] = convert_func(v)
i[k] = convert_func(v)
res.append(line)
return res