We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
clipboard_set
1 parent c9167bd commit eb768afCopy full SHA for eb768af
pandas/core/generic.py
@@ -3058,6 +3058,9 @@ def to_clipboard(
3058
- Windows : none
3059
- macOS : none
3060
3061
+ This method uses the processes developed for the package `pyperclip`. A
3062
+ solution to render any output string format is given in the examples.
3063
+
3064
Examples
3065
--------
3066
Copy the contents of a DataFrame to the clipboard.
@@ -3078,6 +3081,14 @@ def to_clipboard(
3078
3081
... # A,B,C
3079
3082
... # 1,2,3
3080
3083
... # 4,5,6
3084
3085
+ Using the original `pyperclip` package for any string output format.
3086
3087
+ .. code-block:: python
3088
3089
+ import pyperclip
3090
+ html = df.style.to_html()
3091
+ pyperclip.copy(html)
3092
"""
3093
from pandas.io import clipboards
3094
0 commit comments