Skip to content

Network Graph builds its node set by adding two columns element-wise, so every graph gains phantom nodes and mixed column types abort the run #7325

Description

@kz930

What happened?

The operator builds its node set with set(sources + destinations). On two pandas Series + is element-wise rather than a union, so the set holds each source glued to its destination. That has two separate consequences.

When both columns are strings, the glued values are added to the graph as nodes and the genuine nodes only appear afterwards, when the edges are added. Running the operator over ten rows carrying the edges n3→n4, n1→n2 and n2→n3 draws seven nodes: the four real ones plus n3n4, n2n3 and n1n2, each reporting zero connections. Nothing errors, so the three extras read as real data — and n2n3 sits in the same picture as the genuine edge from n2 to n3.
Screenshot 2026-08-07 at 1 50 52 PM

When the two columns have different types the addition is invalid and the run aborts with TypeError: unsupported operand type(s) for +: 'int' and 'str'. Both fields are node labels, so neither carries a type rule and the form offers every column; choosing an integer id as the source and a string name as the destination is an ordinary selection that cannot work.
Screenshot 2026-08-07 at 1 51 17 PM
Expected: the node set is the union of the two columns, and any pair of column types works.

How to reproduce?

Point a Network Graph at a source with two string columns holding the edges n3→n4, n1→n2 and n2→n3, and select them as Source Column and Destination Column. The chart draws seven nodes; hovering the three extras reports n3n4: 0 connections., n2n3: 0 connections. and n1n2: 0 connections.. Then change the source to an integer column and the run aborts with the TypeError above.

Version/Branch

1.3.0-incubating-SNAPSHOT (main)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions