writing the csv file for svd and pca