From ab273f620e2bd83d8b3426f0fb8f0529f9adbcbd Mon Sep 17 00:00:00 2001 From: nipunreddevil Date: Tue, 11 Jun 2013 10:30:46 +0530 Subject: [PATCH 1/4] Added documentation for to_clipboard() --- doc/source/io.rst | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/doc/source/io.rst b/doc/source/io.rst index 9d923d2d0e0cf..8270bfaf23fa5 100644 --- a/doc/source/io.rst +++ b/doc/source/io.rst @@ -1231,6 +1231,37 @@ And then import the data directly to a DataFrame by calling: clipdf +.. note:: + + You may need to install xsel on Linux to be able to read from the clipboard. + +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)) + +.. ipython:: python + + df + +.. ipython:: python + + df.to_clipboard() + +.. ipython:: python + + obj=pd.read_clipboard() + +.. ipython:: python + + obj + + + .. _io.excel: From ccac7718b139bb14035632d3170d242f32d8a4de Mon Sep 17 00:00:00 2001 From: nipunreddevil Date: Tue, 11 Jun 2013 10:47:46 +0530 Subject: [PATCH 2/4] Added a line about same retrieved content --- doc/source/io.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/source/io.rst b/doc/source/io.rst index 8270bfaf23fa5..9d937bddf7cc2 100644 --- a/doc/source/io.rst +++ b/doc/source/io.rst @@ -1260,6 +1260,8 @@ DataFrame into clipboard and reading it back. obj +We can see that we got the same content back, which we had earlier written to the clipboard. + From 4b13264cdce01028cea94b2719802740ed19d894 Mon Sep 17 00:00:00 2001 From: nipunreddevil Date: Thu, 13 Jun 2013 18:39:31 +0530 Subject: [PATCH 3/4] Modified to reflect usage of pypaperclip and put all code in one block --- doc/source/io.rst | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/doc/source/io.rst b/doc/source/io.rst index 9d937bddf7cc2..39211c5c0db49 100644 --- a/doc/source/io.rst +++ b/doc/source/io.rst @@ -1,4 +1,4 @@ -.. _io: +False.. _io: .. currentmodule:: pandas @@ -1231,10 +1231,6 @@ And then import the data directly to a DataFrame by calling: clipdf -.. note:: - - You may need to install xsel on Linux to be able to read from the clipboard. - 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 @@ -1243,24 +1239,15 @@ DataFrame into clipboard and reading it back. .. ipython:: python df=pd.DataFrame(randn(5,3)) - -.. ipython:: python - df - -.. ipython:: python - - df.to_clipboard() - -.. ipython:: python - - obj=pd.read_clipboard() + df.to_clipboard() + pd.read_clipboard() -.. ipython:: python +We can see that we got the same content back, which we had earlier written to the clipboard. - obj +.. note:: -We can see that we got the same content back, which we had earlier written to the clipboard. + You may need to install xlip or xsel (with gtk or PyQt4 modules) on Linux to use these methods. From be1931c73087ea1a16bc2f8146874c43a201b042 Mon Sep 17 00:00:00 2001 From: nipunreddevil Date: Thu, 13 Jun 2013 19:17:50 +0530 Subject: [PATCH 4/4] fixed typo --- doc/source/io.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/io.rst b/doc/source/io.rst index 39211c5c0db49..d01b671bbae67 100644 --- a/doc/source/io.rst +++ b/doc/source/io.rst @@ -1,4 +1,4 @@ -False.. _io: +.. _io: .. currentmodule:: pandas @@ -1247,7 +1247,7 @@ We can see that we got the same content back, which we had earlier written to th .. note:: - You may need to install xlip or xsel (with gtk or PyQt4 modules) on Linux to use these methods. + You may need to install xclip or xsel (with gtk or PyQt4 modules) on Linux to use these methods.