with open('.csv', 'r') as f: content = f.read() with open('.csv', 'wb') as f: f.write(content.encode('iso-8859-1'))