Hi, which type can I use in the cypher when I create a node?
I find API Documentation — Neo4j Python Driver 5.5
however, I do not find the list and map definition.
Does the list only support one dimension and not support a high dimension?
Does the map not support the embedded map?
Thanks
Hi Yanllearnn,
Thanks for your question. I understand you would like to know more about the list and map types in the Python Driver. Following are the corresponding datatypes between Cypher and Python
Cypher Type | Python Type |
Null | None |
Boolean | bool |
Integer | int |
Float | float |
String | str |
Bytes [1] | bytes |
List | list |
Map | dict |
Your question also asks about high dimensional lists and embedded maps. To be clear do you mean nested lists? nested maps?
Yes, the nested lists and nested maps. Does the noe4j support those?
Thanks
Can you tell me a bit more about how you want to use the sublists or subdictionaries? Perhaps a sample of those along with your desired outcome in Neo4j. This will allow me to see your goals and answer your question more directly.
for example
- nested list 2 dimensions array [[1,0,0], [0,1,0], [0,0,1]]
- nested dict or map {"data": {"from":1, "to":2, "des":"run one time"}}
Cypher supports those type as variables and parameters, but they can not be stored as properties. Only primitive types and lists of primitive types can be stored as properties.