Closed
Description
regression from 0.14.0 (which return Index
, which is also not correct).
iloc
DOES work correctly though
In [9]: df = tm.makeTimeDataFrame()
In [10]: df.index
Out[10]:
<class 'pandas.tseries.index.DatetimeIndex'>
[2000-01-03, ..., 2000-02-11]
Length: 30, Freq: B, Timezone: None
In [11]: df.loc[[]].index
Out[11]: Float64Index([], dtype='float64')
# this is the correct result
In [4]: df.iloc[[]].index
Out[4]:
<class 'pandas.tseries.index.DatetimeIndex'>
Length: 0, Freq: None, Timezone: None
In [7]: p = tm.makePanel()
In [8]: p.major_axis
Out[8]:
<class 'pandas.tseries.index.DatetimeIndex'>
[2000-01-03, ..., 2000-02-11]
Length: 30, Freq: B, Timezone: None
In [9]: p.loc[:,[],:].major_axis
Out[9]: Float64Index([], dtype='float64')