Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions python/pyspark/pandas/tests/data_type_ops/testing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,17 @@ def check_extension(self, left, right):
pandas versions. Please refer to https://github.com/pandas-dev/pandas/issues/39410.
"""
self.assert_eq(left, right)

def assert_eq(self, left, right, **kwargs):
"""
SPARK-55321:
Ignore null values when comparing dataframe or series. pyspark.pandas generates
a different null value than pandas and pandas 3 has a more strict testing
utility.
"""
try:
if left.isnull().to_numpy().any() or right.isnull().to_numpy().any():
kwargs["ignore_null"] = True
except AttributeError:
pass
return super().assert_eq(left, right, **kwargs)