-
-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Closed
Labels
Dtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversionsReshapingConcat, Merge/Join, Stack/Unstack, ExplodeConcat, Merge/Join, Stack/Unstack, Explode
Description
xref to #14535 (PR to fix, but stale)
# NG, must be float dtype
pd.Index([1]).insert(1, 1.0)
# Int64Index([1, 1], dtype='int64')
# NG, must be object dtype
pd.DatetimeIndex(['2011-01-01']).insert(1, 1)
# TypeError: cannot insert DatetimeIndex with incompatible label
Expected
pd.Index([1]).insert(1, 1.0)
# Float64Index([1.0, 1.0], dtype='float64')
pd.DatetimeIndex(['2011-01-01']).insert(1, 1)
# Index([2011-01-01 00:00:00, 1], dtype='object')
Metadata
Metadata
Assignees
Labels
Dtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversionsReshapingConcat, Merge/Join, Stack/Unstack, ExplodeConcat, Merge/Join, Stack/Unstack, Explode