diff --git a/doc/source/io.rst b/doc/source/io.rst index 9d923d2d0e0cf..d01b671bbae67 100644 --- a/doc/source/io.rst +++ b/doc/source/io.rst @@ -1231,6 +1231,26 @@ And then import the data directly to a DataFrame by calling: clipdf +The ``to_clipboard`` method can be used to write the contents of a DataFrame to +the clipboard. Following which you can paste the clipboard contents into other +applications (CTRL-V on many operating systems). Here we illustrate writing a +DataFrame into clipboard and reading it back. + +.. ipython:: python + + df=pd.DataFrame(randn(5,3)) + df + df.to_clipboard() + pd.read_clipboard() + +We can see that we got the same content back, which we had earlier written to the clipboard. + +.. note:: + + You may need to install xclip or xsel (with gtk or PyQt4 modules) on Linux to use these methods. + + + .. _io.excel: