convert data to csv file python