Create a script to iterate over generated data files and verify that they can be opened.
I'm thinking it will be like the h5_dump.py.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import pandas as pd
import sys
import helper_methods
def main(output_path):
h5_outputs = path.join(output_path, '*.h5')
# Glob allows the use of the * wildcard
files = glob(h5_outputs)
for file in files:
try:
with pd.HDFStore(file) as hdf:
print(f'{file} was successfully read')
except OSError as error:
print(f'Could not open {file} with error: {error}')
if __name__ == '__main__':
main(sys.argv[1])
Create a script to iterate over generated data files and verify that they can be opened.
I'm thinking it will be like the
h5_dump.py
.