BUG: creating multi-index with datetimes in the levels · Issue #7888 · pandas-dev/pandas (original) (raw)
In [3]: date1 = datetime.date.today()
In [4]: date2 = datetime.date.today().replace(month=1)
In [5]: date_cols=['date1', 'date2']
In [6]: index = pd.MultiIndex.from_product([[date1],[date2]])
The first level of this multi-index is a Index
of object dtyped datetimes
, rather than a DatetimeIndex
.
might be a bug in the creation process