MazzaWill / neo4j-python-pandas-py2neo-v3

利用pandas将excel中数据抽取,以三元组形式加载到neo4j数据库中构建相关知识图谱

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

only nodes will be displayed in neo4j, but the relationship between nodes can't be displayed.

renhuali opened this issue · comments

hi,
When I run the invoice_neo4j file, only nodes will be displayed in neo4j, but the relationship between nodes can't be displayed. It is the following running result:
D:\software\python\python.exe D:/code/neo4j-python-pandas-py2neo-v3-master/invoice_neo4j.py
发票名称 机器编号 发票代码 发票号码 ... 价税合计(小写) 收款人 复核 开票人
0 山东增值税电子普通发票 499099649091 37001700112 476941 ... ¥2617.05 束曼 束曼 王敏
1 湖北增值税电子普通发票 499099661823 42001700112 13208805 ... ¥246.85 戴宗鸿 戴宗鸿 胡朝霞
2 湖北增值税电子普通发票 499098921515 42001700112 27908343 ... ¥100.25 刘为先 刘为先 柯璐
3 湖北增值税电子普通发票 499098892671 42001700112 47502662 ... ¥145.18 孔淳晖 杨宁利 徐金金
4 湖北增值税电子普通发票 499098892697 42001700112 47153800 ... ¥37.85 孔淳晖 杨宁利 徐金金
5 湖北增值税电子普通发票 499099660214 42001700112 47213345 ... ¥69.01 刘为先 刘为先 柯璐
6 湖南增值税电子普通发票 499099661882 43001800112 1939605 ... ¥340.58 向建梅 向建梅 麻胜新
7 湖南增值税电子普通发票 499099785543 43001800112 7011955 ... ¥38.03 陈莹 陈莹 任娟
8 广东增值税电子普通发票 499099656872 44001700112 72411126 ... ¥76.66 黄绍芬 黄绍芬 徐晓丹
9 广东增值税电子普通发票 499098893067 44001700112 32616467 ... ¥79.59 李佳 吴少文 张帆
10 广东增值税电子普通发票 499099653583 44001700112 29414219 ... ¥227.90 张惠 苏馥蕊 张惠
11 广东增值税电子普通发票 499098894641 44001700112 83722452 ... ¥19.07 纪思涵 梁爱涛 朱家礼
12 广东增值税电子普通发票 499098891512 44001700112 75668743 ... ¥32.58 林丹霞 林丹霞 王静
13 广东增值税电子普通发票 499098892970 44001700112 36151707 ... ¥52.74 吴珊 吴珊 罗煜琳
14 广东增值税电子普通发票 499098890376 44001700112 5680333 ... ¥37.51 宋玉新 甘雨 郭之卉
15 广东增值税电子普通发票 499099655458 44001700112 31742233 ... ¥17.34 黎艳芳 黎艳芳 黄大吉
16 广东增值税电子普通发票 499099653284 44001700112 59018159 ... ¥25.66 戎妙珠 戎妙珠 张虎
17 广东增值税电子普通发票 499099655600 44001700112 58098285 ... ¥34.92 邓柳燕 邓柳燕 钱海
18 广东增值税电子普通发票 499098892347 44001719112 6589 ... ¥23.53 欧阳旭珠 朱晶晶 周莉萍
19 广东增值税电子普通发票 499098890819 44001709112 10622269 ... ¥14.07 黎晓梅 陈丽鸿 黎晓梅
20 广东增值税电子普通发票 499099662033 44001700112 11218811 ... ¥142.66 陈果 叶玉娟 陈果
21 广东增值税电子普通发票 499098891951 44001709112 1454500 ... ¥102.52 钟小柳 钟小柳 钟丹凤
22 广东增值税电子普通发票 499099655503 44001711112 10691690 ... ¥56.01 张玉珊 张玉珊 刘敏玲
23 广东增值税电子普通发票 499098891686 44001711112 3981240 ... ¥63.74 黄伟良 吴晓筠 李玉娥
24 广东增值税电子普通发票 499099662201 44001711112 9932014 ... ¥35.43 孙艳 孙艳 吴峰
25 江西增值税电子普通发票 499098906112 36001700112 5393233 ... ¥305.00 夏韶婕 肖燕 侯克刚
26 江西增值税电子普通发票 499098906112 36001700112 5393233 ... ¥305.00 夏韶婕 肖燕 侯克刚
27 江西增值税电子普通发票 499099661153 36001700112 12547202 ... ¥101.00 蔡莉莉 邓丽萍 邓自远
28 湖北增值税电子普通发票 499098892081 42001700112 11162913 ... ¥190.19 强晓琦 李银俊 曹佳培
29 湖北增值税电子普通发票 499099660821 42001700112 7007198 ... ¥294.82 龙梦媱 陈煜 尹晨
30 湖北增值税电子普通发票 499098911093 42001700112 19440150 ... ¥394.24 董霖 董霖 唐毅
31 湖北增值税电子普通发票 499099656098 42001700112 10077287 ... ¥128.54 王国平 徐黄裔 徐黄裔
32 湖北增值税电子普通发票 499098892726 42001700112 47251670 ... ¥72.69 孔淳晖 杨宁利 徐金金
33 广东增值税电子普通发票 499098890827 44001700112 83072331 ... ¥1644.78 刘首雁 刘首雁 李瑞翀
34 广东增值税电子普通发票 499098891627 44001721112 15382 ... ¥242.46 刘欢 刘欢 张华袖

[35 rows x 27 columns]
'Graph' object has no attribute 'find_one' 0
'Graph' object has no attribute 'find_one' 1
'Graph' object has no attribute 'find_one' 2
'Graph' object has no attribute 'find_one' 3
'Graph' object has no attribute 'find_one' 4
'Graph' object has no attribute 'find_one' 5
'Graph' object has no attribute 'find_one' 6
'Graph' object has no attribute 'find_one' 7
'Graph' object has no attribute 'find_one' 8
'Graph' object has no attribute 'find_one' 9
'Graph' object has no attribute 'find_one' 10
'Graph' object has no attribute 'find_one' 11
'Graph' object has no attribute 'find_one' 12
'Graph' object has no attribute 'find_one' 13
'Graph' object has no attribute 'find_one' 14
'Graph' object has no attribute 'find_one' 15
'Graph' object has no attribute 'find_one' 16
'Graph' object has no attribute 'find_one' 17
'Graph' object has no attribute 'find_one' 18
'Graph' object has no attribute 'find_one' 19
'Graph' object has no attribute 'find_one' 20
'Graph' object has no attribute 'find_one' 21
'Graph' object has no attribute 'find_one' 22
'Graph' object has no attribute 'find_one' 23
'Graph' object has no attribute 'find_one' 24
'Graph' object has no attribute 'find_one' 25
'Graph' object has no attribute 'find_one' 26
'Graph' object has no attribute 'find_one' 27
'Graph' object has no attribute 'find_one' 28
'Graph' object has no attribute 'find_one' 29
'Graph' object has no attribute 'find_one' 30
'Graph' object has no attribute 'find_one' 31
'Graph' object has no attribute 'find_one' 32
'Graph' object has no attribute 'find_one' 33
'Graph' object has no attribute 'find_one' 34
'Graph' object has no attribute 'find_one' 35
'Graph' object has no attribute 'find_one' 36
'Graph' object has no attribute 'find_one' 37
'Graph' object has no attribute 'find_one' 38
'Graph' object has no attribute 'find_one' 39
'Graph' object has no attribute 'find_one' 40
'Graph' object has no attribute 'find_one' 41
'Graph' object has no attribute 'find_one' 42
'Graph' object has no attribute 'find_one' 43
'Graph' object has no attribute 'find_one' 44
'Graph' object has no attribute 'find_one' 45
'Graph' object has no attribute 'find_one' 46
'Graph' object has no attribute 'find_one' 47
'Graph' object has no attribute 'find_one' 48
'Graph' object has no attribute 'find_one' 49
'Graph' object has no attribute 'find_one' 50
.......
'Graph' object has no attribute 'find_one' 905
'Graph' object has no attribute 'find_one' 906
'Graph' object has no attribute 'find_one' 907
'Graph' object has no attribute 'find_one' 908
'Graph' object has no attribute 'find_one' 909

Process finished with exit code 0

Thank you very much for your help

py2neo v4 doesn't has 'find_one' function.
In the place of find_one please change to NodeMatcher.

For example:
self.graph.find_one(label=self.invoice_name, property_key='name', property_value=df_data['name'][m])
change to:
from py2neo import Graph, NodeMatcher
matcher = NodeMatcher(self.graph)
matcher.match(self.invoice_name, name=df_data['name'][m]).first()

py2neo v4 doesn't has 'find_one' function.
In the place of find_one please change to NodeMatcher.

For example:
self.graph.find_one(label=self.invoice_name, property_key='name', property_value=df_data['name'][m])
change to:
from py2neo import Graph, NodeMatcher matcher = NodeMatcher(self.graph) matcher.match(self.invoice_name, name=df_data['name'][m]).first()

py2neo v4 没有“find_one”功能。
请在 find_one 的位置更改为 NodeMatcher。

例如:
self.graph.find_one(label=self.invoice_name, property_key='name', property_value=df_data['name'][m])
改为:
from py2neo import Graph, NodeMatcher matcher = NodeMatcher(self.graph) matcher.match(self.invoice_name, name=df_data['name'][m]).first()

py2neo v4 没有“find_one”功能。
请在 find_one 的位置更改为 NodeMatcher。

例如:
self.graph.find_one(label=self.invoice_name, property_key='name', property_value=df_data['name'][m])
改为:
from py2neo import Graph, NodeMatcher matcher = NodeMatcher(self.graph) matcher.match(self.invoice_name, name=df_data['name'][m]).first()

您好,具体需要怎么修改? invoice_neo4j.py内没有find_one这个函数,搜索里面寻找,只有包里面有这个名字,并且他是个函数。感谢回复!

py2neo v4 doesn't has 'find_one' function.
In the place of find_one please change to NodeMatcher.
For example:
self.graph.find_one(label=self.invoice_name, property_key='name', property_value=df_data['name'][m])
change to:
from py2neo import Graph, NodeMatcher matcher = NodeMatcher(self.graph) matcher.match(self.invoice_name, name=df_data['name'][m]).first()

py2neo v4 没有“find_one”功能。
请在 find_one 的位置更改为 NodeMatcher。
例如:
self.graph.find_one(label=self.invoice_name, property_key='name', property_value=df_data['name'][m])
改为:
from py2neo import Graph, NodeMatcher matcher = NodeMatcher(self.graph) matcher.match(self.invoice_name, name=df_data['name'][m]).first()

py2neo v4 没有“find_one”功能。
请在 find_one 的位置更改为 NodeMatcher。
例如:
self.graph.find_one(label=self.invoice_name, property_key='name', property_value=df_data['name'][m])
改为:
from py2neo import Graph, NodeMatcher matcher = NodeMatcher(self.graph) matcher.match(self.invoice_name, name=df_data['name'][m]).first()

您好,具体需要怎么修改? invoice_neo4j.py内没有find_one这个函数,搜索里面寻找,只有包里面有这个名字,并且他是个函数。感谢回复!

could you please send me the modified code?Because i revised it according to your method,and still reported an error.

py2neo v4 doesn't has 'find_one' function.
In the place of find_one please change to NodeMatcher.
For example:
self.graph.find_one(label=self.invoice_name, property_key='name', property_value=df_data['name'][m])
change to:
from py2neo import Graph, NodeMatcher matcher = NodeMatcher(self.graph) matcher.match(self.invoice_name, name=df_data['name'][m]).first()

py2neo v4 没有“find_one”功能。
请在 find_one 的位置更改为 NodeMatcher。
例如:
self.graph.find_one(label=self.invoice_name, property_key='name', property_value=df_data['name'][m])
改为:
from py2neo import Graph, NodeMatcher matcher = NodeMatcher(self.graph) matcher.match(self.invoice_name, name=df_data['name'][m]).first()

py2neo v4 没有“find_one”功能。
请在 find_one 的位置更改为 NodeMatcher。
例如:
self.graph.find_one(label=self.invoice_name, property_key='name', property_value=df_data['name'][m])
改为:
from py2neo import Graph, NodeMatcher matcher = NodeMatcher(self.graph) matcher.match(self.invoice_name, name=df_data['name'][m]).first()

您好,具体需要怎么修改? invoice_neo4j.py内没有find_one这个函数,搜索里面寻找,只有包里面有这个名字,并且他是个函数。感谢回复!

could you please send me the modified code?Because i revised it according to your method,and still reported an error.