ik ddlmZddlmZmZddlmZddlmZddl m Z ddl m Z ddl mZddlmZerdd lmZdd lmZdd lmZdd lmZe d ddejfddZdS)) annotations) TYPE_CHECKINGAny)lib)import_optional_dependency) set_module)check_dtype_backend) is_list_like)stringify_path)Sequence)Path) DtypeBackend) DataFramepandasNTpath str | PathusecolsSequence[str] | Noneconvert_categoricalsbool dtype_backendDtypeBackend | lib.NoDefaultkwargsrreturnrc Btd}t||-t|stdt |}|jt |f||d|\}}|j|_|tj ur| |}|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'} Back-end data type applied to the resultant :class:`DataFrame` (still experimental). If not specified, the default behavior is to not use nullable data types. If specified, the behavior is as follows: * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame` * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype` :class:`DataFrame` .. versionadded:: 2.0 **kwargs Additional keyword arguments that can be passed to :func:`pyreadstat.read_sav`. .. versionadded:: 3.0 Returns ------- DataFrame DataFrame based on the SPSS file. See Also -------- read_csv : Read a comma-separated values (csv) file into a pandas DataFrame. read_excel : Read an Excel file into a pandas DataFrame. read_sas : Read an SAS file into a pandas DataFrame. read_orc : Load an ORC object into a pandas DataFrame. read_feather : Load a feather-format object into a pandas DataFrame. Examples -------- >>> df = pd.read_spss("spss_data.sav") # doctest: +SKIP pyreadstatNzusecols must be list-like.)rapply_value_formats)r) rr r TypeErrorlistread_savr __dict__attrsr no_defaultconvert_dtypes)rrrrrrdfmetadatas r6sK"""""" >>>>>>......777777555555++++++!((((((++++++       H%)!%25. DDDDDDDr)