Skip to content

NaN in columns produces TypeError #5016

Closed
@alefnula

Description

@alefnula
>>> pd.DataFrame([[1,2,3]], columns=[1.1,2.2,np.nan])
Traceback (most recent call last):
...
TypeError: ("'NoneType' object is not iterable", u'occurred at index 2.2')

Is this a bug or a feature? I don't see anything about that in the v0.13.0.txt, and it worked in 0.12:

>>> pd.DataFrame([[1,2,3]], columns=[1.1,2.2,np.nan])
    1.1   2.2  NaN
0     1     2     3

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementIndexingRelated to indexing on series/frames, not to indexes themselvesMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions