You can try using pandas.DataFrame.to_sql . You'd need to setup a relational database but it would be more flexable since you wouldn't be required to import it.
I am querying Splunk with Python SDK in a Jupyter environment. Here is the code a fragment:
...
res_list = list(splresults.ResultsReader(job.results(count=0)))
if(len(res_list) > 0):
df = pd.DataFrame(res_list, columns=res_list[0].keys())
...
df.to_csv('some.csv')
# - later on command line to import csv as virtual graph using stardog-admin - but why?
You could get something very close to what you're looking for by using the Stardog Rest API, the to_sql call, and a relational database. I don't know what exactly the Stardog folks are using for importing csv files but I guess that they might just fire up a java embedded db like h2, derby, hsqldb, etc, import the csv and then import it just like any relational source and then just throw the db away but that's just a guess. They might run it directly through the mapper.