Remap Node Property

The Remap Node Property operation can be used to remap the value in a node property with the value from another node property.

kgx.graph_operations.remap_node_property

kgx.graph_operations.remap_node_property(graph: kgx.graph.base_graph.BaseGraph, category: str, old_property: str, new_property: str) → None[source]

Remap the value in node old_property attribute with value from node new_property attribute.

Parameters
  • graph (kgx.graph.base_graph.BaseGraph) – The graph

  • category (string) – Category referring to nodes whose property needs to be remapped

  • old_property (string) – old property name whose value needs to be replaced

  • new_property (string) – new property name from which the value is pulled from