U
    ¾mœdõ  ã                   @  s¤   d dl mZ d dlmZ d dlmZ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 er€d d	lmZ d d
lmZ ddejfddddddœdd„ZdS )é    )Úannotations)ÚPath)ÚTYPE_CHECKINGÚSequence)Úlib)Úimport_optional_dependency)Úcheck_dtype_backend)Úis_list_like)Ústringify_path)ÚDtypeBackend)Ú	DataFrameNTz
str | PathzSequence[str] | NoneÚboolzDtypeBackend | lib.NoDefaultr   )ÚpathÚusecolsÚconvert_categoricalsÚdtype_backendÚreturnc                 C  sb   t dƒ}t|ƒ |dk	r0t|ƒs(tdƒ‚t|ƒ}|jt| ƒ||d�\}}|tjk	r^|j	|d�}|S )a?  
    Load an SPSS file from the file path, returning a DataFrame.

    Parameters
    ----------
    path : str or Path
        File path.
    usecols : list-like, optional
        Return a subset of the columns. If None, return all columns.
    convert_categoricals : bool, default is True
        Convert categorical columns into pd.Categorical.
    dtype_backend : {"numpy_nullable", "pyarrow"}, defaults to NumPy backed DataFrames
        Which dtype_backend to use, e.g. whether a DataFrame should have NumPy
        arrays, nullable dtypes are used for all dtypes that have a nullable
        implementation when "numpy_nullable" is set, pyarrow is used for all
        dtypes if "pyarrow" is set.

        The dtype_backends are still experimential.

        .. versionadded:: 2.0

    Returns
    -------
    DataFrame
    Ú
pyreadstatNzusecols must be list-like.)r   Zapply_value_formats)r   )
r   r   r	   Ú	TypeErrorÚlistZread_savr
   r   Ú
no_defaultZconvert_dtypes)r   r   r   r   r   ZdfÚ_© r   úG/home/sam/Atlas/atlas_env/lib/python3.8/site-packages/pandas/io/spss.pyÚ	read_spss   s      ÿ

r   )Ú
__future__r   Úpathlibr   Útypingr   r   Zpandas._libsr   Zpandas.compat._optionalr   Zpandas.util._validatorsr   Zpandas.core.dtypes.inferencer	   Zpandas.io.commonr
   Zpandas._typingr   Zpandasr   r   r   r   r   r   r   Ú<module>   s   ü