相关疑难解决方法(0)

如何解决HDFStore异常问题:无法找到正确的原子类型

我正在寻找关于什么类型的数据场景可能导致此异常的一般指导.我试过以各种方式按摩我的数据无济于事.

我已经搜索了这个例外几天了,经历了几次谷歌小组讨论,并没有提出调试的解决方案HDFStore Exception: cannot find the correct atom type.我正在阅读混合数据类型的简单csv文件:

Int64Index: 401125 entries, 0 to 401124
Data columns:
SalesID                     401125  non-null values
SalePrice                   401125  non-null values
MachineID                   401125  non-null values
ModelID                     401125  non-null values
datasource                  401125  non-null values
auctioneerID                380989  non-null values
YearMade                    401125  non-null values
MachineHoursCurrentMeter    142765  non-null values
UsageBand                   401125  non-null values
saledate                    401125  non-null values
fiModelDesc                 401125  non-null values
Enclosure_Type              401125  non-null values
...................................................
Stick_Length                401125  non-null values
Thumb                       401125  non-null values
Pattern_Changer             401125  non-null values …
Run Code Online (Sandbox Code Playgroud)

python hdf5 pandas

5
推荐指数
1
解决办法
4250
查看次数

具有“ where”条件限制的熊猫read_hdf?

我需要查询带有3个条件的子句的HDF5文件,where条件之一是长度为30的列表:

myList = list(xrange(30))

h5DF   = pd.read_hdf(h5Filename, 'df', where='index=myList & date=dateString & time=timeString')
Run Code Online (Sandbox Code Playgroud)

上面的查询给了我ValueError: too many inputs,错误是可重现的。

如果我将清单的长度减少到29(三个条件):

myList = list(xrange(29))

h5DF   = pd.read_hdf(h5Filename, 'df', where='index=myList & date=dateString & time=timeString')
Run Code Online (Sandbox Code Playgroud)

条件数只能为两个(列表长度为30):

然后执行正常:

myList = list(xrange(30))

h5DF   = pd.read_hdf(h5Filename, 'df', where='index=myList & time=timeString')
Run Code Online (Sandbox Code Playgroud)

这是已知限制吗?http://pandas.pydata.org/pandas-docs/dev/generated/pandas.io.pytables.read_hdf.html上的pandas文档没有提及此限制,在搜索此论坛后似乎没人遇到此限制。

版本是pandas 0.15.2。任何帮助表示赞赏。

python hdf5 pytables pandas

2
推荐指数
1
解决办法
2970
查看次数

标签 统计

hdf5 ×2

pandas ×2

python ×2

pytables ×1