PyGraphistry: Explore Relationships#
PyGraphistry is a Python visual graph AI library to extract, transform, query, analyze, model, and visualize big graphs. It includes several notable pieces:
- Graphistry Visualization Client
Graphistry Visualization Client: Convenience layer for using the optional Graphistry GPU server for accelerated compute and visualization
- Dataframe-native graph manipulation
Optimized dataframe-native tabular and graph methods for loading, transforming, analyzing, and visualizing data as graphs
- GFQL (new!)
GFQL (new!) queries: Home for the GFQL graph dataframe-native query language, with optional GPU support
- Graphistry[AI]
Optional methods and integrations for graph autoML, including automatic feature engineering, UMAP, and graph neural networks
- Plugins
Plugins: Optimized and streamlined integrations for enriching your workflows, including querying databases like Neo4j and Splunk
- Louie.AI (new!)
Louie.AI: Use generative AI to talk to your data, including for GFQL queries and Graphistry visualizations
Combined, PyGraphistry reduces your time to graph for going from raw data to visualizations to AI insights in a few lines of code.
Note
Looking where to start? See the quickstart below or the 10 Minutes to PyGraphistry guide.
Quickstart#
Install:
# Install from PyPI
pip install graphistry
# Optionally, get a free GPU account or self-hosted server at https://graphistry.com/get-started
Start graphing!
import graphistry
import pandas as pd
# Load data from any Python data science library or database
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")
# Server-accelerated GPU visualization
graphistry.register(api=3, server="hub.graphistry.com", username="A", password="B")
g1.plot()
# Use GPUs when available in almost all APIs
import cudf
g2 = g1.edges(cudf.from_pandas(g1._edges))
g2.plot()
# Many local graph wrangling helpers and easy dataframe-native graph manipulation
g3 = g2.materialize_nodes().get_degrees()
print(g3._nodes[['id', 'degree']])
# ML & AI methods
umap_g = graphistry.nodes(df).umap()
umap_g.plot()
# GFQL graph dataframe-native query language with optional GPU support
nearest_neighbors_df = umap_g.chain([ n({'id': 'A'}), e(hops=2), n()])._nodes
Articles#
We recommend reading the Graphistry blog and github demos. Some useful articles include: