@@ -89,7 +89,7 @@ def to_native_byteorder(array):
89
89
return array
90
90
91
91
92
- def read_h5py (file_path , key = 'data' , columns = None , mode = 'r+ ' ):
92
+ def read_h5py (file_path , key = 'data' , columns = None , mode = 'r' ):
93
93
'''
94
94
Read a hdf5 file written with h5py into a dataframe
95
95
@@ -135,7 +135,7 @@ def read_h5py(file_path, key='data', columns=None, mode='r+'):
135
135
return df
136
136
137
137
138
- def h5py_get_n_rows (file_path , key = 'data' , mode = 'r+ ' ):
138
+ def h5py_get_n_rows (file_path , key = 'data' , mode = 'r' ):
139
139
140
140
with h5py .File (file_path , mode ) as f :
141
141
group = f .get (key )
@@ -146,7 +146,7 @@ def h5py_get_n_rows(file_path, key='data', mode='r+'):
146
146
return group [next (iter (group .keys ()))].shape [0 ]
147
147
148
148
149
- def read_h5py_chunked (file_path , key = 'data' , columns = None , chunksize = None , mode = 'r+ ' ):
149
+ def read_h5py_chunked (file_path , key = 'data' , columns = None , chunksize = None , mode = 'r' ):
150
150
'''
151
151
Generator function to read from h5py hdf5 in chunks,
152
152
returns an iterator over pandas dataframes.
0 commit comments