- Python 3
- Pip 3
$ sudo apt-get install python3 python3-pip| import codecs | |
| import csv | |
| with open('data.csv', 'wb') as f: | |
| # Write BOM to the file, it is required | |
| # Excl without BOM does not understend UTF-8 charcters... (Non ascii characters) | |
| f.write(codecs.BOM_UTF8) | |
| # Set excl dialect | |
| # Delimiter ; is required so columns are detected properly | |
| writer = csv.writer(f, dialect=csv.excel, delimiter=';') # Option 1 |