for item in d:
    for attribute, value in item.items():
        subject_id, object_id = value['subject_id'], value['object_id']
if G.has_edge(subject_id, object_id):
    G[subject_id][object_id]['weight'] += 1
else:
    G.add_edge(subject_id, object_id, weight=1)
Updating weight information depending on repeat of edges with networkx