Skip to content

ERR: invalid error reporting when comparing vs. None #12689

Closed
@ghost

Description

The "in" function does not work as expected in regard to a data frame. Let's say we have the following data frame :

df = pd.DataFrame(np.random.randn(6,4), columns=list('ABCD'))

We can test this data frame :

df is None
False

However we cannot test its presence in a list :

df in [None]
TypeError: Could not compare [None] with block values

We would expect to get just False in this case.

(Pandas version 0.17.1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions