
    A>i                        S r SSKJr  SSKJr  SSKJr  SSKrSSKJ	r	  SSK
Jr  SSKJr  SS	KJr  SS
KJr  SSKJrJr  \(       a  SSKJr  \" S5      S\	R.                  4   SS jj5       r S     SS jjrg)zio on the clipboard    )annotations)StringIO)TYPE_CHECKINGN)lib)
set_module)find_stack_level)check_dtype_backend)ABCDataFrame)
get_optionoption_context)DtypeBackendpandasz\s+c                B   UR                  SS5      nUb/  UR                  5       R                  SS5      S:w  a  [        S5      e[	        U5        SS	KJn  SS
KJn  U" 5       n UR                  UR                  S5      =(       d    [        S5      5      nUSS R                  S5      SS SS nU Vs1 s H"  oR                  S5      R                  S5      iM$     n	n[!        U5      S:  a|  [!        U	5      S:X  am  U	R                  5       S:w  aY  Sn [!        US   5      [!        US   R                  S5      5      -
  n
U
S:w  a$  UR#                  S[%        ['        U
5      5      5        O%[)        U [*        5      (       d  [-        SU < S35      e[!        U 5      S:  a  UR                  S5      c  SUS'   OA[!        U 5      S:  a2  UR                  S5      S:X  a  [.        R0                  " S[3        5       S9  U" [5        U5      4XS.UD6$ ! [         a     GNf = fs  snf )aN  
Read text from clipboard and pass to :func:`~pandas.read_csv`.

Parses clipboard contents similar to how CSV files are parsed
using :func:`~pandas.read_csv`.

Parameters
----------
sep : str, default '\\s+'
    A string or regex delimiter. The default of ``'\\s+'`` denotes
    one or more whitespace characters.

dtype_backend : {'numpy_nullable', 'pyarrow'}
    Back-end data type applied to the resultant :class:`DataFrame`
    (still experimental). If not specified, the default behavior
    is to not use nullable data types. If specified, the behavior
    is as follows:

    * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
    * ``"pyarrow"``: returns pyarrow-backed nullable
      :class:`ArrowDtype` :class:`DataFrame`

    .. versionadded:: 2.0

**kwargs
    See :func:`~pandas.read_csv` for the full argument list.

Returns
-------
DataFrame
    A parsed :class:`~pandas.DataFrame` 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()  # doctest: +SKIP
>>> pd.read_clipboard()  # doctest: +SKIP
     A  B  C
0    1  2  3
1    4  5  6
encodingutf-8N- utf8z3reading from clipboard only supports utf-8 encodingr   )clipboard_get)read_csvzdisplay.encodingi'  

    	   z 		index_colzsep=z must be a stringenginepythonczIread_clipboard with regex separator does not work properly with c engine.
stacklevel)sepdtype_backend)poplowerreplaceNotImplementedErrorr	   pandas.io.clipboardr   pandas.io.parsersr   decodegetr   AttributeErrorsplitlstripcountlen
setdefaultlistrange
isinstancestr
ValueErrorwarningswarnr   r   )r#   r$   kwargsr   r   r   textlinesxcountsindex_lengths              S/var/www/html/land-tabula/venv/lib/python3.13/site-packages/pandas/io/clipboards.pyread_clipboardrA      s   j zz*g.H  0 8 8b AV K!"WXX&1*?D{{6::j1SZ@R5ST %Lt$Sb)#2.E 277Ahhsm!!$'F7
5zA~#f+*vzz|q/@ 58}s58??5+A'BB1k4l0C+DES!!DC6!2344 3x!|

8,4#x	SA&**X.#5W')	

 HTNSSFSSK   8s   $2H 4)H
HHc                   UR                  SS5      nUb/  UR                  5       R                  SS5      S:w  a  [        S5      eSS	KJn  Uc  S
nU(       a?   Uc  Sn[        5       nU R                  " U4USS.UD6  UR                  5       nU" U5        gUb  [        R                  " S[        5       S9  [        U [        5      (       a(  [        SS5         U R                   " S0 UD6nSSS5        O[#        U 5      nU" W5        g! [         a     [        R                  " S[        5       S9   Nzf = f! , (       d  f       ND= f)ab  
Attempt to write text representation of object to the system clipboard
The clipboard can be then pasted into Excel for example.

Parameters
----------
obj : the object to write to the clipboard
excel : bool, defaults to True
        if True, use the provided separator, writing in a csv
        format for allowing easy pasting into excel.
        if False, write a string representation of the object
        to the clipboard
sep : optional, defaults to tab
other keywords are passed to to_csv

Notes
-----
Requirements for your platform
  - Linux: xclip, or xsel (with PyQt4 modules)
  - Windows:
  - OS X:
r   r   Nr   r   r   z&clipboard only supports utf-8 encodingr   )clipboard_setTr   )r#   r   zAto_clipboard in excel mode requires a single character separator.r!   z7to_clipboard with excel=False ignores the sep argument.zdisplay.max_colwidth )r%   r&   r'   r7   r)   rC   r   to_csvgetvalue	TypeErrorr8   r9   r   r5   r
   r   	to_stringr6   )	objexcelr#   r:   r   rC   bufr;   objstrs	            r@   to_clipboardrM      s*   2 zz*g.H  0 8 8b AV KABB1}	{*C JJs@g@@<<>D$ 
E')	

 #|$$2D9]],V,F :9 S&#  	MMS+-	 :9s   =D D4'D10D14
E)r#   r6   r$   zDtypeBackend | lib.NoDefault)TN)rJ   zbool | Noner#   z
str | NonereturnNone)__doc__
__future__r   ior   typingr   r8   pandas._libsr   pandas.util._decoratorsr   pandas.util._exceptionsr   pandas.util._validatorsr	   pandas.core.dtypes.genericr
   r   r   r   pandas._typingr   
no_defaultrA   rM   rD       r@   <module>r\      s     "      . 4 7 3
 + H25..jT	jT/jT jT\ 7;AA)3A	Ar[   