Skip to content

Load networks from SQL database #250

Open

Description

@hackl

It would be great to have a more streamlined and user-friendly method for loading networks directly from an SQL database. Currently, the process works using the following code:

conn = sqlite3.connect("networks.db")
df_lotr = pd.read_sql_query('SELECT DISTINCT source, target from lotr', conn).rename(columns={"source": "v", "target": "w"})
conn.close()
n_lotr = pp.io.pandas.df_to_graph(df_lotr).to_undirected()

Activity

  1. self-assigned this
    on Oct 9, 2025
  2. linked a pull request that will close this issueadd sql support #303on Nov 13, 2025
  3. M-Lampert commented on Nov 13, 2025

    @M-Lampert
    Contributor

    I've submitted a PR (#303) implementing this feature. I've implemented the functions in line with the suggestions in #301 for the entire io module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions