Unfold Node Property#
The Unfold Node Property operation can be used to transform every
instance of a node property to a predicate such that if a node N
has property P and value X,
Pbecomes the predicateNis the subject of the predicateXbecomes the object of the predicate
kgx.graph_operations.unfold_node_property#
- kgx.graph_operations.unfold_node_property(graph: BaseGraph, node_property: str, prefix: Optional[str] = None) None[source]#
Unfold node property as a predicate where every node with
node_propertywill be unfolded as an edge.- Parameters:
graph (kgx.graph.base_graph.BaseGraph) – The graph
node_property (str) – The node property to unfold
prefix (Optional[str]) – The prefix to use