Assigne(column name)
[{'id': 2342343, 'username': 'Raj', 'color': '#08c7e0', 'profilePicture': None}]
[{'id': 764665, 'username': 'mac', 'color': '#08c7e0', 'profilePicture': None}]
name = [d.get('username') for d in df.assigne]
print (name)
AttributeError: 'list' object has no attribute 'get'
任何建议都会有帮助的,谢谢。在
您正在从循环访问列表,要访问字典,请使用:
编辑1:如果行包含空列表,请使用:
^{pr2}$编辑2:如果列表中有多个词典:
相关问题 更多 >
编程相关推荐