graphframes
GraphFrames: DataFrame-based Graphs
What it is and what it does
GraphFrames is a Python library that brings graph processing to Apache Spark's distributed computing framework. It sits on top of Spark's DataFrame API, letting you represent graphs as vertex and edge DataFrames, then run graph algorithms—like PageRank, connected components, shortest paths, and motif finding—across a cluster. The package combines relational queries with graph traversals, so you can filter and join graph data using SQL-like syntax while leveraging Spark's optimizer for performance.
Typical use involves creating vertex and edge DataFrames, constructing a GraphFrame object, then calling built-in algorithms or writing custom logic with Pregel and message-passing APIs. It's designed for scenarios where your graph is too large for a single machine and you need both graph-specific operations and the flexibility to combine them with relational transformations.
Use it for:
- Entity resolution at scale by connecting similar records and running connected components to group duplicates
- Fraud detection in large transaction networks using cycle detection and K-Core algorithm
- Social network analysis such as ranking search results with distributed PageRank or finding independent sets for marketing campaigns
- Compliance analytics using shortest-path algorithms and motif analysis to detect suspicious patterns
- Knowledge graph construction and querying with property graph models and relational joins
- Graph clustering and community detection on massive networks using label propagation
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
GraphFrames provides distributed graph processing and analytics on Apache Spark using DataFrame abstractions, with built-in algorithms and flexible APIs like Pregel and AggregateMessages for custom graph computation.
Yes, if you have Apache Spark and need to run graph algorithms on data too large for a single machine. The library is actively maintained, has low install friction, and carries a permissive MIT license. However, verify that your Spark version and Python environment are compatible, since the latest release date and classifier information suggest the package may not have been updated for very recent versions.
Install
graphframes on PyPI
pip
pip install graphframesuv
uv add graphframespoetry
poetry add graphframesInstalling graphframes
Before you install
Low install friction with a pure-wheel distribution. The package is actively maintained with a recent commit on 2026-08-12, though the latest release date shown is 2018-12-05.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it suitable for most production environments.
Quickstart
pip install graphframes
from graphframes import GraphFrame
g = GraphFrame(nodes_df, edges_df)
print(g.inDegrees.show())
Requires Apache Spark to be installed and configured; GraphFrames is a Spark library, not a standalone graph tool.
Verify before relying
- Whether the package supports current Python versions beyond 3.6, given classifiers list only up to 3.6
- Current Apache Spark version compatibility, as the last release is dated 2018-12-05
- Whether numpy and nose are truly runtime dependencies or only test/build-time requirements
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — numpy, nose |
| Maintenance | actively maintained — 2,809 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,683,394/month — #2,940 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: graphframes-0.6-py2.py3-none-any.whl
Keywords: spark, graphx, for, dataframe
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
graphframes-pyGraphFrames Python wrapper provides graph…
permissive · top 5,000 on PyPI
pysparkPySpark provides Python bindings to Apache…
permissive · top 1,000 on PyPI
pyspark-pandasProvides tools for distributing Pandas…
unclear · top 5,000 on PyPI
scikit-networkscikit-network provides graph algorithms and…
permissive · top 5,000 on PyPI
pyspark-clientPython client for connecting to Apache Spark…
permissive · top 5,000 on PyPI
grandalfGrandalf computes node coordinates and routes…
copyleft · top 5,000 on PyPI
koalasKoalas implements the pandas DataFrame API on…
permissive · top 5,000 on PyPI
graspologicGraspologic provides graph statistical…
permissive · top 15,000 on PyPI
nebula3-pythonA Python client library for connecting to and…
permissive · top 15,000 on PyPI
networkxNetworkX provides data structures and…
permissive · top 1,000 on PyPI