Skip to content

Comparing a Table to a DataFrame does not return a boolean #8231

Description

@carloea2

Feature Summary

Comparing a Texera Table with a pandas DataFrame reduces equality over rows only and returns a per-column Series. Ordinary boolean use then raises an ambiguous-Series ValueError, despite Table.__eq__ declaring a boolean return.

Before: Table equals DataFrame, then boolean use raises ValueError

After: Table equals DataFrame, then equality returns a Python boolean

Equality should return True or False so callers can use the result directly.

Reproduction evidence:

Construct a Table and an equal pandas DataFrame, compare them, and use the result as a boolean.

Observed result:

result_type=Series
result={'x': True, 'y': True}
truth_error=ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

Version and commit evidence:

1.3.0-incubating-SNAPSHOT (main)

Commit Hash (Optional)

70c21145887920528d7d5540e3fb790b43e8b759

Proposed Solution or Design

After: Table equals DataFrame, then equality returns a Python boolean

Affected Area

Workflow Engine (Amber)

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions