Unable to read HDF5 file in R which was written using Python -


i wrote pandas dataframe on disk using to_hdf() function of dataframe (pandas / python 2.7).

i want read dataframe in r-environment. using rhdf5 package in r read file.

python code dump dataframe

data.to_hdf('mydataframe.h5', 'table', append=true) #data pandas dataframe 

r code read it

library(rhdf5) data <- h5read("mydataframe.h5", "table") 

how can achieved? there better way exchange dataframes between 2 languages? don't want involve .csv lose meta information , slower parse every time read.

i don't have error messages, couple of warnings. data read similar want , unable find stored. looks when try explore read object. whereas dataframe stored has shape (1,400,000 x 267).

list of 2  $ _i_table:list of 1   ..$ index:list of 10   .. ..$ abounds  : int [1:680(1d)] 0 2048 4096 6144 8192 10240 12288 14336 16384 18432 ...   .. ..$ bounds   : int [1:135, 1:5] 2048 4096 6144 8192 10240 12288 14336 16384 18432 20480 ...   .. ..$ indices  : int [1:278528, 1:5] 0 0 0 0 0 0 0 0 0 0 ...   .. ..$ indiceslr: int [1:278528(1d)] 2165 2165 2165 2165 2165 2165 2165 2165 2165 2165 ...   .. ..$ mbounds  : int [1:680(1d)] 1024 3072 5120 7168 9216 11264 13312 15360 17408 19456 ...   .. ..$ mranges  : int [1:5(1d)] 140288 418816 697344 975872 1254400   .. ..$ ranges   : int [1:2, 1:5] 0 278527 278528 557055 557056 835583 835584 1114111 1114112 1392639   .. ..$ sorted   : int [1:278528, 1:5] 0 1 2 3 4 5 6 7 8 9 ...   .. ..$ sortedlr : int [1:278665(1d)] 1392640 1392641 1392642 1392643 1392644 1392645 1392646 1392647 1392648 1392649 ...   .. ..$ zbounds  : int [1:680(1d)] 2047 4095 6143 8191 10239 12287 14335 16383 18431 20479 ...  $ table   :'data.frame':   1400000 obs. of  6 variables:   ..$ index         : int [1:1400000(1d)] 0 1 2 3 4 5 6 7 8 9 ...   ..$ values_block_0: num [1:1400000(1d)] na na na na na na na na na na ...   ..$ values_block_1: num [1:1400000(1d)] na na na na na na na na na na ...   ..$ values_block_2: num [1:1400000(1d)] na na na na na na na na na na ...   ..$ values_block_3: num [1:1400000(1d)] na na na na na na na na na na ...   ..$ values_block_4: num [1:1400000(1d)] na na na na na na na na na na ... 


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -