Dask通过子目录读取所有hdf文件

时间:2018-12-03 23:10:06

标签: python dataframe dask

我的文件结构如下:

\parentdir
 -\subdirs
   -\hdf_file.hdf

其中子目录有数千个,但hdf_file.hdf在每个子目录中具有相同的名称。问题在于,并非每个子目录都具有hdf_file.hdf。我尝试通过以下方式阅读它们的全部内容:

all_data=dd.read_hdf('/path/to/parentdir/*/hdf_file.hdf','/data')

直到第一个没有hdf_file.hdf的文件夹都可以使用。我该如何解决这个问题?

0 个答案:

没有答案
相关问题