PyGraphistry: Explore Relationships

Documentation Status Build Status PyPi Status PyPi Downloads License Twitter

PyGraphistry is a Python visual graph AI library to extract, transform, query, analyze, model, and visualize big graphs. It includes several notable pieces: * Client to using the optional Graphistry server for GPU compute and visualization * A variety of efficient dataframe-native tabular and graph methods for loading and transforming graphs * The GFQL dataframe-native graph query language with optional GPU support * Graphistry[AI]: Installing optional graphistry[ai] dependencies adds graph autoML, including automatic feature engineering, UMAP, and graph neural net support * Plugins: Query databases like Neo4j, compute systems like Nvidia RAPIDS, and frameworks like igraph. PyGraphistry enables working with fast and familiar dataframe data representations, and PyGraphistry takes care of efficient conversions.

Combined, PyGraphistry reduces your time to graph for going from raw data to visualizations to AI models in a few lines of code.

The API reference documentation here provides useful packages, modules, and commands for PyGraphistry. In the navbar you can find an overview of all the packages and modules we provided and a few useful highlighted ones as well. You can search for them on our Search page. For a full tutorial, refer to our PyGraphistry repo.

For self-hosting and access to a free API key, refer to our Graphistry Hub.

Quickstart

Here’s a representative example of how to get started:

import graphistry
import pandas as pd

# Load a simple graph from a dataframe
df = pd.DataFrame({
  'src': ['A', 'B', 'C'],
  'dst': ['B', 'C', 'A'],
  'nfo': ['X', 'Y', 'Z']
  'abc': [1, 2, 3]
})
g1 = graphistry.edges(df, source="src", destination="dst")

# Optionally convert to GPU if available
import cudf
g2 = g1.edges(cudf.from_pandas(g1._edges))

# Wrangle the graph, using automatic GPU acceleration
g3 = g2.materialize_nodes().get_degrees()
print(g3._nodes[['id', 'degree']])

# Server-accelerated visualization session
# Use a private server, or a free remote GPU account at graphistry.com/get-started (Graphistry Hub)
graphistry.register(api=3, username="my_username", password="my_password")
g3.plot()  # Upload the data and start a visual GPU session

# Visualize your data as a similarity graph using a UMAP dimensionality reduction
# umap will feature-encode your data, run UMAP, and connect similarity entities
# By default, GPUs will be used if available
umap_g = graphistry.nodes(df).umap()
umap_g.plot()

Indices and tables