imadcat / rhdf5

An unofficial fork of the R rhdf5 package developed by Bernd Fischer and Gregoire Pau. This fork is based on rhdf5 version 2.10.0
http://www.bioconductor.org/packages/release/bioc/html/rhdf5.html
0 stars 0 forks source link

h5read function can not handle python datetime type of data #2

Open imadcat opened 9 years ago

imadcat commented 9 years ago

It's not implemented in the original package. Reading a hdf5 file with python datetime data field will result a warning and that data field been set to NA.

imadcat commented 9 years ago

there is currently a work around: in pandas before exporting data frame, set Datetime column as index (or one of the index). then rhdf5 will recognize this index as int64 epoch (nano seconds since 1970-01-01).

it's easy to convert this int64 to date time in R.

the function h5DFread using this work around will soon be included after testing.