§
    q-PhÀ  ã                  óš   — U d dl mZ d dlmZmZ d dlmZ erd dlmZ d dl	m
Z
 ed         Zded<   ed	         Zded
<    G d„ d¦  «        ZdS )é    )Úannotations)ÚTYPE_CHECKINGÚLiteral)Úissue_unstable_warning)Ú
Collection)Ú	TypeAlias)ÚupcastÚdowncastr   ÚFloatCastOption)znanosecond-downcastzconvert-timezoneÚDatetimeCastOptionc                  óB   — e Zd ZdZdddddddœdd„Zedd„¦   «         ZdS )ÚScanCastOptionsz-Options for type-casting when scanning files.ÚforbidÚraiseF)Úinteger_castÚ
float_castÚdatetime_castÚmissing_struct_fieldsÚextra_struct_fieldsÚ_internal_callr   úLiteral['upcast', 'forbid']r   úALiteral['forbid'] | FloatCastOption | Collection[FloatCastOption]r   úGLiteral['forbid'] | DatetimeCastOption | Collection[DatetimeCastOption]r   úLiteral['insert', 'raise']r   úLiteral['ignore', 'raise']r   ÚboolÚreturnÚNonec               ón   — |st          d¦  «         || _        || _        || _        || _        || _        dS )aŒ  
        Configuration for type-casting of columns when reading files.

        This can be useful for scanning datasets with schemas that have been
        modified. This configuration object is generally passed to a supported
        `scan_*` function via the `cast_options` parameter.

        .. warning::
                This functionality is considered **unstable**. It may be changed
                at any point without it being considered a breaking change.

        Parameters
        ----------
        integer_cast
            Configuration for casting from integer types:

            * `upcast`: Allow lossless casting to wider integer types.
            * `forbid`: Raises an error if dtypes do not match.

        float_cast
            Configuration for casting from float types:

            * `upcast`: Allow casting to higher precision float types.
            * `downcast`: Allow casting to lower precision float types.
            * `forbid`: Raises an error if dtypes do not match.

        datetime_cast
            Configuration for casting from datetime types:

            * `nanosecond-downcast`: Allow nanosecond precision datetime to be             downcasted to any lower precision. This has a similar effect to             PyArrow's `coerce_int96_timestamp_unit`.
            * `convert-timezone`: Allow casting to a different timezone.
            * `forbid`: Raises an error if dtypes do not match.

        missing_struct_fields
            Configuration for behavior when struct fields defined in the schema
            are missing from the data:

            * `insert`: Inserts the missing fields.
            * `raise`: Raises an error.

        extra_struct_fields
            Configuration for behavior when extra struct fields outside of the
            defined schema are encountered in the data:

            * `ignore`: Silently ignores.
            * `raise`: Raises an error.

        z'ScanCastOptions is considered unstable.N)r   r   r   r   r   r   )Úselfr   r   r   r   r   r   s          úV/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/polars/io/cast_options.pyÚ__init__zScanCastOptions.__init__   sJ   € ð@ ð 	NÝ"Ð#LÑMÔMÐMà(ˆÔØ$ˆŒØ*ˆÔØ%:ˆÔ"Ø#6ˆÔ Ð Ð ó    c                 ó"   — t          d¬¦  «        S )NT)r   )r   © r#   r!   Ú_defaultzScanCastOptions._default_   s   € å¨dÐ3Ñ3Ô3Ð3r#   N)r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r"   Ústaticmethodr&   r%   r#   r!   r   r      sw   € € € € € Ø7Ð7ð
 5=ð )1ð ,4Ø<CØ:AØ$ðG7ð G7ð G7ð G7ð G7ð G7ðV ð4ð 4ð 4ñ „\ð4ð 4ð 4r#   r   N)Ú
__future__r   Útypingr   r   Úpolars._utils.unstabler   Úcollections.abcr   Útyping_extensionsr   r   Ú__annotations__r   r   r%   r#   r!   ú<module>r2      sÝ   ðØ "Ð "Ð "Ð "Ð "Ð "Ð "à )Ð )Ð )Ð )Ð )Ð )Ð )Ð )à 9Ð 9Ð 9Ð 9Ð 9Ð 9àð ,Ø*Ð*Ð*Ð*Ð*Ð*à+Ð+Ð+Ð+Ð+Ð+ð %Ð%9Ô:€Ð :Ð :Ð :Ñ :Ø 'Ð(QÔ RÐ Ð RÐ RÐ RÑ RðP4ð P4ð P4ð P4ð P4ñ P4ô P4ð P4ð P4ð P4r#   