Skip to content

Saving Panel with float index to HDFStore fails #454

@andreas-h

Description

@andreas-h

Hi,

the following code produces a ValueError: unrecognized index type <type 'float'>:

import datetime
import pandas
timeidx = pandas.DateRange(start=datetime.datetime(2009,1,1),
                   end=datetime.datetime(2009,12,31),
                   offset=pandas.datetools.MonthEnd())
lons_coarse = np.linspace(-177.5, 177.5, 72)
lats_coarse = np.linspace(-87.5, 87.5, 36)
P = pandas.Panel(items=timeidx, major_axis=lons_coarse, minor_axis=lats_coarse)
D = pandas.DataFrame(data=np.random.randn(72*36).reshape((72,36)),index=lons_coarse, columns=lats_coarse)
P[datetime.datetime(2009,2,28)] = D
H = pandas.HDFStore("test.h5", complevel=9, complib='zlib')
H['test'] = P
H.close()

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