Skip to content

gfql cypher pandas: three IN predicates across (a)-[e]->(t) crash with 'Unalignable boolean Series' (polars OK) #2020

Description

@lmeyerov

Repro (master @ 3fb216d)

import pandas as pd, graphistry
nodes_df = pd.DataFrame({'id': ['a','b','c','tx1','tx2'],'type': ['person','person','company','transaction','transaction']})
edges_df = pd.DataFrame({'src': ['a','b','a','tx1','tx2'],'dst': ['b','c','tx1','tx2','c'],'e_type': ['knows','works_at','sent','transfer','received']})
g = graphistry.edges(edges_df,'src','dst').nodes(nodes_df,'id')
q = "MATCH (a)-[e]->(t) WHERE a.type IN ['person','company'] AND e.e_type IN ['sent','transfer'] AND t.type IN ['transaction','account'] RETURN t.id AS id"
g.gfql(q, engine='polars')   # OK -> ['tx1']
g.gfql(q, engine='pandas')   # GFQLTypeError [invalid-node-reference] Error executing 'rows': Unalignable boolean Series provided as indexer

Replacing the third predicate with t.type = 'transaction' or a map (t {type: 'transaction'}) works on pandas. Engine parity gap: same query, Polars answers, pandas raises. Found while adding tested Cypher twins to gfql/about.rst examples (#2017 follow-up).

🤖 Generated with Claude Code

https://claude.ai/code/session_01WwMmVFo44ADiRRj5cxh7i1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions