import pandas as pd
from rdflib import ConjunctiveGraph
import sparqldataframe
sparql_query = """
SELECT ?item ?itemLabel
WHERE {
  ?item wdt:P31 wd:Q146.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
"""
df = sparqldataframe.wikidata_query(sparql_query)
df.head()
item itemLabel
0 http://www.wikidata.org/entity/Q28114532 Nala
1 http://www.wikidata.org/entity/Q28114535 Mr. White
2 http://www.wikidata.org/entity/Q28665865 Мyka
3 http://www.wikidata.org/entity/Q28792126 Gli
4 http://www.wikidata.org/entity/Q30600575 Orlando