in reply to Read CSV with column mapping
Probably not the best example for learning, but this script does exactly what you want and a lot more: