navis 1.4.0
  • Install
  • Quickstart
  • Tutorials
  • API
  • Changelog
  • Github
  • Ecosystem
  • Site
    • Page
        • navis.network2nx
          • network2nx()

    navis.network2nx¶

    navis.network2nx(x, threshold=None, group_by=None)[source]¶

    Generate NetworkX graph from edge list or adjacency.

    Parameters:
    • x (pandas.DataFrame) –

      Connectivity information:

      1. List of edges (columns: ‘source’, ‘target’, ‘weight’)

      2. Adjacency matrix (pd.DataFrame, rows=sources, columns=targets)

    • threshold (float | int, optional) – Connections weaker than this will be excluded.

    • group_by (None | dict, optional) – Provide a dictionary {group_name: [skid1, skid2, ...]} to collapse sets of nodes into groups.

    Returns:

    NetworkX representation of the network.

    Return type:

    networkx.DiGraph

    Back to top

    Source

    © Copyright 2018, Philipp Schlegel.
    Created using Sphinx 5.3.0.