wesm/pandas — Issue #705: Cannot save DataFrame with unicode to CSV
Author: jtbates
Created: 2012-01-27 20:20:59+00:00
State: open

```
In [1]: from pandas import DataFrame
In [2]: df = DataFrame({u'c/\u03c3':[1,2,3]})
In [3]: df.to_csv('test')
---------------------------------------------------------------------------
UnicodeEncodeError Traceback (most recent call last)
.../ in ()
----> 1 df.to_csv('test')

.../lib/python2.7/site-packages/pandas-0.7.0.dev_88fcac5-py2.7-macosx-10.4-x86_64.egg/pandas/core/frame.pyc in to_csv(self, path, sep, na_rep, cols, header, index, index_label, mode, nanRep)
891 # given a string for a DF with Index

892 index_label = [index_label]
--> 893 csvout.writerow(list(index_label) + list(cols))
894 else:
895 csvout.writerow(cols)

UnicodeEncodeError: 'ascii' codec can't encode character u'\u03c3' in position 2: ordinal not in range(128)
```

I think this should be separate from [#680](https://github.com/wesm/pandas/issues/680). The CSV issue is also mentioned in this [comment on bug #300](https://github.com/wesm/pandas/issues/300#issuecomment-2735592).