cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Convert neo4j.data.Record to string

Hi there,
I am relatively new to programming and Neo4j and I am currently getting into using it with python.
My problem is that whenever I output a property of a node, the response is of type neo4j.data.Record.

<Record n.Value=5>
<class 'neo4j.data.Record'>

Therefore I wanted to ask if there is an easy way to convert this into a string or a similar format.
Thanks in advance and have a nice day

1 ACCEPTED SOLUTION

I found out for myself with some help of this discussion.

query_string = '''match (n1)
where n1.Level = "Level 1"
return n1.name'''

result = conn.query(query_string, db="neo4j")
for record in result:
    print("Name: ", record["n1.name"])

View solution in original post

1 REPLY 1

I found out for myself with some help of this discussion.

query_string = '''match (n1)
where n1.Level = "Level 1"
return n1.name'''

result = conn.query(query_string, db="neo4j")
for record in result:
    print("Name: ", record["n1.name"])