Publish / memory · All operations

Copy a table out

Hand the table to memory or the clipboard.

Status

In arcform

Not built yet

arcform does not do this yet; it would live in Brightfield's view. Its place on the roadmap

Shape of the result
the table sent out, with nothing new to look at
Level
not a step

Variants

Copy to the clipboard

Copy a cell, column, row or selection to the system clipboard.

Hand the table to another library

Convert the table into in-memory objects, such as an Arrow table, a data frame or Python values.

What other tools call it

Meridian's classification; an independent blind rating agreed on 86.2% of 312 rows (exact class, version 2).

Polars (2)
VisiData (5)
  • syscopy-cellread 2026-09-23

    Copy current cell to the system clipboard

  • syscopy-cellsread 2026-09-23

    Copy current column of selected rows to the system clipboard

  • syscopy-colnameread 2026-09-23

    Copy current column name to the system clipboard

  • syscopy-rowread 2026-09-23

    Copy current row to the system clipboard

  • syscopy-selectedread 2026-09-23

    Copy selected rows to the system clipboard

Background

In pandas, DataFrame.to_clipboard writes a text representation of a DataFrame to the system clipboard, which can then be pasted into Excel, for example.[1] In Polars, a DataFrame's export methods convert it to other formats, among them a pandas DataFrame, a NumPy ndarray and an Apache Arrow Table.[2] The clipboard is a buffer that some operating systems provide for short-term storage and transfer across applications.[3]

When to use it

Most operating systems do not save clipboard contents to persistent storage, so the contents are deleted when a user logs out or reboots.[3] The clipboard suits a quick paste into a spreadsheet or a message; a table that has to outlast the session belongs in a file. (Meridian's view) In pandas, DataFrame.to_clipboard separates fields with a tab by default.[1] In pandas, passing index=False to DataFrame.to_clipboard leaves the DataFrame's index out of the copied text.[1] On Linux, pandas' DataFrame.to_clipboard needs xclip or xsel, while on Windows and macOS it needs nothing extra.[1]

In Polars, to_pandas converts null values in numeric columns to NaN.[4] Passing use_pyarrow_extension_array=True to Polars' to_pandas preserves null values.[4] Polars' to_pandas requires both the pandas and PyArrow packages to be installed.[4] In Polars, to_numpy casts integer columns that contain nulls to a float type, with nan representing each null.[5] In Polars, to_numpy turns a DataFrame with mixed column types into an array of the object data type.[5] Check how missing values and types arrive in the receiving library before trusting a count or a sum computed there. (Meridian's view)

The method

Larry Tesler renamed deleting and restoring text as cut, copy and paste in 1973, and coined the term clipboard for the buffer they need.[3] The sending and receiving applications negotiate the formats that can be transferred between them.[3] In pandas, DataFrame.to_clipboard uses the processes developed for the pyperclip package.[1]

In VisiData, copying rows to the system clipboard asks for a file type, saves the rows in that format and passes the text to a clipboard command.[6] VisiData's default clipboard command is pbcopy on macOS, clip.exe on Windows, wl-copy under Wayland and xclip otherwise, and the clipboard_copy_cmd option changes it.[6] VisiData keeps an internal clipboard apart from the system clipboard: y copies the current row to the internal one, and Y copies it to the system one.[6]

Apache Arrow defines an in-memory columnar format, a standardised, language-agnostic specification for representing table-like datasets in memory.[7] Without a standard columnar data format, moving data from one system to another involves costly serialisation and deserialisation.[7] Systems that use or support Arrow can transfer data between them at little-to-no cost.[7] In Polars, to_arrow collects the DataFrame's underlying Arrow arrays in an Arrow Table, an operation that is mostly zero copy.[8] In Polars, to_pandas copies the data unless use_pyarrow_extension_array is enabled.[4] Polars' to_numpy returns an array that is not writable when it avoids a copy, and writable=True forces a copy to make the array writable.[5]

The Arrow PyCapsule Interface allows any Python library to export Arrow data structures to other libraries that understand the same protocol.[9] Before the Arrow PyCapsule Interface, many Python libraries simply provided export to PyArrow data structures, which always required PyArrow to be installed.[9] In Polars, the __arrow_c_stream__ method exports a DataFrame via the Arrow PyCapsule Interface.[2]

Compared with the alternatives

In pandas, read_clipboard reads text from the clipboard and passes it to read_csv.[1] Copying a table out hands data to the next program in the session, while writing a file keeps it: reach for the clipboard or an in-memory hand-off when the next step is immediate. (Meridian's view)