Error writing pandas to csv with euro sign delimiter

Viewed 1767

I'm trying to write a Pandas data frame to a csv with '€' as a delimiter.

data.to_csv(file_path, sep = '€')

however, I get the error:

TypeError: "delimiter" must be an 1-character string

How can I overcome this issue? I must use the euro sign as a delimiter

3 Answers

I had the same issue in Python3.

This code works for me:

df = pd.read_csv('', sep='‰', engine='python', encoding='utf-8')
Related