Skip to content

Setting float_series[bool_index] = None errors #4667

Closed
@dalejung

Description

@dalejung
s = pd.Series(range(10)).astype(float)
s[s > 8] = None
s
/Users/datacaliber/Dropbox/Projects/trading/python/externals/pandas/pandas/core/internals.py in create_block(v, m, n, item, reshape)
    596                 # change the dtype
    597                 if nv is None:
--> 598                     dtype, _ = com._maybe_promote(n.dtype)
    599                     nv = v.astype(dtype)
    600                     try:

AttributeError: 'NoneType' object has no attribute 'dtype'

This is on latest master.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugDtype ConversionsUnexpected or buggy dtype conversionsIndexingRelated to indexing on series/frames, not to indexes themselves

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions