У меня есть фрейм данных df
вот так
id uuid infotags loc
20078612 0136ceb0-aba3-3de2-b577-bd3a8f5620d3
Значение внутри df[infotags]
показано ниже. Как я могу извлечь значение внутри информационных тегов и прикрепить к исходному фрейму данных.
[{'id': 3250638, 'type': {'id': 489211, 'icon': 'far fa-bell', 'type': 'alert_type', 'active': False, 'display': True, 'ordering': 1, 'displayName': 'Alert Status'}, 'value': 'Happens / Occurs', 'svalue': 'happens'}, {'id': 5585386, 'type': {'id': 691718, 'icon': 'far fa-industry', 'type': 'industry', 'active': False, 'display': True, 'ordering': 10, 'displayName': 'Industry'}, 'value': 'Transportation, Logistics'}, {'id': 3568415, 'type': {'id': 3568395, 'icon': 'far fa-sitemap', 'type': 'scope_organisational', 'active': True, 'display': True, 'ordering': 220, 'displayName': 'Scope - Organisational'}, 'value': 'Company'}, {'id': 6819597, 'icon': 'fas fa-prescription-bottle-alt', 'type': {'id': 2284612, 'type': 'event_type', 'active': False, 'display': True, 'ordering': 10001, 'displayName': 'Event Type'}, 'value': 'Corona Virus Update', 'svalue': 'disease_outbreak'}, {'id': 6061632, 'icon': 'fas fa-university', 'type': {'id': 2284612, 'type': 'event_type', 'active': False, 'display': True, 'ordering': 10001, 'displayName': 'Event Type'}, 'value': 'Innovation Activity', 'svalue': 'innovation_activity'}, {'id': 10322, 'type': {'id': 2284613, 'type': 'risk_level', 'active': False, 'display': False, 'ordering': 10002, 'displayName': 'Risk Level'}, 'value': 'High', 'svalue': 'high'}, {'id': 7041979, 'type': {'id': 7041971, 'type': 'datasource', 'active': False, 'display': False, 'ordering': 1000010, 'displayName': 'Datasource'}, 'value': 'Engine', 'svalue': 'engine'}]
Lo c
[{'id': 1944901, 'geo': {'type': 'Feature', 'geometry': {'type': 'Point', 'coordinates': [151.20732, -33.86785]}, 'properties': {'name': 'Sydney', 'countryCode': 'AU'}}, 'name': 'Sydney', 'type': {'id': 2314671, 'type': 'location', 'ordering': 40, 'displayName': 'Location'}, 'ctype': {'id': 2290061, 'icon': 'fas fa-map-marker-alt', 'ctype': 'place', 'displayName': 'Place'}, 'sname': '2147714', 'isOwnTarget': False}]
Ожидаемый результат
id uuid root_id id icon active .....
20078612 0136ceb0-aba3-3de2-b577-bd3a8f5620d3 3250638 489211 far fa-bell ....
Till все значения прикреплены в новом столбце.