U
    -e                     @  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rd 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   O/var/www/html/Darija-Ai-Train/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   