Category : neo4j

I am trying to insert a Python dictionary into a bare Neo4j Database. These tweets are gathered on a change stream from a MongoDB Collection. I am brand new to Neo4j and want to use it to visualize the relationships between tweets, users, hashtags, and user mentions. I know I with MongoDB you can bulk ..

Read more

I have created node with using py2neo package from py2neo import Graph from py2neo import Node This is my pandas dataframe I can create successfully node. I have been trying to working with relationship getting error! graph.create(Relationship(pmid, "Having_author", auth)) TypeError: Values of type <class ‘pandas.core.series.Series’> are not supported I have also refer stack overflow question ..

Read more

Dears, When I’m trying to execute my python code I encountered the following error "No module named Neo4j". I then installed the neo4j. Then I found that I have to configure and to connect to Neo4j. When I run the cypher-sehll in the terminal command I found this error "The server does not support any ..

Read more

I have a list of dictionaries I have created in python. It looks like this: [{name: ‘Bob’}, {name: ‘Teresa’}, {name: ‘Bob’}, {name: ‘Teresa’}] Here’s my cypher query to take this list and merge into Neo4j that I’m expecting only 2 new nodes are created, Bob and Teresa nodes. WITH $batch AS batch UNWIND batch as ..

Read more

So I am trying to automate query input into Neo4j browser. Since the area where the text is written into is not an input field, rather in <span> tags as below: I would add in the the cypher command MATCH (n) RETURN n LIMIT 10 through python like this: driver.execute_script(‘return document.getElementsByClassName("view-line")[0].outerHTML='<div style="top:0px;height:23px;" class="view-line"><span><span class="mtk4">MATCH</span><span class="mtk15">&nbsp;</span><span ..

Read more

I’m running a pretty simple cypher query to get a mutual directed relation: MATCH (this {name: "me"})-[r1]->(channel)<-[r2]-(target) RETURN *. The thing is that the python driver won’t give me any of the attributes on relations, but if I specify them in the RETURN it works fine, e.g. RETURN r1.bananas. How can I get return * ..

Read more

I’m try to run gds.alpha.allShortestPaths.stream in a py2neo.Graph instance That is my code: cypherCode = """CALL gds.alpha.allShortestPaths.stream({ nodeQuery: ‘MATCH (n:AUTHOR) RETURN id(n) AS id’, relationshipQuery: ‘MATCH (n:AUTHOR)-[r:COAUTHORS]-(p:AUTHOR) RETURN id(n) AS source, id(p) AS target’ }) YIELD sourceNodeId, targetNodeId, distance return sourceNodeId, targetNodeId, distance """ r = graph.run(cypherCode) I’m using relationshipQuery: ‘MATCH (n:AUTHOR)-[r:COAUTHORS]-(p:AUTHOR) RETURN id(n) AS ..

Read more

I’m about to run a query in neo4j with a parameter, but it always returns me an error. > query= ("MATCH (p1:Item),(p2:Item) where p1.value=$name > RETURN p1.value AS from, p2.value AS to, > gds.alpha.similarity.euclideanDistance((p1.embeddingNode2vec), > (p2.embeddingNode2vec)) AS similarity order by similarity desc limit > 40", name=references[2]) the p1.value the first element in the references list. ..

Read more