3
®ybç  ã               @   sz   d dl mZ d dlmZ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eeef eee  eed	œd
d„ZdS )é    )ÚPath)ÚOptionalÚSequenceÚUnion)Úimport_optional_dependency)Úis_list_like)Ú	DataFrame)Ústringify_pathNT)Ú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   ú2/tmp/pip-install-4cy230dp/pandas/pandas/io/spss.pyÚ	read_spss   s    
r   )NT)Zpathlibr   Útypingr   r   r   Zpandas.compat._optionalr   Zpandas.core.dtypes.inferencer   Zpandas.core.apir   Zpandas.io.commonr	   ÚstrÚboolr   r   r   r   r   Ú<module>   s    