Skip to main content

Convert SPARQL results to Pandas dataframes

Project description


Helper to convert SPARQLWrapper results to Pandas dataframes.

Build Status

See this blog post for examples. You might also be interested in these related examples from Su Labs tutorial.


Directly from PyPi for Python 3.4+.

$ pip install sparql-dataframe

From Github. This should support Python 2.7 as well.

$ pip install git+


import sparql_dataframe

endpoint = ""

q = """
    SELECT ?label ?wikiPageID
    WHERE {
    <> rdfs:label ?label ;
         <> ?wikiPageID

df = sparql_dataframe.get(endpoint, q)

By default, the query will be passed to the server as a GET request. To pass the query to the server as a POST request, use the post=True keyword.

df = sparql_dataframe.get(endpoint, q, post=True)


$ python -m unittest

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sparql_dataframe-0.4.tar.gz (2.3 kB view hashes)

Uploaded source

Built Distribution

sparql_dataframe-0.4-py3-none-any.whl (3.5 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page