Skip to content

RdfPandas is a module providing RDF support for Pandas

License

Notifications You must be signed in to change notification settings

cadmiumkitty/rdfpandas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RdfPandas

RdfPandas is a module providing RDF support for Pandas. It consists of two simple functions for graph conversion, one is to create DataFrame from RDFLib Graph data, and another one to create Graph data from DataFrame.

The graph data can then be serialized using RDFLib serialize method on the graph.

Getting Started

For more information about Resource Description Framework (RDF) and Pandas see:

Prerequisites

You will need Python 3 to use Pandas and RdfPandas.

Installation

pip install rdfpandas

Usage

Getting RDF out of the DataFrame

import rdfpandas as pd
import rdflib

df = pd.DataFrame()
g = to_graph(df)
s = g.serialize(format='turtle')