writing a script to sample a csv and write new csv file with sample