Skip to content

to_clipboard is no longer Excel compatible #12529

Closed
@dalito

Description

@dalito

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:

   a  degC_°C
0  1        3
1  2        4

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Error ReportingIncorrect or improved errors from pandasIO Excelread_excel, to_excelUnicodeUnicode strings

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions