Skip to content

BUG: non-numeric asignment to numeric column not upcasting #3216

Closed
@jreback

Description

@jreback

http://stackoverflow.com/questions/15704274/adding-new-column-to-pandas-dataframe-with-values-for-particular-items

In [18]: df = pd.DataFrame([{"a": 1}, {"a": 3, "b": 2}])

In [19]: df['c'] = np.nan
In [21]: df.ix[0,'c'] = 'foo'
---------------------------------------------------------------------------
ValueError: could not convert string to float: f

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