Skip to content

Commit 7de0336

Browse files
committed
fix: correct/clarify to_property_graph method
1 parent c06494c commit 7de0336

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

awswrangler/neptune/_neptune.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,19 @@ def to_property_graph(
127127
"""Write records stored in a DataFrame into Amazon Neptune.
128128
129129
If writing to a property graph then DataFrames for vertices and edges must be written separately.
130+
130131
DataFrames for vertices must have a ~label column with the label and a ~id column for the vertex id.
131-
If the ~id column does not exist, the specified id does not exists, or is empty then a new vertex will be added.
132-
If no ~label column exists an exception will be thrown.
132+
If the ~id column does not exist, the specified id does not exist, or is empty then a new vertex will be added.
133+
133134
DataFrames for edges must have a ~id, ~label, ~to, and ~from column. If the ~id column does not exist
134-
the specified id does not exists, or is empty then a new edge will be added. If no ~label, ~to, or ~from column
135-
exists an exception will be thrown.
135+
the specified id does not exist, or is empty then a new edge will be added.
136+
137+
Existing ~id values will be overwritten. If no ~id, ~label, ~to, or ~from column exists,
138+
an InvalidArgumentValue exception will be thrown.
136139
137140
If you would like to save data using `single` cardinality then you can postfix (single) to the column header and
138141
set use_header_cardinality=True (default). e.g. A column named `name(single)` will save the `name` property
139-
as single
140-
cardinality. You can disable this by setting by setting `use_header_cardinality=False`.
142+
as single cardinality. You can disable this by setting by setting `use_header_cardinality=False`.
141143
142144
Parameters
143145
----------

0 commit comments

Comments
 (0)