File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1358,6 +1358,26 @@ And then import the data directly to a DataFrame by calling:
13581358
13591359 clipdf
13601360
1361+ The ``to_clipboard `` method can be used to write the contents of a DataFrame to
1362+ the clipboard. Following which you can paste the clipboard contents into other
1363+ applications (CTRL-V on many operating systems). Here we illustrate writing a
1364+ DataFrame into clipboard and reading it back.
1365+
1366+ .. ipython :: python
1367+
1368+ df= pd.DataFrame(randn(5 ,3 ))
1369+ df
1370+ df.to_clipboard()
1371+ pd.read_clipboard()
1372+
1373+ We can see that we got the same content back, which we had earlier written to the clipboard.
1374+
1375+ .. note ::
1376+
1377+ You may need to install xclip or xsel (with gtk or PyQt4 modules) on Linux to use these methods.
1378+
1379+
1380+
13611381
13621382.. _io.excel :
13631383
You can’t perform that action at this time.
0 commit comments