You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to store DataFrames with unsigned integer dtypes in HDFStore fails due to a bug in the get_atom_data methods of the DataCol and DataIndexableCol classes in pandas.io.pytables. These methods use Python's capitalize method to map dtypes to PyTables column types, and fail because PyTables' unsigned int classes start with two capital letters (e.g., UInt32Col). This error occurs on 0.11 and the current master:
importpandasaspdimportnumpyasnpuint8_series=pd.Series(np.random.random_integers(0,high=255,size=5), dtype=np.uint8)
udf=pd.DataFrame({'u08': uint8_series}, index=np.arange(5))
store=pd.HDFStore('uint.h5')
# this invocation will throw an error in pandas 0.11 and current masterstore.append('uints', udf)
I have a commit + test on my fork that fixes this, just needed to submit the bug here first to have the right commit message on my fork, per contribution standards. First time committer.
The text was updated successfully, but these errors were encountered:
good catch. I should have had a mapping table rather than do capitalize for just this reason....(after all there are not that many types)....and could provide a more informative message as well....put up your PR and we'll take a look (also enable travis!, see CONTRIBUTION in the main dir for how)
Travis is running right now; the fix just checks for startswith('uint') but a mapping table would also work. I didn't have enough confidence in what values self.kind could have (is it guaranteed to be lowercase?) to make a mapping.
Trying to store DataFrames with unsigned integer dtypes in HDFStore fails due to a bug in the
get_atom_data
methods of theDataCol
andDataIndexableCol
classes inpandas.io.pytables
. These methods use Python'scapitalize
method to map dtypes to PyTables column types, and fail because PyTables' unsigned int classes start with two capital letters (e.g., UInt32Col). This error occurs on 0.11 and the current master:I have a commit + test on my fork that fixes this, just needed to submit the bug here first to have the right commit message on my fork, per contribution standards. First time committer.
The text was updated successfully, but these errors were encountered: