
    rik                        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
 d dlmZ d dlmZ d dlmZ erd d	lmZ d d
lmZ d dlmZ d dlmZ  e
d          ddej        fdd            ZdS )    )annotations)TYPE_CHECKINGAny)lib)import_optional_dependency)
set_module)check_dtype_backend)is_list_like)stringify_path)Sequence)Path)DtypeBackend)	DataFramepandasNTpath
str | PathusecolsSequence[str] | Noneconvert_categoricalsbooldtype_backendDtypeBackend | lib.NoDefaultkwargsr   returnr   c                B   t          d          }t          |           |-t          |          st          d          t	          |          } |j        t          |           f||d|\  }}|j        |_        |t          j
        ur|                    |          }|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
    
pyreadstatNzusecols must be list-like.)r   apply_value_formats)r   )r   r	   r
   	TypeErrorlistread_savr   __dict__attrsr   
no_defaultconvert_dtypes)r   r   r   r   r   r   dfmetadatas           d/var/www/html/pippo.cuttalo.com/services/trading/venv/lib/python3.11/site-packages/pandas/io/spss.py	read_spssr(      s    h ,L99J&&&G$$ 	:8999w--&:&t0  	 LB  BHCN**];;I    )r   r   r   r   r   r   r   r   r   r   r   r   )
__future__r   typingr   r   pandas._libsr   pandas.compat._optionalr   pandas.util._decoratorsr   pandas.util._validatorsr	   pandas.core.dtypes.inferencer
   pandas.io.commonr   collections.abcr   pathlibr   pandas._typingr   r   r   r#   r(    r)   r'   <module>r6      sK   " " " " " "       
       > > > > > > . . . . . . 7 7 7 7 7 7 5 5 5 5 5 5 + + + + + + !((((((++++++       H %)!%25.	D D D D D D Dr)   