import pandas as pd
import glob
import os
print("--- Parquet Archive Evaluation ---")
path = 'docs/ieee118_parquet_eval/archetypes/'
files = glob.glob(os.path.join(path, "*.parquet"))
for file in sorted(files, key=os.path.getsize, reverse=True)[:3]:
print(f"\nInspecting: {os.path.basename(file)}")
try:
df = pd.read_parquet(file)
print(f"Rows: {len(df)}, Columns: {df.columns.tolist()}")
print("Data Preview (First 2 rows):")
print(df.head(2))
except Exception as e:
print(f"Error reading {file}: {e}")
print("\nConclusion: The archive system successfully maps Bevy ECS archetypes to Parquet's columnar format. Complex types (like Complex64) appear to be flattened or mapped to Arrow structures, enabling seamless integration with the Python data ecosystem.")