U
    ÎZj  ã                   @  sv   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 er\d dlmZ dd
ddddœdd„ZdS )é    )Úannotations)ÚPath)ÚTYPE_CHECKINGÚSequence)Úimport_optional_dependency)Úis_list_like)Ústringify_path)Ú	DataFrameNTz
str | PathzSequence[str] | NoneÚboolr	   )ÚpathÚusecolsÚconvert_categoricalsÚreturnc                 C  sF   t dƒ}|dk	r*t|ƒs"tdƒ‚nt|ƒ}|jt| ƒ||d�\}}|S )a¥  
    Load an SPSS file from the file path, returning a DataFrame.

    .. versionadded:: 0.25.0

    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.

    Returns
    -------
    DataFrame
    Ú
pyreadstatNzusecols must be list-like.)r   Zapply_value_formats)r   r   Ú	TypeErrorÚlistZread_savr   )r   r   r   r   ZdfÚ_© r   úQ/var/www/html/TRUCKING_PROJECT/venv/lib/python3.8/site-packages/pandas/io/spss.pyÚ	read_spss   s    
  ÿ
r   )NT)Ú
__future__r   Úpathlibr   Útypingr   r   Zpandas.compat._optionalr   Zpandas.core.dtypes.inferencer   Zpandas.io.commonr   Zpandasr	   r   r   r   r   r   Ú<module>   s     ý