-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
Dtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversionsIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselvesgood first issue
Milestone
Description
I thought we had an issue for this, but couldn't find it.
In [41]: df = pd.DataFrame(columns=['A'])
In [42]: df.index.dtype
Out[42]: dtype('O')
In [43]: df['A'] = []
In [44]: df.index.dtype
Out[44]: dtype('int64')
In [45]: df.index
Out[45]: RangeIndex(start=0, stop=0, step=1)
I this should still be empty an empty Index
(though see #16961 which proposes change pd.Series()
to have that use a range index. Not sure if that's a good idea or not).
xref dask/dask#2564
Metadata
Metadata
Assignees
Labels
Dtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversionsIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselvesgood first issue