Skip to content

series created with DatetimeIndex when index is [None] #7431

Closed
@dbew

Description

@dbew

This looks like a change from 0.13.1 to HEAD. If you create a series like this:

pd.Series(index=np.array([None]))

Then in 0.13.1 the result is:

Out[16]: 
NaN   NaN
dtype: float64

In [19]: x.index.dtype
Out[19]: dtype('O')

In [20]: type(x.index)
Out[20]: pandas.core.index.Index

but in HEAD the result is

Out[191]: 
NaT   NaN
dtype: float64

In[192]: x.index.dtype
Out[192]: dtype('<M8[ns]')

In[193]: type(x.index)
Out[193]: pandas.tseries.index.DatetimeIndex

So the index has changed from Index/object to DatetimeIndex/datetime64.

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