Skip to content

Fix(table_diff): Properly handle null check for array types in data sample#4963

Merged
erindru merged 1 commit intomainfrom
erin/table-diff-array-sample
Jul 14, 2025
Merged

Fix(table_diff): Properly handle null check for array types in data sample#4963
erindru merged 1 commit intomainfrom
erin/table-diff-array-sample

Conversation

@erindru
Copy link
Collaborator

@erindru erindru commented Jul 14, 2025

Prior to this, showing the row_diff sample on a table where Pandas had coerced a value to an ndarray would return the following error:

[ValueError: The truth value of an array with more than one element is ambiguous.

The cause is that the current code assumed pd.isnull() would always return a bool, when actually it returns an array[bool] if it gets passed an array.

This PR updates the code to handle arrays and say "arrays are considered null (python None) if all their items are null"

@erindru erindru merged commit 3a872dc into main Jul 14, 2025
27 checks passed
@erindru erindru deleted the erin/table-diff-array-sample branch July 14, 2025 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants