BUG: pd.SparseDtype('int', 0) == pd.SparseDtype('int', pd.NA) returns pd.NA (original) (raw)

Pandas version checks

Reproducible Example

import pandas as pd

int_fill_0 = pd.SparseDtype('int', 0) int_fill_n = pd.SparseDtype('int', pd.NA)

r = (int_fill_0 == int_fill_n)

pd.NA

r_reverse = (int_fill_n == int_fill_0)

False

Issue Description

Equality comparison of SparseDtype filled by pd.NA and SparseDtype filled by non-na returns pd.NA, and is not symmetric.

Expected Behavior

It should return False.

Installed Versions

Replace this line with the output of pd.show_versions()