Skip to content

pd.notna does not work with pyright strict mode. #944

@JanEricNitschke

Description

@JanEricNitschke

As discussed here, pd.notna (and also pd.isna) do not work with pyright strict mode.

This is due to the missing type parameters for Series, list, Index and ArrayLike in these two overloads

@overload
def notna(obj: Series) -> Series[bool]: ...
@overload
def notna(obj: Index | list | ArrayLike) -> npt.NDArray[np.bool_]: ...

The fix would be to add the required type parameters (or Any) to them. However i am not sure if/what bounds are needed for these type parameters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions