§
    tŠtj÷  ã                  óØ   — d Z ddlmZ ddlmZ ddlmZ ddlZddlm	Z	 ddl
mZ ddlmZ dd	lmZ dd
lmZ ddlmZmZ erddlmZ  ed¦  «        de	j        fdd„¦   «         Z	 ddd„ZdS )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+ÚsepÚstrÚdtype_backendúDtypeBackend | lib.NoDefaultc                óÚ  — |                      dd¦  «        }|�;|                     ¦   «                              dd¦  «        dk    rt          d¦  «        ‚t	          |¦  «         dd	lm} dd
lm}  |¦   «         }	 | 	                    | 
                    d¦  «        pt          d¦  «        ¦  «        }n# t          $ r Y nw xY w|dd…                              d¦  «        dd…         dd…         }d„ |D ¦   «         }t          |¦  «        dk    r¢t          |¦  «        dk    r�|                      ¦   «         dk    rwd} t          |d         ¦  «        t          |d                              d¦  «        ¦  «        z
  }	|	dk    r0|                     dt#          t%          |	¦  «        ¦  «        ¦  «         n(t'          | t(          ¦  «        st+          d| ›d�¦  «        ‚t          | ¦  «        dk    r| 
                    d¦  «        €d|d<   nNt          | ¦  «        dk    r;| 
                    d¦  «        dk    r"t-          j        dt1          ¦   «         ¬¦  «          |t3          |¦  «        f| |dœ|¤ŽS )aâ  
    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'  ú
éÿÿÿÿé
   c                ó^   — h | ]*}|                      d ¦  «                             d¦  «        ’Œ+S )ú ú	)ÚlstripÚcount)Ú.0Úxs     úR/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/pandas/io/clipboards.pyú	<setcomp>z!read_clipboard.<locals>.<setcomp>n   s0   € Ð7Ð7Ð7¨Aˆa�hŠh�s‰mŒm×!Ò! $Ñ'Ô'Ð7Ð7Ð7ó    é   r    z 	Ú	index_colzsep=z must be a stringÚengineÚpythonÚczIread_clipboard with regex separator does not work properly with c engine.©Ú
stacklevel)r   r   )ÚpopÚlowerÚreplaceÚNotImplementedErrorr	   Úpandas.io.clipboardr   Úpandas.io.parsersr   ÚdecodeÚgetr   ÚAttributeErrorÚsplitÚlenr!   Ú
setdefaultÚlistÚrangeÚ
isinstancer   Ú
ValueErrorÚwarningsÚwarnr   r   )
r   r   Úkwargsr   r   r   ÚtextÚlinesÚcountsÚindex_lengths
             r%   Úread_clipboardrF      sˆ  € ðj �zŠz˜* gÑ.Ô.€Hð Ð §¢Ñ 0Ô 0× 8Ò 8¸¸bÑ AÔ AÀVÒ KÐ KÝ!Ð"WÑXÔXÐXå˜Ñ&Ô&Ð&à1Ð1Ð1Ð1Ð1Ð1Ø*Ð*Ð*Ð*Ð*Ð*àˆ=‰?Œ?€DðØ�{Š{˜6Ÿ:š: jÑ1Ô1ÐSµZÐ@RÑ5SÔ5SÑTÔTˆˆøÝð ð ð Øˆðøøøð ��%�ŒL×Ò˜tÑ$Ô$ S b SÔ)¨#¨2¨#Ô.€Eð 8Ð7°Ð7Ñ7Ô7€FÝ
ˆ5�z„z�A‚~€~�#˜f™+œ+¨Ò*Ð*¨v¯zªz©|¬|¸qÒ/@Ð/@Øˆõ ˜5 œ8‘}”}¥s¨5°¬8¯?ª?¸5Ñ+AÔ+AÑ'BÔ'BÑBˆØ˜1ÒÐØ×Ò˜k­4µ°lÑ0CÔ0CÑ+DÔ+DÑEÔEÐEøå˜�SÑ!Ô!ð 5ÝÐ3˜CÐ3Ð3Ð3Ñ4Ô4Ð4õ ˆ3�x„x�!‚|€|˜Ÿ
š
 8Ñ,Ô,Ð4Ø#ˆˆxÑÐÝ	ˆS‰Œ�AŠˆ˜&Ÿ*š* XÑ.Ô.°#Ò5Ð5ÝŒØWÝ'Ñ)Ô)ð	
ñ 	
ô 	
ð 	
ð
 ˆ8•H˜T‘N”NÐS¨¸=ÐSÐSÈFÐSÐSÐSs   Á:7B2 Â2
B?Â>B?TÚexcelúbool | Noneú
str | NoneÚreturnÚNonec                óÄ  — |                      dd¦  «        }|�;|                     ¦   «                              dd¦  «        dk    rt          d¦  «        ‚dd	lm} |€d
}|rw	 |€d}t          ¦   «         } | j        |f|ddœ|¤Ž |                     ¦   «         } ||¦  «         dS # t          $ r% t          j        dt          ¦   «         ¬¦  «         Y n(w xY w|�"t          j        dt          ¦   «         ¬¦  «         t          | t          ¦  «        r6t          dd¦  «        5   | j        di |¤Ž}ddd¦  «         n# 1 swxY w Y   nt#          | ¦  «        } ||¦  «         dS )a®  
    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/   r0   r1   r>   r3   rM   r   Úto_csvÚgetvalueÚ	TypeErrorr?   r@   r   r=   r
   r   Ú	to_stringr   )	ÚobjrG   r   rA   r   rM   ÚbufrB   Úobjstrs	            r%   Úto_clipboardrV   ‡   sþ  € ð2 �zŠz˜* gÑ.Ô.€Hð Ð §¢Ñ 0Ô 0× 8Ò 8¸¸bÑ AÔ AÀVÒ KÐ KÝÐAÑBÔBÐBà1Ð1Ð1Ð1Ð1Ð1à€}Øˆàð 
ð	Øˆ{Ø�Ý‘*”*ˆCð ˆCŒJ�sÐ@ ¨gÐ@Ð@¸Ð@Ð@Ð@Ø—<’<‘>”>ˆDàˆM˜$ÑÔÐØˆFøÝð 	ð 	ð 	ÝŒMØSÝ+Ñ-Ô-ðñ ô ð ð ð ð	øøøð
 
ˆÝŒØEÝ'Ñ)Ô)ð	
ñ 	
ô 	
ð 	
õ
 �#•|Ñ$Ô$ð åÐ2°DÑ9Ô9ð 	-ð 	-Ø"�S”]Ð,Ð, VÐ,Ð,ˆFð	-ð 	-ð 	-ñ 	-ô 	-ð 	-ð 	-ð 	-ð 	-ð 	-ð 	-øøøð 	-ð 	-ð 	-ð 	-øõ �S‘”ˆØ€M�&ÑÔÐÐÐs%   Á!AB% Â%,CÃCÄ D:Ä:D>ÅD>)r   r   r   r   )TN)rG   rH   r   rI   rJ   rK   )Ú__doc__Ú
__future__r   Úior   Útypingr   r?   Úpandas._libsr   Úpandas.util._decoratorsr   Úpandas.util._exceptionsr   Úpandas.util._validatorsr	   Úpandas.core.dtypes.genericr
   r   r   r   Úpandas._typingr   Ú
no_defaultrF   rV   rN   r'   r%   ú<module>rb      sZ  ðØ Ð à "Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ð Ð Ø  Ð  Ð  Ð  Ð  Ð  Ø €€€à Ð Ð Ð Ð Ð Ø .Ð .Ð .Ð .Ð .Ð .Ø 4Ð 4Ð 4Ð 4Ð 4Ð 4Ø 7Ð 7Ð 7Ð 7Ð 7Ð 7à 3Ð 3Ð 3Ð 3Ð 3Ð 3ðð ð ð ð ð ð ð ð
 ð ,Ø+Ð+Ð+Ð+Ð+Ð+ð €ˆHÑÔàØ25´.ðjTð jTð jTð jTñ ÔðjTð\ 7;ðAð Að Að Að Að Að Ar'   