Skip to content

Commit f4c86ee

Browse files
adamnschbrs96
andcommitted
Correct construct docs in README
Co-Authored-By: Brian Shi <[email protected]>
1 parent 0d0fc92 commit f4c86ee

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,21 @@ To do this we provide the `gds.alpha.graph.construct` method with node data fram
8989

9090
```python
9191
nodes = pandas.DataFrame(
92-
"nodeId": [0, 1, 2, 3],
93-
"labels": ["A", "B", "C", "A"],
94-
"prop1": [42, 1337, 8, 0],
95-
"otherProperty": [0.1, 0.2, 0.3, 0.4]
92+
{
93+
"nodeId": [0, 1, 2, 3],
94+
"labels": ["A", "B", "C", "A"],
95+
"prop1": [42, 1337, 8, 0],
96+
"otherProperty": [0.1, 0.2, 0.3, 0.4]
97+
}
9698
)
9799

98100
relationships = pandas.DataFrame(
99-
"sourceId": [0, 1, 2, 3],
100-
"targetId": [1, 2, 3, 0],
101-
"relationshipType": ["REL", "REL", "REL", "REL"],
102-
"weight": [0.0, 0.0, 0.1, 42.0]
101+
{
102+
"sourceNodeId": [0, 1, 2, 3],
103+
"targetNodeId": [1, 2, 3, 0],
104+
"relationshipType": ["REL", "REL", "REL", "REL"],
105+
"weight": [0.0, 0.0, 0.1, 42.0]
106+
}
103107
)
104108

105109
G = gds.alpha.graph.construct(

0 commit comments

Comments
 (0)