Skip to content

BUG: changing series dtype inplace #4463

Closed
@jreback

Description

@jreback

All of the following current fail because of in-place dtype conversions

In [2]: s = Series([1,2,3])
In [3]: s.iloc[0] = np.nan
ValueError: cannot convert float NaN to integer

In [4]: s.loc[0] = np.nan
ValueError: cannot convert float NaN to integer

In [5]: s[0] = np.nan
TypeError: 'int' object is not iterable

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