script de correction des tableaux
✓ Published0🌍 Public
RRCura
Last edited Feb 1, 2012
Created on Feb 1, 2012
This script corrects malformed CSV traffic tables from network simulations, ensuring every row has a uniform length of 21 columns. It reads input files named with network and simulation indices, processes rows that are either too long or too short, and writes corrected versions. For short rows, it pads missing values with "NA" while preserving the row’s name and trailing data. Using Python’s `csv.reader` and `csv.writer` with `QUOTE_NONNUMERIC`, it overwrites the original files after cleaning. The code demonstrates a batch-processing workflow for raw simulation output across multiple networks.
AI-generated description