
    q-Ph!                        	 d dl mZmZmZmZmZmZmZmZm	Z	m
Z
mZmZmZmZmZmZmZmZmZ n# e$ r  G d de          Z G d de          Z G d de          Z G d d	e          Z G d
 de          Z G d de          Z G d de          Z G d de          Z	 G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d  d!e          Z G d" d#e          Z
 G d$ d%e
          Z G d& d'e          ZY nw xY w G d( d)e          Z G d* d+e          Z G d, d-e          Z G d. d/e          Z G d0 d1e          Z G d2 d3e          Z G d4 d5e          Z G d6 d7e          Z G d8 d9e          Z G d: d;e
          Z  G d< d=e          Z!g d>Z"d?S )@    )CategoricalRemappingWarningColumnNotFoundErrorComputeErrorDuplicateErrorInvalidOperationErrorMapWithoutReturnDtypeWarningNoDataErrorOutOfBoundsErrorPanicExceptionPerformanceWarningPolarsErrorPolarsWarningSchemaErrorSchemaFieldNotFoundError
ShapeErrorSQLInterfaceErrorSQLSyntaxErrorStringCacheMismatchErrorStructFieldNotFoundErrorc                       e Zd ZdZdS )r   z!Base class for all Polars errors.N__name__
__module____qualname____doc__     Q/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/polars/exceptions.pyr   r      s        ////r   r   c                       e Zd ZdZdS )r   z
        Exception raised when a specified column is not found.

        Examples
        --------
        >>> df = pl.DataFrame({"a": [1, 2, 3]})
        >>> df.select("b")
        polars.exceptions.ColumnNotFoundError: b
        Nr   r   r   r   r   r              	 	 	 	r   r   c                       e Zd ZdZdS )r   zIException raised when Polars could not perform an underlying computation.Nr   r   r   r   r   r   (           WWWWr   r   c                       e Zd ZdZdS )r   a)  
        Exception raised when a column name is duplicated.

        Examples
        --------
        >>> df = pl.DataFrame({"a": [1, 1, 1]})
        >>> pl.concat([df, df], how="horizontal")
        polars.exceptions.DuplicateError: unable to hstack, column with name "a" already exists
        Nr   r   r   r   r   r   +   r    r   r   c                       e Zd ZdZdS )r   aN  
        Exception raised when an operation is not allowed (or possible) against a given object or data structure.

        Examples
        --------
        >>> s = pl.Series("a", [1, 2, 3])
        >>> s.is_in(["x", "y"])
        polars.exceptions.InvalidOperationError: `is_in` cannot check for String values in Int64 data
        Nr   r   r   r   r   r   6   r    r   r   c                       e Zd ZdZdS )r	   zRException raised when an operation cannot be performed on an empty data structure.Nr   r   r   r   r	   r	   A   s        ````r   r	   c                       e Zd ZdZdS )r
   z7Exception raised when the given index is out of bounds.Nr   r   r   r   r
   r
   D   s        EEEEr   r
   c                       e Zd ZdZdS )r   zXException raised when an unexpected state causes a panic in the underlying Rust library.Nr   r   r   r   r   r   G   s        ffffr   r   c                       e Zd ZdZdS )r   zDException raised when an unexpected schema mismatch causes an error.Nr   r   r   r   r   r   J   s        RRRRr   r   c                       e Zd ZdZdS )r   z<Exception raised when a specified schema field is not found.Nr   r   r   r   r   r   M           JJJJr   r   c                       e Zd ZdZdS )r   z_Exception raised when trying to perform operations on data structures with incompatible shapes.Nr   r   r   r   r   r   P   s        mmmmr   r   c                       e Zd ZdZdS )r   z;Exception raised when an error occurs in the SQL interface.Nr   r   r   r   r   r   S   s        IIIIr   r   c                       e Zd ZdZdS )r   zIException raised from the SQL interface when encountering invalid syntax.Nr   r   r   r   r   r   V   r"   r   r   c                       e Zd ZdZdS )r   z@Exception raised when string caches come from different sources.Nr   r   r   r   r   r   Y   s        NNNNr   r   c                       e Zd ZdZdS )r   z<Exception raised when a specified Struct field is not found.Nr   r   r   r   r   r   \   r*   r   r   c                       e Zd ZdZdS )r   z#Base class for all Polars warnings.Nr   r   r   r   r   r   _   s        1111r   r   c                       e Zd ZdZdS )r   z:Warning issued to indicate potential performance pitfalls.Nr   r   r   r   r   r   b   s        HHHHr   r   c                       e Zd ZdZdS )r   zaWarning issued when a categorical needs to be remapped to be compatible with another categorical.Nr   r   r   r   r   r   e   s        oooor   r   c                       e Zd ZdZdS )r   zTWarning issued when `map_elements` is performed without specifying the return dtype.Nr   r   r   r   r   r   h   s        bbbbr   r   c                       e Zd ZdZdS )	RowsErrorzMException raised when the number of returned rows does not match expectation.Nr   r   r   r   r5   r5   l           WWWWr   r5   c                       e Zd ZdZdS )NoRowsReturnedErrorzMException raised when no rows are returned, but at least one row is expected.Nr   r   r   r   r8   r8   p   r6   r   r8   c                       e Zd ZdZdS )TooManyRowsReturnedErrorz;Exception raised when more rows than expected are returned.Nr   r   r   r   r:   r:   t   s        EEEEr   r:   c                       e Zd ZdZdS )ModuleUpgradeRequiredErrorzEException raised when a module is installed but needs to be upgraded.Nr   r   r   r   r<   r<   x   s        OOOOr   r<   c                       e Zd ZdZdS )ParameterCollisionErrorz?Exception raised when the same parameter occurs multiple times.Nr   r   r   r   r>   r>   |   s        IIIIr   r>   c                       e Zd ZdZdS )UnsuitableSQLErrorzCException raised when unsuitable SQL is given to a database method.Nr   r   r   r   r@   r@      s        MMMMr   r@   c                       e Zd ZdZdS )ChronoFormatWarninga  
    Warning issued when a chrono format string contains dubious patterns.

    Polars uses Rust's chrono crate to convert between string data and temporal data.
    The patterns used by chrono differ slightly from Python's built-in datetime module.
    Refer to the `chrono strftime documentation
    <https://docs.rs/chrono/latest/chrono/format/strftime/index.html>`_ for the full
    specification.
    Nr   r   r   r   rB   rB      s           r   rB   c                       e Zd ZdZdS )CustomUFuncWarningzQWarning issued when a custom ufunc is handled differently than numpy ufunc would.Nr   r   r   r   rD   rD      s        [[[[r   rD   c                       e Zd ZdZdS )DataOrientationWarningu7  
    Warning issued to indicate row orientation was inferred from the inputs.

    Occurs when constructing a DataFrame from a list of rows without explicitly
    specifying row orientation. Polars is usually able to infer the data orientation
    from the data and schema, but there are cases where this is not possible. This is a
    common source of confusion. Use the `orient` parameter to be explicit about the
    data orientation.

    Examples
    --------
    >>> pl.DataFrame([(1, 2, 3), (4, 5, 6)], schema=["a", "b", "c"])  # doctest: +SKIP
    DataOrientationWarning: Row orientation inferred during DataFrame construction.
    Explicitly specify the orientation by passing `orient="row"` to silence this warning.
    shape: (2, 3)
    ┌─────┬─────┬─────┐
    │ a   ┆ b   ┆ c   │
    │ --- ┆ --- ┆ --- │
    │ i64 ┆ i64 ┆ i64 │
    ╞═════╪═════╪═════╡
    │ 1   ┆ 2   ┆ 3   │
    │ 4   ┆ 5   ┆ 6   │
    └─────┴─────┴─────┘

    Pass `orient="row"` to silence the warning.

    >>> pl.DataFrame([[1, 2, 3], [4, 5, 6]], schema=["a", "b", "c"], orient="row")
    shape: (2, 3)
    ┌─────┬─────┬─────┐
    │ a   ┆ b   ┆ c   │
    │ --- ┆ --- ┆ --- │
    │ i64 ┆ i64 ┆ i64 │
    ╞═════╪═════╪═════╡
    │ 1   ┆ 2   ┆ 3   │
    │ 4   ┆ 5   ┆ 6   │
    └─────┴─────┴─────┘
    Nr   r   r   r   rF   rF      s        $ $ $ $r   rF   c                       e Zd ZdZdS )PolarsInefficientMapWarningzFWarning issued when a potentially slow `map_*` operation is performed.Nr   r   r   r   rH   rH      s        PPPPr   rH   c                       e Zd ZdZdS )UnstableWarningz3Warning issued when unstable functionality is used.Nr   r   r   r   rJ   rJ      s        ====r   rJ   )r   r   r   r   r   r<   r	   r8   r
   r>   r5   r   r   r   r   r   r   r   r:   r@   r   r   rB   rD   rF   r   r   rH   rJ   r   N)#polars.polarsr   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   ImportError	Exceptionr5   r8   r:   ModuleNotFoundErrorr<   r>   r@   rB   rD   rF   rH   rJ   __all__r   r   r   <module>rP      s  hc                                          *  Rc Rc Rc0 0 0 0 0i 0 0 0	 	 	 	 	k 	 	 	X X X X X{ X X X	 	 	 	 	 	 	 		 	 	 	 	 	 	 	a a a a ak a a aF F F F F; F F Fg g g g g g g gS S S S Sk S S SK K K K K; K K Kn n n n n[ n n nJ J J J JK J J JX X X X X X X XO O O O O; O O OK K K K K; K K K2 2 2 2 2	 2 2 2I I I I I] I I Ip p p p p&8 p p pc c c c c} c c c c ccRcjX X X X X X X XX X X X X) X X XF F F F Fy F F FP P P P P!4 P P PJ J J J Jk J J JN N N N N N N N	 	 	 	 	- 	 	 	\ \ \ \ \ \ \ \% % % % %] % % %PQ Q Q Q Q"4 Q Q Q> > > > >m > > >" " "s   *. DE E