Search code examples
neo4jpy2neo

How to convert py2neo.database.cursor class to a dictionary or list in python?


Using graph.run() py2neo v3 to connect to neo4j DB: How can I convert an instance of py2neo.database.Cursor class to a dictionary or list in python?

Was simple in py2neo v2 using py2neo.cypher.core.RecordList class which is what graph.cypher.execute() the equivalent to graph.run would have returned if using the previous version...


Solution

  • Looks like you could do with the data method:

    http://py2neo.org/v3/database.html#py2neo.database.Cursor.data

    This is designed for use with libraries like Pandas where you need to extract the entire result.