Skip to main content

sparql-dataframe

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.

Install

Directly from PyPi for Python 3.4+.

$ pip install sparql-dataframe

From Github. This should support Python 2.7 as well.

$ pip install git+https://github.com/lawlesst/sparql-dataframe.git

Usage

import sparql_dataframe

endpoint = "http://dbpedia.org/sparql"

q = """
    SELECT ?label ?wikiPageID
    WHERE {
    <http://dbpedia.org/resource/Baseball> rdfs:label ?label ;
         <http://dbpedia.org/ontology/wikiPageID> ?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)

Tests

$ python -m unittest

Metadata

Release files for sparql-dataframe 0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sparql-dataframe 0.4
File Size Uploaded
sparql_dataframe-0.4.tar.gz 2.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sparql-dataframe 0.4
File Interpreter ABI Platform
sparql_dataframe-0.4-py3-none-any.whl Python 3 none any Details

Total release size: 5.8 kB

Release files / sparql_dataframe-0.4.tar.gz

Download URL sparql_dataframe-0.4.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b9e1e722d02989ae21269574fc9cf22f572e209d5aa129527b7a97cb020588f3
BLAKE2b-256 checksum
How to use checksums
36f69c1d7242cc79b6128c7445dc48b954a8f95dc536c6659db9088ca8dbb9f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.6

Release files / sparql_dataframe-0.4-py3-none-any.whl

Download URL sparql_dataframe-0.4-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3512f898526cea55ccefd0d4535774458ee385faa0dffdcc2751e8d54aa73228
BLAKE2b-256 checksum
How to use checksums
a107ffcd009474710188237527ca21c487b23d8e59e996833fcdae72c8ba3f55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.6

Release history Release notifications | RSS feed

This release

0.4 This release

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page