I am using py2neo to connect python to a neo4j database.Then I am trying to execute a query to set up a label name to some nodes, but the label name is a parameter. This is my code
for nodeID in nodesIDs:
nodes=nodesIDs[nodeID]
r=graph.cypher.execute("MATCH (d:node00) WHERE d.name in{x} SET d:{ID} RETURN d.name",{"x":nodes,"ID":nodeID})
print len(r)
but this give me an error said the "Invalid input '(': expected whitespace or a label name"
please advise