MCPcopy Create free account
hub / github.com/Pometry/Raphtory / build_to_df

Function build_to_df

python/tests/test_export.py:1062–1086  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1060
1061# DO NOT RUN UNLESS RECREATING THE OUTPUT
1062def build_to_df():
1063 g = build_graph()
1064
1065 edge_df = g.edges.to_df()
1066 save_df_to_json(edge_df, "expected/dataframe_output/edge_df_all.json")
1067 edge_df = g.edges.to_df(include_property_history=False)
1068 save_df_to_json(edge_df, "expected/dataframe_output/edge_df_no_props.json")
1069 edge_df = g.edges.to_df(explode=False)
1070 save_df_to_json(edge_df, "expected/dataframe_output/edge_df_no_explode.json")
1071 edge_df = g.edges.to_df(convert_datetime=False)
1072 save_df_to_json(edge_df, "expected/dataframe_output/edge_df_no_datetime.json")
1073
1074 edge_df = g.edges.to_df(explode=True)
1075 save_df_to_json(edge_df, "expected/dataframe_output/edge_df_explode.json")
1076 edge_df = g.edges.to_df(explode=True, convert_datetime=True)
1077 save_df_to_json(edge_df, "expected/dataframe_output/edge_df_explode_datetime.json")
1078 edge_df = g.edges.to_df(explode=True, include_property_history=True)
1079 save_df_to_json(edge_df, "expected/dataframe_output/edge_df_explode_no_hist.json")
1080
1081 node_df = g.nodes.to_df()
1082 save_df_to_json(node_df, "expected/dataframe_output/node_df_all.json")
1083 node_df = g.nodes.to_df(include_property_history=False)
1084 save_df_to_json(node_df, "expected/dataframe_output/node_df_no_hist.json")
1085 node_df = g.nodes.to_df(convert_datetime=False)
1086 save_df_to_json(node_df, "expected/dataframe_output/node_df_no_datetime.json")
1087
1088
1089def jsonify_df(df):

Callers

nothing calls this directly

Calls 3

save_df_to_jsonFunction · 0.85
build_graphFunction · 0.70
to_dfMethod · 0.45

Tested by

no test coverage detected