Skip to content

BUG: creating multi-index with datetimes in the levels #7888

Closed
@jreback

Description

@jreback

http://stackoverflow.com/questions/25059140/pandas-multiindex-not-working-with-read-csv-and-datetime-objects/25059472#25059472

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions