-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
to_hdf5 cannot handle None's in metadata #609
Comments
…efined pH for one of the samples, which is invalid for the hdf5 formatter, issue biocore/biom-format#609
👍 just found this in a table I'm working on, it is forever to be stored in 1.0 😟 |
:( |
In the meantime I've On (Mar-30-15|18:04), Daniel McDonald wrote:
|
Unfortunately this is a big question: how to serialize missing data. We can't serialize |
Actually, I don't think we're using masked arrays in any of our projects, maybe we should look deeper into them. |
We need better enforcement surrounding metadata... a reserved word for indicating a null entry for HDF5, but it would need to be defined in the spec itself, which would trigger a change to format version 2.1.1, which is not ideal. The masked arrays would really need to trigger a 2.2.0 format as that would be defining a separate dataset. All paths are not fun -- I think the best direction is to, at write, detect nulls like this such that in the original example, the data are implicitly transformed to: > t.metadata()
Out[5]:
(defaultdict(<function <lambda> at 0x10d595848>, {u'pH': 7.0}),
defaultdict(<function <lambda> at 0x10d5958c0>, {u'pH': 8.0}),
defaultdict(<function <lambda> at 0x10d595938>, {u'pH': 7.0}),
defaultdict(<function <lambda> at 0x10d5959b0>, {u'pH': None})) ...which I believe would fly for the format and spec. |
I think that works @wasade and shouldn't need a new format/spec |
Deferring to 2.2 as this is also lumped into the grand ol' refactor of the formatters and parsers. It would be nice to defer the type detection as well back to pandas as this could get nasty fast. |
This table:
Will cause
to_hdf5
to except. It is valid forto_json
.The text was updated successfully, but these errors were encountered: