Read text from clipboard and pass to read_csv().
Parses clipboard contents similar to how CSV files are parsed using read_csv().
A string or regex delimiter. The default of '\\s+' denotes one or more whitespace characters.
Back-end data type applied to the resultant DataFrame (still experimental). Behaviour is as follows:
"numpy_nullable": returns nullable-dtype-backed DataFrame (default).
"pyarrow": returns pyarrow-backed nullable ArrowDtype DataFrame.
Added in version 2.0.
See read_csv() for the full argument list.
A parsed DataFrame object.
See also
DataFrame.to_clipboardCopy object to the system clipboard.
read_csvRead a comma-separated values (csv) file into DataFrame.
read_fwfRead a table of fixed-width formatted lines into DataFrame.
Examples
>>> df = pd.DataFrame([[1, 2, 3], [4, 5, 6]], columns=['A', 'B', 'C'])
>>> df.to_clipboard()
>>> pd.read_clipboard()
A B C
0 1 2 3
1 4 5 6
© 2008–2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
© 2011–2025, Open source contributors
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/2.3.0/reference/api/pandas.read_clipboard.html