Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K

pandas.read_clipboard#

pandas.read_clipboard(sep='\\s+',dtype_backend=<no_default>,**kwargs)[source]#

Read text from clipboard and pass toread_csv().

Parses clipboard contents similar to how CSV files are parsedusingread_csv().

Parameters:
sepstr, default ‘\s+’

A string or regex delimiter. The default of'\\s+' denotesone or more whitespace characters.

dtype_backend{‘numpy_nullable’, ‘pyarrow’}, default ‘numpy_nullable’

Back-end data type applied to the resultantDataFrame(still experimental). Behaviour is as follows:

  • "numpy_nullable": returns nullable-dtype-backedDataFrame(default).

  • "pyarrow": returns pyarrow-backed nullableArrowDtypeDataFrame.

Added in version 2.0.

**kwargs

Seeread_csv() for the full argument list.

Returns:
DataFrame

A parsedDataFrame object.

See also

DataFrame.to_clipboard

Copy object to the system clipboard.

read_csv

Read a comma-separated values (csv) file into DataFrame.

read_fwf

Read 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  C0    1  2  31    4  5  6

[8]ページ先頭

©2009-2025 Movatter.jp