I am creating the following dataframe and then writing it to a txt file:
df = pd.DataFrame({'key': ['0001'], 'name': ['"LUCA"']})
df.to_csv('names.txt', index=False)
I expect my txt file to look like this:
key,name
0001,"LUCA"
But it is looking like this instead:
key,name
0001,"""LUCA"""
Any suggestion please?