File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -1231,6 +1231,37 @@ And then import the data directly to a DataFrame by calling:
1231
1231
1232
1232
clipdf
1233
1233
1234
+ .. note ::
1235
+
1236
+ You may need to install xsel on Linux to be able to read from the clipboard.
1237
+
1238
+ The ``to_clipboard `` method can be used to write the contents of a DataFrame to
1239
+ the clipboard. Following which you can paste the clipboard contents into other
1240
+ applications (CTRL-V on many operating systems). Here we illustrate writing a
1241
+ DataFrame into clipboard and reading it back.
1242
+
1243
+ .. ipython :: python
1244
+
1245
+ df= pd.DataFrame(randn(5 ,3 ))
1246
+
1247
+ .. ipython :: python
1248
+
1249
+ df
1250
+
1251
+ .. ipython :: python
1252
+
1253
+ df.to_clipboard()
1254
+
1255
+ .. ipython :: python
1256
+
1257
+ obj= pd.read_clipboard()
1258
+
1259
+ .. ipython :: python
1260
+
1261
+ obj
1262
+
1263
+
1264
+
1234
1265
1235
1266
.. _io.excel :
1236
1267
You can’t perform that action at this time.
0 commit comments