Skip to content

adding new row to frame breaks types #9269

Closed
@behzadnouri

Description

@behzadnouri

xref #8596

>>> df
   a
0  1
>>> df.dtypes
a    int64
dtype: object
>>> df.loc[1, 'a'] = 2
>>> df
   a
0  1
1  2
>>> df.dtypes
a    float64
dtype: object

in an intermediate step nan is inserted, and the data are casted to floats

Metadata

Metadata

Assignees

No one assigned

    Labels

    Dtype ConversionsUnexpected or buggy dtype conversionsDuplicate ReportDuplicate issue or pull requestEnhancementMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions