def bolt_graph_to_edges_dataframe(graph):
import pandas as pd
return pd.DataFrame([
util.merge_two_dicts(
{ key: value for (key, value) in relationship.items() },
{
relationship_id_key: relationship.id,
start_node_id_key: relationship.start_node.id,
end_node_id_key: relationship.end_node.id
}
)
for relationship in graph.relationships
])
def bolt_graph_to_nodes_dataframe(graph):
import pandas as pd
return pd.DataFrame([
util.merge_two_dicts(
{ key: value for (key, value) in node.items() },
{
node_id_key: node.id
}
)
for node in graph.nodes
])
currently it only copies id and properties: