aplbrain / grand

Your favorite Python graph libraries, scalable and interoperable. Graph databases in memory, and familiar graph APIs for cloud databases.
Apache License 2.0
80 stars 6 forks source link

Add DataFrameBackend #32

Closed j6k4m8 closed 2 years ago

j6k4m8 commented 2 years ago

Use Grand with an edgelist in pandas dataframe format.

import pandas as pd
from grand import Graph, DataFrameBackend

edges = pd.read_csv("my_edges.csv")

G = Graph(backend=DataFrameBackend(directed=True, edge_df=edges))