[Tutor] pandas.to_clipboard() copies nothing
Peter Otten
__peter__ at web.de
Sat Jun 6 05:47:12 EDT 2020
Peter Otten wrote:
> I have a slightly different setup, and the following works for me:
>
> $ python3
> Python 3.4.3 (default, Nov 12 2018, 22:25:49)
> [GCC 4.8.4] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import pandas
>>>> df = pandas.DataFrame([[1,2], [3, 4]], columns=["Ham", "Spam"])
>>>> df.to_clipboard(sep=", ")
>>>>
> $ xclip -o -selection clipboard
> Ham Spam
> 0 1 2
> 1 3 4$
Except that the 2-char sep is ignored ;)
More information about the Tutor
mailing list