writing fitting data to csv using pandas