Mapping to Cypher API

There are some general principles for how the Cypher API maps to the Python client API:

  • Method calls corresponding to Cypher procedures (preceded by CALL in the docs) return:

    • A table as a pandas DataFrame, if the procedure returns several rows (eg. stream mode algorithm calls).

    • A row as a pandas Series, if the procedure returns exactly one row (eg. stats mode algorithm calls).

    Some notable exceptions to this are:

    • Procedures instantiating graph objects and model objects have two return values: a graph or model object, and a row of metadata (typically a pandas Series) from the underlying procedure call.

    • Any methods on pipeline, graph or model objects (native to the Python client) mapping to Cypher procedures.

    • gds.version() which returns a string.

  • Method calls corresponding to Cypher functions (preceded by RETURN in the docs) will simply return the value the function returns.

  • The Python client also contains specific functionality for inspecting graphs from the GDS Graph Catalog, using a client-side graph object. Similarly, models from the GDS Model Catalog can be inspected using a client-side model object.

  • Cypher functions and procedures of GDS that take references to graphs and/or models as strings for input typically instead take graph objects and/or model objects as input in the Python client API.

  • To configure and use machine learning pipelines in GDS, specific pipeline objects are used in the Python client.