o
    d                  
   @  s  d Z ddlmZ ddlmZmZ ddlZddlmZ ddl	Z	ddl
Z
ddlZddlmZmZmZmZmZmZ ddlZddlZddlmZ ddlZddlZddlmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z% dd	l&m'Z'm(Z)m*Z*m+Z+m,Z, ddl-Z-ddl.Z.dd
l/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7 ddl8m9Z9 ddl:m;Z; ddl<m=Z> ddl?m@Z@ ddlAmBZB ddlCmDZDmEZEmFZFmGZG ddlHmIZI ddlJmKZK eLe,e* e+ ZMeMNd eOdZPe#de0dZQe	jRG dd dZSe	jRG dd dee ZTddd ZUe%dd#d$ZVe%dd%d$ZVdd'd$ZVdd*d+ZWe%ddd/d0ZXe%	,ddd1d0ZX	2ddd4d0ZXd5d6 ZYdd8d9ZZe@eKd: eKd; d! d<	=		>	dddDdEZ[ddGdHZ\dIdIdIdIdJdKdLdMdNdO	Z]eLe]^ Z_ddQdRZ`e@eKd; d! dSddUdVZaddXdYZbe%d,d,d,d,d,dZddadbZce%d,d,d,d,d,d,dcddfdbZce%d,d,d,d,d,d,dcddhdbZce@eKd; d[ dSddd2didddcddjdbZcG dkdl dleeZdG dmdn dnedZeG dodp dpedZfG dqdr drZgG dsdt dtZhddxdyZiddzd{Zjdd|d}Zke
jldddZm	ddddZndddZodS )zCommon IO api utilities    )annotations)ABCabstractmethodN)defaultdict)BufferedIOBaseBytesIO	RawIOBaseStringIO
TextIOBaseTextIOWrapper)Path)IOAnyAnyStrDefaultDictGenericHashableLiteralMappingSequenceTypeVarcastoverload)urljoinurlparseuses_netlocuses_paramsuses_relative)
BaseBufferCompressionDictCompressionOptionsFilePath
ReadBufferReadCsvBufferStorageOptionsWriteBuffer)get_lzma_file)import_optional_dependency)BZ2File)doc)find_stack_level)is_boolis_file_like
is_integeris_list_like)
MultiIndex)_shared_docs z^[A-Za-z][A-Za-z0-9+\-+.]*://BaseBufferT)boundc                   @  s>   e Zd ZU dZded< ded< ded< ded< d	Zd
ed< dS )IOArgsz?
    Return value of io/common.py:_get_filepath_or_buffer.
    str | BaseBufferfilepath_or_bufferstrencodingmoder   compressionFboolshould_closeN)__name__
__module____qualname____doc____annotations__r<    rB   rB   U/var/www/html/visualizacion-main/env/lib/python3.10/site-packages/pandas/io/common.pyr4   S   s   
 r4   c                   @  s`   e Zd ZU dZded< ded< ejedZded< d	Z	d
ed< dddZ
dddZdddZdS )	IOHandlesau  
    Return value of io/common.py:get_handle

    Can be used as a context manager.

    This is used to easily close created buffers and to handle corner cases when
    TextIOWrapper is inserted.

    handle: The file handle to be used.
    created_handles: All file handles that are created by get_handle
    is_wrapped: Whether a TextIOWrapper needs to be detached.
    z
IO[AnyStr]handler   r:   )default_factoryzlist[IO[bytes] | IO[str]]created_handlesFr;   
is_wrappedreturnNonec                 C  s\   | j rt| jtsJ | j  | j  | j| j | jD ]}|  qg | _d| _ dS )z
        Close all created buffers.

        Note: If a TextIOWrapper was inserted, it is flushed and detached to
        avoid closing the potentially user-created buffer.
        FN)	rH   
isinstancerE   r   flushdetachrG   removeclose)selfrE   rB   rB   rC   rO   u   s   




zIOHandles.closeIOHandles[AnyStr]c                 C  s   | S NrB   rP   rB   rB   rC   	__enter__   s   zIOHandles.__enter__argsr   c                 G  s   |    d S rR   )rO   )rP   rU   rB   rB   rC   __exit__      zIOHandles.__exit__NrI   rJ   )rI   rQ   )rU   r   rI   rJ   )r=   r>   r?   r@   rA   dataclassesfieldlistrG   rH   rO   rT   rV   rB   rB   rB   rC   rD   `   s   
 

rD   urlobjectrI   r;   c                 C  s   t | tsdS t| jtv S )z
    Check to see if a URL has a valid protocol.

    Parameters
    ----------
    url : str or unicode

    Returns
    -------
    isurl : bool
        If `url` has a valid protocol return True otherwise False.
    F)rK   r7   	parse_urlscheme_VALID_URLSr\   rB   rB   rC   is_url   s   
rb   r6   r7   c                 C     d S rR   rB   r6   rB   rB   rC   _expand_user      re   c                 C  rc   rR   rB   rd   rB   rB   rC   re      rf   str | BaseBufferTc                 C  s   t | trtj| S | S )a]  
    Return the argument with an initial component of ~ or ~user
    replaced by that user's home directory.

    Parameters
    ----------
    filepath_or_buffer : object to be converted if possible

    Returns
    -------
    expanded_filepath_or_buffer : an expanded filepath or the
                                  input if not expandable
    )rK   r7   ospath
expanduserrd   rB   rB   rC   re      s   
headerrJ   c                 C  s   | d u rd S t | rtt| } | dk rtdd S t| ddr>tt| } ttt | s/tdtdd | D r<tdd S t	| rFt
d	td)
Nr   zUPassing negative integer to header is invalid. For no header, use header=None insteadF)
allow_setsz*header must be integer or list of integersc                 s  s    | ]}|d k V  qdS )r   NrB   ).0irB   rB   rC   	<genexpr>   s    z&validate_header_arg.<locals>.<genexpr>z8cannot specify multi-index header with negative integerszPassing a bool to header is invalid. Use header=None for no header or header=int or list-like of ints to specify the row(s) making up the column names)r-   r   int
ValueErrorr.   r   allmapanyr+   	TypeError)rk   rB   rB   rC   validate_header_arg   s*   

rv   .r!   convert_file_likec                 C  rc   rR   rB   r6   rw   rB   rB   rC   stringify_path   rf   ry   c                 C  rc   rR   rB   rx   rB   rB   rC   ry      s   FFilePath | BaseBufferTc                 C  s2   |st | rtt| S t| tjr|  } t| S )a  
    Attempt to convert a path-like object to a string.

    Parameters
    ----------
    filepath_or_buffer : object to be converted

    Returns
    -------
    str_filepath_or_buffer : maybe a string version of the object

    Notes
    -----
    Objects supporting the fspath protocol (python 3.6+) are coerced
    according to its __fspath__ method.

    Any other object is passed through unchanged, which includes bytes,
    strings, buffers, or anything else that's not even path-like.
    )r,   r   r2   rK   rh   PathLike
__fspath__re   rx   rB   rB   rC   ry      s
   
c                  O  s   ddl }|jj| i |S )z`
    Lazy-import wrapper for stdlib urlopen, as that imports a big chunk of
    the stdlib.
    r   N)urllib.requestrequesturlopen)rU   kwargsurllibrB   rB   rC   r     s   r   FilePath | BaseBufferc                 C  s$   t | tott| o| d S )zR
    Returns true if the given URL looks like
    something fsspec can handle
    )zhttp://zhttps://)rK   r7   r;   _RFC_3986_PATTERNmatch
startswithra   rB   rB   rC   is_fsspec_url  s
   

r   storage_optionscompression_options)r   r   utf-8rr8   r:   r    r9   r$   c              	   C  s  t | } t|\}}t| |}|r%t| dr%d|vr%tjdtt d d}t||d}d|v rE|dv rE|d	v rEtj| d
| t	t d |}d|vrSd|vrS|d7 }t
| trt| r|p_i }ddl}|jj| |d}t|}	|	jdd}
|
dkrddi}t|	 }W d   n1 sw   Y  t|||d|dS t| r,t
| tsJ | dr| dd} | dr| dd} td}g }ztd ddlm}m} ||tg}W n	 ty   Y nw z|j| fd|i|pi  }W n. t |y"   |du rddi}nt|}d|d< |j| fd|i|pi  }Y nw t|||d|dS |r3t!dt
| tt"t#j#frHtt$| ||d|dS t| ds_t| ds_dt%|  }t!|t| ||d|dS )a%  
    If the filepath_or_buffer is a url, translate and return the buffer.
    Otherwise passthrough.

    Parameters
    ----------
    filepath_or_buffer : a url, filepath (str, py.path.local or pathlib.Path),
                         or buffer
    {compression_options}

        .. versionchanged:: 1.4.0 Zstandard support.

    encoding : the encoding to use to decode bytes, default is 'utf-8'
    mode : str, optional

    {storage_options}

        .. versionadded:: 1.2.0

    ..versionchange:: 1.2.0

      Returns the dataclass IOArgs.
    writebzDcompression has no effect when passing a non-binary object as input.)
stacklevelN)methodw)bz2xz)zutf-16zutf-32z( will not write the byte order mark for tr   )headerszContent-Encodinggzipr   T)r6   r8   r:   r<   r9   zs3a://zs3://zs3n://fsspecbotocore)ClientErrorNoCredentialsErrorr9   anonz?storage_options passed with file object or non-fsspec file pathFreadz)Invalid file path or buffer object type: )&ry   get_compression_methodinfer_compressionhasattrwarningswarnRuntimeWarningr*   dictUnicodeWarningrK   r7   rb   r}   r~   Requestr   r   getr   r   r4   r   r   replacer'   botocore.exceptionsr   r   PermissionErrorImportErroropentuplerq   bytesmmapre   type)r6   r8   r:   r9   r   compression_methodfsspec_moder   req_inforeqcontent_encodingreaderr   err_types_to_retry_with_anonr   r   file_objmsgrB   rB   rC   _get_filepath_or_buffer  s   "
	





r   ri   c                 C  s   ddl m} td|| S )z
    converts an absolute native path to a FILE URL.

    Parameters
    ----------
    path : a path in native format

    Returns
    -------
    a valid FILE URL
    r   )pathname2urlzfile:)r}   r   r   )ri   r   rB   rB   rC   file_path_to_url  s   r   tarr   r   zipr   zstd)	.tar.tar.gz.tar.bz2.tar.xz.gz.bz2.zip.xzz.zst"tuple[str | None, CompressionDict]c              
   C  sZ   t | tr%t| }z
|d}W ||fS  ty$ } ztd|d}~ww i }| }||fS )a  
    Simplifies a compression argument to a compression method string and
    a mapping containing additional arguments.

    Parameters
    ----------
    compression : str or mapping
        If string, specifies the compression method. If mapping, value at key
        'method' specifies compression method.

    Returns
    -------
    tuple of ({compression method}, Optional[str]
              {compression arguments}, Dict[str, Any])

    Raises
    ------
    ValueError on mapping missing 'method' key
    r   z.If mapping, compression must have key 'method'N)rK   r   r   popKeyErrorrq   )r:   compression_argsr   errrB   rB   rC   r     s   

r   )r   
str | Nonec                 C  s   |du rdS |dkr-t | dd} t| tsdS t D ]\}}|  |r*|  S qdS |tv r3|S ddgtt }d| d| }t	|)a/  
    Get the compression method for filepath_or_buffer. If compression='infer',
    the inferred compression method is returned. Otherwise, the input
    compression method is returned unchanged, unless it's invalid, in which
    case an error is raised.

    Parameters
    ----------
    filepath_or_buffer : str or file handle
        File path or object.
    {compression_options}

        .. versionchanged:: 1.4.0 Zstandard support.

    Returns
    -------
    string or None

    Raises
    ------
    ValueError on invalid compression specified.
    NinferT)rw   Unrecognized compression type: z
Valid compression types are )
ry   rK   r7   extension_to_compressionitemslowerendswith_supported_compressionssortedrq   )r6   r:   	extensionvalidr   rB   rB   rC   r     s&   
r   
Path | strc                 C  s&   t | j}| std| ddS )z
    Check if parent directory of a file exists, raise OSError if it does not

    Parameters
    ----------
    path: Path or str
        Path to check parent directory of
    z1Cannot save file into a non-existent directory: ''N)r   parentis_dirOSError)ri   r   rB   rB   rC   check_parent_directoryM  s   
	r   )r8   r:   
memory_maperrorsr   path_or_bufr   is_textLiteral[False]r   IOHandles[bytes]c                C  rc   rR   rB   r   r9   r8   r:   r   r   r   r   rB   rB   rC   
get_handle[     r   )r8   r:   r   r   r   r   Literal[True]IOHandles[str]c                C  rc   rR   rB   r   rB   rB   rC   r   j  r   !IOHandles[str] | IOHandles[bytes]c                C  rc   rR   rB   r   rB   rB   rC   r   y  r   Tc                C  s  |pd}|pd}t | |rd|vr|d7 }t| t|tr$t| t| ||||d}|j}	t|	|\}	}}
t|	t}t	|j
}|d}d|vrS|rStt|	 |r|dkrc|jdd	|_n|dkrsd|jvrs| jd7  _|d
krt|	trtjd*|	|jd|}	ntjd*|	|jd|}	n|dkrt|	fd|ji|}	n|dkrt|	|jfi |}	|	jjdkr|
|	 |	j }t|dkr|	j| }	n|std|  td| n|dkrN|d|j t|	trtd*d|	i|}	n	td*d|	i|}	t|	tsJ d|	jjv rM|
|	 |	j }t|dkr<|	j|d }|dus9J |}	nY|sFtd|  td| nG|dkr[t |	|j}	n:|dkrtd}d|jv rud|jd*i |i}n
d|j d*i |i}|j|	fd|ji|}	n	d| }t|t|	trJ |
|	 n't|	tr|j!rd|jvrt|	|j|j!|d	d}	nt|	|j}	|
|	 d }|s|jd!krt|	t"rt#|	|j!d"}	n?|r"|s|st |	|jr"t$|	d#rt$|	d$rt$|	d%s	t%|	}	t&|	|j!|d	d}	|
|	 t|jtp |j' }d|jv r9t$|	d&s9t(d't)|j d(|
*  |j'rPt|jtrJJ |
|j t+|	|
||j
d)S )+a  
    Get file handle for given path/buffer and mode.

    Parameters
    ----------
    path_or_buf : str or file handle
        File path or object.
    mode : str
        Mode to open path_or_buf with.
    encoding : str or None
        Encoding to use.
    {compression_options}

        .. versionchanged:: 1.0.0
           May now be a dict with key 'method' as compression mode
           and other keys as compression options if compression
           mode is 'zip'.

        .. versionchanged:: 1.1.0
           Passing compression options as keys in dict is now
           supported for compression modes 'gzip', 'bz2', 'zstd' and 'zip'.

        .. versionchanged:: 1.4.0 Zstandard support.

    memory_map : bool, default False
        See parsers._parser_params for more information. Only used by read_csv.
    is_text : bool, default True
        Whether the type of the content passed to the file/buffer is string or
        bytes. This is not the same as `"b" not in mode`. If a string content is
        passed to a binary file/buffer, a wrapper is inserted.
    errors : str, default 'strict'
        Specifies how encoding and decoding errors are to be handled.
        See the errors argument for :func:`open` for a full list
        of options.
    storage_options: StorageOptions = None
        Passed to _get_filepath_or_buffer

    .. versionchanged:: 1.2.0

    Returns the dataclass IOHandles
    r   strictr   )r8   r:   r9   r   r   r   r   r   r1   r   )filenamer9   )fileobjr9   r   r9   r      zZero files found in ZIP file z9Multiple files found in ZIP file. Only one file per ZIP: r   namer   r   Nz Zero files found in TAR archive zDMultiple files found in TAR archive. Only one file per TAR archive: r   	zstandarddctxcctxr   )r8   r   newlineFrb)r8   readablewritableseekabler   z1Expected file path name or file-like object, got z type)rE   rG   rH   r:   rB   ),_is_binary_modecodecslookuprK   r7   lookup_errorr   r6   _maybe_memory_mapr   r:   r   r   r9   r   r   GzipFile_BZ2File_BytesZipFilebufferappendnamelistlenr   rq   
setdefault_BytesTarFilegetnamesextractfiler&   r'   ZstdDecompressorZstdCompressorr8   r
   _BytesIOWrapperr   
_IOWrapperr   r<   ru   r   reverserD   )r   r9   r8   r:   r   r   r   r   ioargsrE   handlesis_pathr   	zip_namesfilesfiler   	open_argsr   rH   rB   rB   rC   r     sL  6







	







	


c                      s0   e Zd ZdZedddZd fddZ  ZS )	_BufferedWriterz
    Some objects do not support multiple .write() calls (TarFile and ZipFile).
    This wrapper writes to the underlying buffer on close.
    rI   rJ   c                 C  rc   rR   rB   rS   rB   rB   rC   write_to_buffer  rf   z_BufferedWriter.write_to_bufferc                   sd   | j rd S |  r&| d | j |   W d    n1 s w   Y  n| j  t   d S )Nr   )closedgetvalueseekr   r  rO   superrS   	__class__rB   rC   rO     s   


z_BufferedWriter.closerX   )r=   r>   r?   r@   r   r  rO   __classcell__rB   rB   r  rC   r    s
    r  c                      sF   e Zd Z				dd fddZdddZdddZdddZ  ZS )r  Nr   r   r   r9   Literal['r', 'a', 'w', 'x']r   -ReadBuffer[bytes] | WriteBuffer[bytes] | Nonearchive_namerI   rJ   c                   s<   t    || _|| _tjjd|| ||d|| _d S )N)r   r9   r   rB   )	r  __init__r  r   tarfileTarFiler   extend_moder   )rP   r   r9   r   r  r   r  rB   rC   r    s   
z_BytesTarFile.__init__r7   c                 C  sP   | dd}|dkr|S | jd ur&t| jj}|dv r&| d|dd   }|S )Nr   r1   r   )r   r   r   :r   )r   r   r   suffix)rP   r9   r!  rB   rB   rC   r    s   
z_BytesTarFile.extend_modec                 C  sP   | j du rdS t| j }|jdkr|dj S |jdv r%|ddj S |j S )z
        If an explicit archive_name is not given, we still want the file inside the zip
        file not to be named something.tar, because that causes confusion (GH39465).
        Nr   r1   )r   r   r   )r   r   r!  with_suffixrP   r   rB   rB   rC   infer_filename  s   



z_BytesTarFile.infer_filenamec                 C  s>   | j p|  pd}tj|d}t|  |_| j||  d S )Nr   )r   )	r  r$  r  TarInfor   r  sizer   addfile)rP   r  tarinforB   rB   rC   r    s   z_BytesTarFile.write_to_buffer)Nr   NN)
r   r   r9   r  r   r  r  r   rI   rJ   )r9   r7   rI   r7   rI   r   rX   )r=   r>   r?   r  r  r$  r  r  rB   rB   r  rC   r    s    


r  c                      s6   e Zd Z	dd fd
dZdddZdddZ  ZS )r   Nr  1FilePath | ReadBuffer[bytes] | WriteBuffer[bytes]r9   r7   r  r   rI   rJ   c                   sD   t    |dd}|| _|dtj tj||fi || _d S )Nr   r1   r:   )	r  r  r   r  r   zipfileZIP_DEFLATEDZipFiler   )rP   r  r9   r  r   r  rB   rC   r    s
   
z_BytesZipFile.__init__c                 C  s@   t | jjtjtfrt| jj}|jdkr|dj	S |j	S dS )z
        If an explicit archive_name is not given, we still want the file inside the zip
        file not to be named something.zip, because that causes confusion (GH39465).
        r   r1   N)
rK   r   r   rh   r{   r7   r   r!  r"  r   r#  rB   rB   rC   r$    s   
z_BytesZipFile.infer_filenamec                 C  s(   | j p|  pd}| j||   d S )Nr   )r  r$  r   writestrr  )rP   r  rB   rB   rC   r    s   z_BytesZipFile.write_to_bufferrR   )r  r*  r9   r7   r  r   rI   rJ   r)  rX   )r=   r>   r?   r  r$  r  r  rB   rB   r  rC   r     s
    
r   c                   @  s>   e Zd ZdddZdd	d
ZdddZdddZdddZdS )r  r   r   rI   rJ   c                 C  s
   || _ d S rR   )r   )rP   r   rB   rB   rC   r    s   
z_IOWrapper.__init__r   r7   c                 C     t | j|S rR   getattrr   )rP   r   rB   rB   rC   __getattr__  rW   z_IOWrapper.__getattr__r;   c                 C     t | jdr| j S dS )Nr   T)r   r   r   rS   rB   rB   rC   r   "     
z_IOWrapper.readablec                 C  r3  )Nr   T)r   r   r   rS   rB   rB   rC   r   '  r4  z_IOWrapper.seekablec                 C  r3  )Nr   T)r   r   r   rS   rB   rB   rC   r   ,  r4  z_IOWrapper.writableN)r   r   rI   rJ   )r   r7   )rI   r;   )r=   r>   r?   r  r2  r   r   r   rB   rB   rB   rC   r    s    



r  c                   @  s.   e Zd Zdddd	ZdddZddddZdS )r  r   r   StringIO | TextIOBaser8   r7   rI   rJ   c                 C  s   || _ || _d| _d S )N    )r   r8   overflow)rP   r   r8   rB   rB   rC   r  5  s   
z_BytesIOWrapper.__init__attrc                 C  r/  rR   r0  )rP   r8  rB   rB   rC   r2  >  rW   z_BytesIOWrapper.__getattr__n
int | Noner   c                 C  sp   | j d usJ | j || j}| j| }|d u s$|dk s$|t|kr)d| _|S |d | }||d  | _|S )Nr   r6  )r   r   encoder8   r7  r   )rP   r:  
bytestringcombined_bytestring	to_returnrB   rB   rC   r   A  s   
z_BytesIOWrapper.readN)r   )r   r5  r8   r7   rI   rJ   )r8  r7   )r9  )r:  r;  rI   r   )r=   r>   r?   r  r2  r   rB   rB   rB   rC   r  2  s    
	r  rE   r5   /tuple[str | BaseBuffer, bool, list[BaseBuffer]]c              	   C  s   g }|t | dpt| tM }|s| ||fS tt| } t| tr)t| d} ||  zttj| 	 dtj
d}W t|D ]} |   q<nt|D ]} |   qHw |||gfS )zTry to memory map file/buffer.filenor   r   )access)r   rK   r7   r   r#   r   r   r  r   rA  ACCESS_READreversedrO   )rE   r   r
  wrappedrB   rB   rC   r   O  s(   






r   c              	   C  sF   d}t | } t| ts|S z	tj| }W |S  ttfy"   Y |S w )zTest whether file exists.F)ry   rK   r7   rh   ri   existsru   rq   )r6   rF  rB   rB   rC   file_existsq  s   
rG  c                 C  sV   d|v sd|v rd|v S t jt jt jf}tt| |rdS t| t p*dt| d|v S )z+Whether the handle is opened in binary moder   r   Fr9   )	r   StreamWriterStreamReaderStreamReaderWriter
issubclassr   rK   _get_binary_io_classesr1  )rE   r9   text_classesrB   rB   rC   r     s   r   tuple[type, ...]c                  C  s^   t tf} tddd}|dur-| d}| t|f7 } W d   | S 1 s(w   Y  | S )z!IO classes that that expect bytesr   ignore)r   Nr6  )r   r   r'   r  stream_readerr   )binary_classesr   r   rB   rB   rC   rL    s   
rL  columnsSequence[Hashable] | MultiIndex	index_colbool | Sequence[int] | Nonec                   sD    du s	t  trg  tt| o t | t o t fdd| D S )a  
    Check whether or not the `columns` parameter
    could be converted into a MultiIndex.

    Parameters
    ----------
    columns : array-like
        Object which may or may not be convertible into a MultiIndex
    index_col : None, bool or list, optional
        Column or columns to use as the (possibly hierarchical) index

    Returns
    -------
    bool : Whether or not columns could become a MultiIndex
    Nc                 3  s&    | ]}|t  vrt|tV  qd S rR   )r[   rK   r   )rm   crT  rB   rC   ro     s   $ z+is_potential_multi_index.<locals>.<genexpr>)rK   r;   r   r/   rr   )rR  rT  rB   rW  rC   is_potential_multi_index  s   
rX  namesSequence[Hashable]is_potential_multiindexc                 C  s   t | } tt}t| D ]E\}}|| }|dkrG|d ||< |r8t|ts'J |dd |d  d| f }n| d| }|| }|dks|| |< |d ||< q| S )a:  
    Rename column names if duplicates exist.

    Currently the renaming is done by appending a period and an autonumeric,
    but a custom pattern may be supported in the future.

    Examples
    --------
    >>> dedup_names(["x", "y", "x", "x"], is_potential_multiindex=False)
    ['x', 'y', 'x.1', 'x.2']
    r   r   Nr9  .)r[   r   rp   	enumeraterK   r   )rY  r[  countsrn   col	cur_countrB   rB   rC   dedup_names  s   "ra  )r\   r]   rI   r;   )r6   r7   rI   r7   )r6   r2   rI   r2   )r6   rg   rI   rg   )rk   r]   rI   rJ   ).)r6   r!   rw   r;   rI   r7   )r6   r2   rw   r;   rI   r2   )F)r6   rz   rw   r;   rI   rg   )r\   r   rI   r;   )r   Nr   N)r6   r   r8   r7   r:   r    r9   r7   r   r$   rI   r4   )ri   r7   rI   r7   )r:   r    rI   r   )r6   r   r:   r   rI   r   )ri   r   rI   rJ   )r   r   r9   r7   r8   r   r:   r    r   r;   r   r   r   r   r   r$   rI   r   )r   r   r9   r7   r8   r   r:   r    r   r;   r   r   r   r   r   r$   rI   r   )r   r   r9   r7   r8   r   r:   r    r   r;   r   r;   r   r   r   r$   rI   r   )rE   r5   r   r;   rI   r@  )r6   r   rI   r;   )rE   r   r9   r7   rI   r;   )rI   rN  rR   )rR  rS  rT  rU  rI   r;   )rY  rZ  r[  r;   rI   rZ  )pr@   
__future__r   abcr   r   r   collectionsr   rY   	functoolsr   ior   r   r   r	   r
   r   r   rh   pathlibr   rer  typingr   r   r   r   r   r   r   r   r   r   r   r   urllib.parser   r   r^   r   r   r   r   r+  pandas._typingr   r   r    r!   r"   r#   r$   r%   pandas.compatr&   pandas.compat._optionalr'   pandas.compat.compressorsr(   r   pandas.util._decoratorsr)   pandas.util._exceptionsr*   pandas.core.dtypes.commonr+   r,   r-   r.   pandas.core.indexes.apir/   pandas.core.shared_docsr0   setr`   discardcompiler   r2   	dataclassr4   rD   rb   re   rv   ry   r   r   r   r   r   valuesr   r   r   r   r   r  r  r   r  r  r   rG  r   	lru_cacherL  rX  ra  rB   rB   rB   rC   <module>   s     8(



,

"


 
3
#
6  7$

"
