3
Êb_­  ã               @   sn   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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)Ú	DataFrameNT)ÚpathÚusecolsÚconvert_categoricalsÚreturnc             C   sB   t dƒ}|dk	r*t|ƒs"tdƒ‚nt|ƒ}|j| ||d�\}}|S )a¨  
    Load an SPSS file from the file path, returning a DataFrame.

    .. versionadded:: 0.25.0

    Parameters
    ----------
    path : string 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_sav)r	   r
   r   r   ZdfÚ_© r   ú0/tmp/pip-build-jkwsxyiy/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   ÚstrÚboolr   r   r   r   r   Ú<module>   s    