I have this code
import pandas as pd
import numpy as np
import csv
df = pd.DataFrame({\'animal\': \'cat dog cat fish dog cat cat\'.split(),
\'
To get that specific output, you'll have to pass the quotes in explicitly.
df = pd.DataFrame({'animal': r'"cat" "dog" "cat" "fish" "dog" "cat" "cat"'.split(),
'size': list(r'"S" "S" "M" "M" "M" "L" "L"'.split()),
'weight': [8, 10, 11, 1, 20, 12, 12],
'adult' : [False] * 5 + [True] * 2});
df['weight'] = '%s' %('NA')
df.to_csv("ejemplo.csv", sep=';', decimal=',',quoting=csv.QUOTE_NONE, index=False)