File tree 1 file changed +20
-0
lines changed
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:
1358
1358
1359
1359
clipdf
1360
1360
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
+
1361
1381
1362
1382
.. _io.excel :
1363
1383
You can’t perform that action at this time.
0 commit comments