CSV parsing and post-processing