Skip to content

BUG: ser[:] = ["a", 1] casts 1 to "1" #35865

Closed
@jbrockmendel

Description

@jbrockmendel
ser = pd.Series(["a", 1])
ser[:] = list(ser.values))

>>> ser[1]
'1'

Looks like we call np.array(ser.values) and the cast happens in there.

Metadata

Metadata

Assignees

Labels

IndexingRelated to indexing on series/frames, not to indexes themselvesNeeds TestsUnit test(s) needed to prevent regressionsgood first issue

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions