to_clipboard is no longer Excel compatible · Issue #12529 · pandas-dev/pandas (original) (raw)

Using pandas-0.18.0rc1-cp27-cp27m-win_amd64.whl from Christoh Gohlkes site:

import pandas as pd
df = pd.DataFrame({u'a':[1,2], u'degC_°C':[3,4]})
df.to_clipboard()
df.to_clipboard(excel=True, sep='\t')
df.to_clipboard(excel=False, sep='\t')
df.to_clipboard(sep=',')

Always gives the same content in the clipboard:

which cannot be pasted to Excel since it does not use tab as separator.
Copy/paste worked fine in pandas 0.17.1 except for unicode characters.

Output of pd.show_versions():

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: AMD64 Family 22 Model 0 Stepping 1, AuthenticAMD
byteorder: little
LC_ALL: None
LANG: de_DE

pandas: 0.18.0rc1
nose: None
pip: 8.0.2
setuptools: 19.6.1
Cython: 0.23.4
numpy: 1.10.4
scipy: 0.17.0
statsmodels: None
xarray: None
IPython: 4.1.0rc1
sphinx: 1.3.5
patsy: None
dateutil: 2.4.2
pytz: 2015.7
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.5.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8