HOME


sh-3ll 1.0
DIR:/opt/cloudlinux/venv/lib64/python3.11/site-packages/pandas/io/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/pandas/io/__pycache__/spss.cpython-311.pyc
�

���h����ddlmZddlmZddlmZddlmZddlm	Z	ddl
mZddlm
Z
erddlmZdd	lmZdd
lmZddlmZdd
ejfdd�ZdS)�)�annotations)�
TYPE_CHECKING)�lib)�import_optional_dependency)�check_dtype_backend)�is_list_like)�stringify_path)�Sequence)�Path)�DtypeBackend)�	DataFrameNT�path�
str | Path�usecols�Sequence[str] | None�convert_categoricals�bool�
dtype_backend�DtypeBackend | lib.NoDefault�returnr
c�P�td��}t|��|�-t|��std���t	|��}|�t
|��||���\}}|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'}, default 'numpy_nullable'
        Back-end data type applied to the resultant :class:`DataFrame`
        (still experimental). Behaviour is as follows:

        * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
          (default).
        * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
          DataFrame.

        .. versionadded:: 2.0

    Returns
    -------
    DataFrame

    Examples
    --------
    >>> df = pd.read_spss("spss_data.sav")  # doctest: +SKIP
    �
pyreadstatNzusecols must be list-like.)r�apply_value_formats)r)rrr�	TypeError�list�read_savr	�__dict__�attrsr�
no_default�convert_dtypes)rrrrr�df�metadatas       �E/opt/cloudlinux/venv/lib64/python3.11/site-packages/pandas/io/spss.py�	read_spssr$s���H,�L�9�9�J��
�&�&�&����G�$�$�	:��8�9�9�9��w�-�-���&�&��t���g�CW�'���L�B��� �B�H��C�N�*�*�
�
�
�]�
�
;�
;��
�I�)
rrrrrrrrrr
)�
__future__r�typingr�pandas._libsr�pandas.compat._optionalr�pandas.util._validatorsr�pandas.core.dtypes.inferencer�pandas.io.commonr	�collections.abcr
�pathlibr�pandas._typingr�pandasr
rr$�r%r#�<module>r2s��"�"�"�"�"�"� � � � � � �������>�>�>�>�>�>�7�7�7�7�7�7�5�5�5�5�5�5�+�+�+�+�+�+��!�(�(�(�(�(�(�������+�+�+�+�+�+� � � � � � �
%)�!%�25�.�	2�2�2�2�2�2�2r%