-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinsert.py
More file actions
32 lines (26 loc) · 793 Bytes
/
Copy pathinsert.py
File metadata and controls
32 lines (26 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import warnings
import time
import logging
import pandas as pd
from rdflib import Graph, Literal, Namespace, URIRef,BNode
from rdflib.collection import Collection
from rdflib.namespace import FOAF, RDF, RDFS, SKOS, XSD
from rdflib.serializer import Serializer
from rdfpandas.graph import to_dataframe
from SPARQLWrapper import XML, SPARQLWrapper
def insert(merged_list,spek_cs):
p=URIRef("slowmo:acceptable_by")
for x in merged_list:
for z in x[0]:
o=z
for i in x[1]:
s=i
spek_cs.add((s, p, o,))
# for key, value in final_dict.items():
# print(list(key))
#print(value)
# for i in value:
# s=i
# o=[key]
# spek_cs.add((s, p, o,))
return spek_cs