Skip to content

BUG: invalid dtype conversion when setting string column #7704

Closed
@jreback

Description

@jreback

http://stackoverflow.com/questions/24650117/how-can-i-select-all-dataframe-rows-that-are-within-a-certain-distance-of-a-give/24653406#24653406

In [32]: df = pd.DataFrame(np.random.rand(30, 3), columns=tuple('ABC'))

In [33]: df['event'] = np.nan

In [34]: df.dtypes
Out[34]: 
A        float64
B        float64
C        float64
event    float64
dtype: object

In [35]: df.loc[10,'event'] = 'foo'

In [37]: df.dtypes
Out[37]: 
A        object
B        object
C        object
event    object
dtype: object

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