GFQL: The Dataframe-Native Graph Query Language#
GFQL is a graph query language that runs directly on Python dataframes. It
needs no graph database. The same query runs on pandas, Polars, cuDF (GPU), or
Polars-GPU, and on a remote Graphistry server. Install it with
pip install graphistry.
GFQL accepts two syntaxes. The Python chain syntax composes n() and e()
steps. The Cypher syntax, g.gfql("MATCH (a)-[e]->(b) ..."), covers a
bounded subset of Cypher, the graph query language popularized by Neo4j. Both
compile to vectorized dataframe operations, so one machine handles graphs of
100M+ edges in interactive time (see GFQL vs Apache Spark GraphFrames on One Node).
Where to start#
New to GFQL: 10 Minutes to GFQL (10 minutes), Overview of GFQL, then the speedup case study.
Coming from Cypher: Cypher Syntax In GFQL and GFQL Quick Reference, then Cypher to GFQL Python & Wire Protocol Mapping.
Need speed: Choosing a GFQL Engine: pandas, Polars, cuDF, Polars-GPU picks the engine.
engine='polars'is the one-keyword CPU speedup; GFQL Performance: Measured Against Graph Databases covers GPU and remote GPU.Start from known nodes: Indexing Guide: Build Once, Query Faster and Adjacency Index: Fast Lookups from Known Nodes make lookups from known nodes cost O(degree) instead of O(E).
Developer Resources