A python code to create csv files