Last active
February 7, 2019 08:57
-
-
Save jjsantanna/b308ec6555e9f2e65eaa467fae51d3c5 to your computer and use it in GitHub Desktop.
Function for loading serveral .hdf5 files from a folder into a single dataframe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob #for reading recursively | |
import pandas as pd | |
def read_NL_dataset(output_dir): | |
all_files = glob.glob(output_dir+'/<FILE_NAMEish>*.hdf5') | |
df_all = pd.DataFrame() | |
print(all_files) | |
for all_file in all_files: | |
df_temp = pd.read_hdf(all_file, 'shodan') | |
df_all = df_all.append(df_temp) | |
return df_all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment