GraphFrames is a powerful library for graph processing built on Apache Spark DataFrames. It allows users to perform graph analytics, queries, and algorithms like PageRank, connected components, and shortest paths directly using Spark's DataFrame API. The project is actively maintained, with frequent releases. The official Python package on PyPI is `graphframes-py`, and its latest version is 0.11.0.
pip install graphframes-pyVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize a SparkSession with the GraphFrames package, create vertex and edge DataFrames, construct a GraphFrame, and run a PageRank algorithm. Ensure the `--packages` option uses the correct GraphFrames version for your Spark and Scala environment.
Always use `pip install graphframes-py`. Do not install `graphframes`.
Update your Spark configurations to use `org.graphframes:graphframes:...` instead of `graphframes:graphframes:...`.
Ensure your Spark environment is configured to include the GraphFrames JAR. Refer to the 'install' and 'quickstart' examples for correct setup.
Always check the official GraphFrames documentation for the correct JAR artifact name (e.g., `org.graphframes:graphframes:0.11.0-spark3.5-s_2.12`) that matches your Spark and Scala versions.
Review the official GraphFrames documentation for v0.9.0+ when upgrading from older versions, especially if using advanced algorithms or custom Pregel implementations.