Converting your Knowledge Graph TSV/CSV to a Resource Description Framework (RDF) For Interoperability

Now we read the tsv format into a dataframe. The predicate is the category that the node is assigned too. For example, RingsInDrugs, is the most common ring systems in Drugs and it belongs to the Medicinal Chemistry category in our graph.

df = pd.read_csv(
    'global_chem.tsv', 
    delimiter='\t', 
    header=None, 
    names=['name', 'smiles', 'node', 'predicate', 'path']
)

First we create the graph where each chemical name is connected to a node.

Visit Now