B []@snddlmZddlmZmZmZddlmZddlm Z ddl m Z d ee efeee e e dd d ZdS) )Path)OptionalSequenceUnion)import_optional_dependency) is_list_like) DataFrameNT)pathusecolsconvert_categoricalsreturncCsBtd}|dk r*t|s"tdnt|}|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 pyreadstatNzusecols must be list-like.)r Zapply_value_formats)rr TypeErrorlistZread_sav)r r r r Zdf_r2/tmp/pip-install-svzetoqp/pandas/pandas/io/spss.py read_spss s r)NT)ZpathlibrtypingrrrZpandas.compat._optionalrZpandas.api.typesrZpandas.core.apirstrboolrrrrrs