import struct, os from collections import Counter SRC = '/home/aria/kellogg_remake/raw/PCKELL.DAT' OUT = '/home/aria/kellogg_remake/extracted_dat' os.makedirs(OUT, exist_ok=True) with open(SRC, 'rb') as f: data = f.read() num_entries = struct.unpack_from('