Skip to main content

Jupyter/IPython Extension for Sparql Pandas dataframe queries

Project description

IPython Sparql Pandas Extension

Jupyter/IPython Extension for Sparql Pandas dataframe queries.


Via pip:

pip install ipython-sparql-pandas


Load the extension:

%load_ext ipython_sparql_pandas


%%sparql -qs foo
PREFIX dct: <>
PREFIX dcb: <>
PREFIX dbp: <>

SELECT DISTINCT ?name ?capital ?populationTotal WHERE {
    ?capital dct:subject dcb:Capitals_in_Europe ;
             dbp:populationTotal ?populationTotal ; 
             foaf:name ?name. 
ORDER BY DESC(?populationTotal)

The variable foo is now a Pandas dataframe of SPARQL results:

foo.plot.barh('name', 'populationTotal').invert_yaxis()



This package is inspired by ipython_sparql.

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

ipython-sparql-pandas-1.4.tar.gz (3.7 kB view hashes)

Uploaded source

Built Distribution

ipython_sparql_pandas-1.4-py2.py3-none-any.whl (4.0 kB view hashes)

Uploaded py2 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