标签:查询语句 cal import 令行 直接 match 学习 auth uri
pip3 install py2neo
auth=(用户名,密码)
from py2neo import Graph,Node,Relationship
graph = Graph("http://localhost:7474",auth=("neo4j","password"))
问题:unauthorized(self.uri.string)
解决方法:
from py2neo import authenticate,Graph
authenticate("localhost:7474","账号","密码")
graph = Graph("http://localhost:7474/db/data")
(已通过batch-import导入,这步省略
a = Node("Person", name="Alice")
b = Node("Person", name="Bob")
ab = Relationship(a, "KNOWS", b)
graph.create(ab)
from py2neo import authenticate,Graph
graph = Graph("http://localhost:7474",auth=("neo4j","password"))
str = "match (变量名a:标签名{属性名:特定属性值}) return a"
x = graph.run(str).data()
y = pd.DataFrame(x)
标签:查询语句 cal import 令行 直接 match 学习 auth uri
原文地址:https://www.cnblogs.com/l999q/p/13396022.html