Closed
Description
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pandas.
-
(optional) I have confirmed this bug exists on the master branch of pandas.
This ideally should still return datetime64[ns]
dtype
In [1]: df = DataFrame(columns=["a", "b"], dtype="datetime64[ns]")
In [2]: df
Out[2]:
Empty DataFrame
Columns: [a, b]
Index: []
In [3]: df.quantile(0.5, axis=1, numeric_only=False)
Out[3]: Series([], Name: 0.5, dtype: float64)
In [4]: df.quantile(0.5, axis=1, numeric_only=False).dtype
Out[4]: dtype('float64')
In [5]: df
Out[5]:
Empty DataFrame
Columns: [a, b]
Index: []
In [6]: df.T
Out[6]:
Empty DataFrame
Columns: []
Index: [a, b]
# Probably the reason why we might get float64 dtype afterwards
In [7]: df.T.dtypes
Out[7]: Series([], dtype: object)