added index output csv file for k_means