ENH: recognize Decimal("NaN") in pd.isna by jbrockmendel · Pull Request #39409 · pandas-dev/pandas (original) (raw)

What's the rationale for supporting decimals? (we don't have special support for it elsewhere, I think)

So that something like pd.Series([decimal.Decimal("NaN"), decimal.Decimal("2.2")]).isna() works correctly? (now it returns [False, False])

We don't really have such custom support for anything else in object dtype, so while I certainly understand the use case, I am not sure why would we should do it for decimal and not for something else? (although maybe decimal is the only relevant case)
Also, assume we would have proper decimal support in the future (eg arrow-backed), then the question is also if we want to keep supporting it like this in object dtype (arrow eg also doesn't support "NaN" for decimal).