update python script to new csv format