ó
    Ñ]j.  ã                  ó®  • S r SSKJr  SSKJrJr  SSKJr  SSKJ	r	J
r
Jr  SSKJr  SSKJr  \	(       a  SSKJr  SS	KJr  SS
KJrJrJr  SSKJr  \" S5       " S S\S   \5      5       r\SSSSSSS.               SS jj5       r\SSSSSSS.               SS jj5       r\" S5      SSSSSSS.               SS jj5       rg)z#
Read SAS sas7bdat or xport files.
é    )Úannotations)ÚABCÚabstractmethod)ÚIterator)ÚTYPE_CHECKINGÚSelfÚoverload)Ú
set_module)Ústringify_path)ÚHashable)ÚTracebackType)ÚCompressionOptionsÚFilePathÚ
ReadBuffer)Ú	DataFramezpandas.api.typingc                  óh   • \ rS rSrSr\S	S
S jj5       r\SS j5       rSS jr        SS jr	Sr
g)Ú	SASReaderé#   z4
Abstract class for XportReader and SAS7BDATReader.
Nc                ó   • g ©N© )ÚselfÚnrowss     ÚT/home/mande/repo/quber/.venv/lib/python3.13/site-packages/pandas/io/sas/sasreader.pyÚreadÚSASReader.read)   s   € Ø;>ó    c                ó   • g r   r   ©r   s    r   ÚcloseÚSASReader.close,   s   € Ø r   c                ó   • U $ r   r   r   s    r   Ú	__enter__ÚSASReader.__enter__/   s   € Øˆr   c                ó$   • U R                  5         g r   )r    )r   Úexc_typeÚ	exc_valueÚ	tracebacks       r   Ú__exit__ÚSASReader.__exit__2   s   € ð 	�
‰
�r   r   r   )r   ú
int | NoneÚreturnr   )r,   ÚNone)r,   r   )r&   ztype[BaseException] | Noner'   zBaseException | Noner(   zTracebackType | Noner,   r-   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   r    r#   r)   Ú__static_attributes__r   r   r   r   r   #   sU   † ñð Ý>ó Ø>àÛ ó Ø ôðà,ðð (ðð (ð	ð
 
÷r   r   r   .)ÚformatÚindexÚencodingÚ	chunksizeÚiteratorÚcompressionc               ó   • g r   r   ©Úfilepath_or_bufferr4   r5   r6   r7   r8   r9   s          r   Úread_sasr=   ;   s   € ð r   c               ó   • g r   r   r;   s          r   r=   r=   H   s   € ð  r   ÚpandasNFÚinferc               óè  • Uc^  Sn[        U 5      n [        U [        5      (       d  [        U5      eU R	                  5       nSU;   a  SnOSU;   a  SnO[        SU< 35      eUR	                  5       S:X  a  SS	KJn	  U	" U UUUUS
9n
O0UR	                  5       S:X  a  SSKJn  U" U UUUUS
9n
O[        S5      eU(       d  U(       a  U
$ U
   U
R                  5       sSSS5        $ ! , (       d  f       g= f)aÚ	  
Read SAS files stored as either XPORT or SAS7BDAT format files.

Parameters
----------
filepath_or_buffer : str, path object, or file-like object
    String, path object (implementing ``os.PathLike[str]``), or file-like
    object implementing a binary ``read()`` function. The string could be
    a URL. Valid URL schemes include http, ftp, s3, and file. For file
    URLs, a host is expected. A local file could be:
    ``file://localhost/path/to/table.sas7bdat``.
format : str {'xport', 'sas7bdat'} or None
    If None, file format is inferred from file extension. If 'xport' or
    'sas7bdat', uses the corresponding format.
index : identifier of index column, defaults to None
    Identifier of column that should be used as index of the DataFrame.
encoding : str, default is None
    Encoding for text data.  If None, text data are stored as raw bytes.
chunksize : int
    Read file `chunksize` lines at a time, returns iterator.
iterator : bool, defaults to False
    If True, returns an iterator for reading the file incrementally.
compression : str or dict, default 'infer'
    For on-the-fly decompression of on-disk data. If 'infer' and
    'filepath_or_buffer' is path-like, then detect compression from the
    following extensions: '.gz', '.bz2', '.zip', '.xz', '.zst', '.tar',
    '.tar.gz', '.tar.xz' or '.tar.bz2' (otherwise no compression).
    Set to ``None`` for no decompression.
    Can also be a dict with key ``'method'`` set to one of {``'zip'``,
    ``'gzip'``, ``'bz2'``, ``'zstd'``, ``'xz'``, ``'tar'``} and other
    key-value pairs are forwarded to ``zipfile.ZipFile``,
    ``gzip.GzipFile``, ``bz2.BZ2File``, ``zstandard.ZstdCompressor``,
    ``lzma.LZMAFile`` or ``tarfile.TarFile``, respectively.
    As an example, the following could be passed for faster compression
    and to create a reproducible gzip archive:
    ``compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1}``.

Returns
-------
DataFrame, SAS7BDATReader, or XportReader
    DataFrame if iterator=False and chunksize=None, else SAS7BDATReader
    or XportReader, file format is inferred from file extension.

See Also
--------
read_csv : Read a comma-separated values (csv) file into a DataFrame.
read_excel : Read an Excel file into a pandas DataFrame.
read_spss : Read an SPSS file into a pandas DataFrame.
read_orc : Load an ORC object into a pandas DataFrame.
read_feather : Load a feather-format object into a pandas DataFrame.

Examples
--------
>>> df = pd.read_sas("sas_data.sas7bdat")  # doctest: +SKIP
NzVIf this is a buffer object rather than a string name, you must specify a format stringz.xptÚxportz	.sas7bdatÚsas7bdatz2unable to infer format of SAS file from filename: r   )ÚXportReader)r5   r6   r7   r9   )ÚSAS7BDATReaderzunknown SAS format)
r   Ú
isinstanceÚstrÚ
ValueErrorÚlowerÚpandas.io.sas.sas_xportrD   Úpandas.io.sas.sas7bdatrE   r   )r<   r4   r5   r6   r7   r8   r9   Úbuffer_error_msgÚfnamerD   ÚreaderrE   s               r   r=   r=   U   s  € ðD �~ðCð 	ô ,Ð,>Ó?ÐÜÐ,¬c×2Ñ2ÜÐ-Ó.Ð.Ø"×(Ñ(Ó*ˆØ�U‹?Ø‰FØ˜EÓ!Ø‰FäØDÀUÁIÐNóð ð
 ‡|�|ƒ~˜Ó Ý7áØØØØØ#ñ
‰ð 
�‰‹˜:Ó	%Ý9áØØØØØ#ñ
‰ô Ð-Ó.Ð.æ–9Øˆâ	Ø�{‰{‹}÷ 
��ús   Ã	C#Ã#
C1)r<   úFilePath | ReadBuffer[bytes]r4   ú
str | Noner5   úHashable | Noner6   rP   r7   Úintr8   Úboolr9   r   r,   r   )r<   rO   r4   rP   r5   rQ   r6   rP   r7   r-   r8   rS   r9   r   r,   úDataFrame | SASReader)r<   rO   r4   rP   r5   rQ   r6   rP   r7   r+   r8   rS   r9   r   r,   rT   )r2   Ú
__future__r   Úabcr   r   Úcollections.abcr   Útypingr   r   r	   Úpandas.util._decoratorsr
   Úpandas.io.commonr   r   Útypesr   Úpandas._typingr   r   r   r?   r   r   r=   r   r   r   Ú<module>r]      sÜ  ðñõ #÷õ %÷ñ õ /å +æÝ(Ý#÷ñ õ !ñ ÐÓ ô�˜Ñ% só ó !ðð. 
ð Ø ØØØØ&)ñ	Ø4ð	ð ð	ð ð		ð
 ð	ð ð	ð ð	ð $ð	ð ô	ó 
ð	ð 
ð Ø ØØØØ&)ñ	 Ø4ð	 ð ð	 ð ð		 ð
 ð	 ð ð	 ð ð	 ð $ð	 ð ô	 ó 
ð	 ñ ˆHÓð Ø!ØØ ØØ&-ñoØ4ðoð ðoð ð	oð
 ðoð ðoð ðoð $ðoð ôoó ñor   