Utilize pandas to extract data from Excel and load it into the Neo4j database in triplet form to construct a relevant knowledge graph.
python3.6.5 windows10 For specific package dependencies, refer to the requirements.txt file.
pip install -r requirements.txt
The Excel data structure is as follows:
The data_extraction and relation_extrantion functions are used to extract the node data and relationship data required for building the knowledge graph, respectively, to construct triplets.
Data extraction primarily uses pandas to convert Excel data into a DataFrame type.
invoice_neo4j.py
Update neo4j_matrix.py code to extract and convert knowledge graph data into a matrix, providing data for machine learning models.
利用pandas将excel中数据抽取,以三元组形式加载到neo4j数据库中构建相关知识图谱
python3.6.5
windows10
具体包依赖可以参考文件requirements.txt
pip install -r requirements.txt
Excel数据结构如下
通过函数data_extraction和函数relation_extrantion分别抽取构建知识图谱所需要的节点数据以及联系数据,构建三元组。
数据提取主要采用pandas将excel数据转换成dataframe类型
invoice_neo4j.py