Reputation: 916
Using the py2neo tutorial (http://book.py2neo.org/en/latest/cypher/):
from py2neo import neo4j, cypher
graph_db = neo4j.GraphDatabaseService()
query = "START a=node(1) RETURN a"
data, metadata = cypher.execute(graph_db, query)
a = data[0][0] # first row, first column
Trying to replicate this, I get:
>data[0][0]
Node('http://localhost:7474/db/data/node/1')
How do I get this to return the actual data, instead of the abstract information?
Upvotes: 0
Views: 269
Reputation: 4495
Your Cypher query returns a node (RETURN a
) and so that's what's being passed back: a Node
object. If it's the node's properties that you need, you can either then inspect the properties on that node with the get_properties method or return specific properties from the Cypher query instead (RETURN a.name
).
Upvotes: 1