o
    $&]i                     @  s  d dl mZ d dlmZ d dlmZ d dlmZmZm	Z	m
Z
mZmZ d dlmZmZmZmZmZmZ d dlmZ d dlmZ 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# d d	l$m%Z%m&Z&m'Z'm(Z( d d
l)m*Z*m+Z+ d dl,m-Z- erd dl.m/Z/ d dl0m1Z1m2Z2 d dlmZm3Z3 d dl4m5Z5 d dlmZm6Z6m7Z7 d dl8m9Z9 d dl:m;Z; d dl$m<Z<m=Z=m>Z> d dl?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZG g dZHG dd deZIG dd deeeef ZJG dd deJeef eeef ZKG dd deKeef eeef ZLG dd deLee!f eee!f ZMG d d! d!eKee#f eee#f ZNG d"d# d#e%e ee ZOG d$d% d%eOe  e
e  ZPG d&d' d'eOe" e
e" ZQG d(d) d)ePe  ee  e
e  ZRG d*d+ d+ePe  ee  e
e  ZSG d,d- d-ePe  ee  e
e  ZTG d.d/ d/eOe ee ee ZUG d0d1 d1ePe  eUe  e
e  ZVG d2d3 d3eQe" eUe" e
e" ZWG d4d5 d5ePe  ee  e
e  ZXG d6d7 d7ePe  ee  e
e  ZYd8S )9    )annotations)partial)methodcaller)TYPE_CHECKINGAnyCallableGenericLiteralProtocol)CatNamespaceDateTimeNamespaceListNamespaceNameNamespaceStringNamespaceStructNamespace)CompliantColumn)CompliantNamespace)	AliasName
AliasNamesCompliantExprT_coCompliantFrameTCompliantLazyFrameTCompliantSeriesOrNativeExprT_coEagerDataFrameT
EagerExprTEagerSeriesT	LazyExprTNativeExprT)_StoresCompliantnot_implementedqualified_type_name
zip_strict)is_numpy_arrayis_numpy_scalar)MultiOutputExpressionError)Sequence)SelfTypeIs)r   EagerNamespace)CompliantSeries)r   	EvalNames
EvalSeries)ExprMetadata)	NoDefault)ImplementationVersion_LimitedContext)ClosedIntervalFillNullStrategy	IntoDTypeModeKeepStrategyNonNestedLiteral
RankMethodRollingInterpolationMethodTimeUnit)CompliantExprDepthTrackingExpr	EagerExprLazyExpr
NativeExprc                   @  sV   e Zd ZdZdddZdd
dZdddZdddZdddZdddZ	dddZ
dS )r=   a	  An `Expr`-like object from a package with [Lazy-only support](https://narwhals-dev.github.io/narwhals/extending/#levels-of-support).

    Protocol members are chosen *purely* for matching statically - as they
    are common to all currently supported packages.
    argsr   kwdsreturnc                 O     d S N )selfr>   r?   rC   rC   V/var/www/html/IGF-ODF-V3/venv/lib/python3.10/site-packages/narwhals/_compliant/expr.pybetweenG       zNativeExpr.betweenvaluer&   c                C  rA   rB   rC   rD   rH   rC   rC   rE   __gt__M   rG   zNativeExpr.__gt__c                C  rA   rB   rC   rI   rC   rC   rE   __lt__N   rG   zNativeExpr.__lt__c                C  rA   rB   rC   rI   rC   rC   rE   __ge__O   rG   zNativeExpr.__ge__c                C  rA   rB   rC   rI   rC   rC   rE   __le__P   rG   zNativeExpr.__le__c                C  rA   rB   rC   rI   rC   rC   rE   __eq__Q   rG   zNativeExpr.__eq__c                C  rA   rB   rC   rI   rC   rC   rE   __ne__R   rG   zNativeExpr.__ne__N)r>   r   r?   r   r@   r   )rH   r   r@   r&   )__name__
__module____qualname____doc__rF   rJ   rK   rL   rM   rN   rO   rC   rC   rC   rE   r=   @   s    





r=   c                   @  sx  e Zd ZU ded< ded< ded< dZded	< edkddZdlddZdmddZdnddZ	e
doddZe
dpd d!Zdmd"d#Zdqd&d'Zdmd(d)Zdmd*d+Zdrd.d/Zdmd0d1Zdmd2d3Zdmd4d5Zdmd6d7Zdmd8d9Zdmd:d;Zdmd<d=Zdmd>d?Zdmd@dAZdmdBdCZdsdEdFZdsdGdHZdmdIdJZdmdKdLZdmdMdNZ dtdRdSZ!dudXdYZ"dvd_d`Z#dwdfdgZ$edxdidjZ%dS )yr9   r.   _implementationEvalNames[CompliantFrameT]_evaluate_output_namesAliasNames | None_alias_output_namesNzExprMetadata | None_opt_metadatar@   r,   c                 C  s   | j d u rd}t|| j S )Na3  `_opt_metadata` is None. This is usually the result of trying to do some operation (such as `over`) which requires access to the metadata at the compliant level. You may want to consider rewriting your logic so that this operation is not necessary. Ideally you should avoid setting `_opt_metadata` manually.)rY   AssertionError)rD   msgrC   rC   rE   	_metadata`   s
   
zCompliantExpr._metadatadfr   )Sequence[CompliantSeriesOrNativeExprT_co]c                 C  rA   rB   rC   rD   r]   rC   rC   rE   __call__m      zCompliantExpr.__call__r&   c                 C  s   | S rB   rC   rD   rC   rC   rE   __narwhals_expr__p      zCompliantExpr.__narwhals_expr__)CompliantNamespace[CompliantFrameT, Self]c                 C  rA   rB   rC   rb   rC   rC   rE   __narwhals_namespace__s   rG   z$CompliantExpr.__narwhals_namespace__column_indicesintcontextr0   c                G  rA   rB   rC   )clsri   rg   rC   rC   rE   from_column_indicest      z!CompliantExpr.from_column_indicesevaluate_column_namesc               C  rA   rB   rC   rj   rm   ri   rC   rC   rE   from_column_namesx      zCompliantExpr.from_column_namesc                 C  rA   rB   rC   rb   rC   rC   rE   	broadcast   rG   zCompliantExpr.broadcastnamestrc                 C  rA   rB   rC   rD   rr   rC   rC   rE   alias   rG   zCompliantExpr.aliasc                 C  rA   rB   rC   rb   rC   rC   rE   all   rG   zCompliantExpr.allc                 C  rA   rB   rC   rb   rC   rC   rE   any   rG   zCompliantExpr.anyignore_nullsboolc                C  rA   rB   rC   rD   rx   rC   rC   rE   	any_value   rG   zCompliantExpr.any_valuec                 C  rA   rB   rC   rb   rC   rC   rE   count   rG   zCompliantExpr.countc                 C  rA   rB   rC   rb   rC   rC   rE   min   rG   zCompliantExpr.minc                 C  rA   rB   rC   rb   rC   rC   rE   max   rG   zCompliantExpr.maxc                 C  rA   rB   rC   rb   rC   rC   rE   mean   rG   zCompliantExpr.meanc                 C  rA   rB   rC   rb   rC   rC   rE   sum   rG   zCompliantExpr.sumc                 C  rA   rB   rC   rb   rC   rC   rE   median   rG   zCompliantExpr.medianc                 C  rA   rB   rC   rb   rC   rC   rE   first   rG   zCompliantExpr.firstc                 C  rA   rB   rC   rb   rC   rC   rE   last   rG   zCompliantExpr.lastc                 C  rA   rB   rC   rb   rC   rC   rE   skew   rG   zCompliantExpr.skewc                 C  rA   rB   rC   rb   rC   rC   rE   kurtosis   rG   zCompliantExpr.kurtosisddofc                C  rA   rB   rC   rD   r   rC   rC   rE   std   rG   zCompliantExpr.stdc                C  rA   rB   rC   r   rC   rC   rE   var   rG   zCompliantExpr.varc                 C  rA   rB   rC   rb   rC   rC   rE   n_unique   rG   zCompliantExpr.n_uniquec                 C  rA   rB   rC   rb   rC   rC   rE   
null_count   rG   zCompliantExpr.null_countc                 C  rA   rB   rC   rb   rC   rC   rE   len   rG   zCompliantExpr.lenpartition_bySequence[str]order_byc                 C  rA   rB   rC   )rD   r   r   rC   rC   rE   over   rG   zCompliantExpr.overquantilefloatinterpolationr7   c                 C  rA   rB   rC   rD   r   r   rC   rC   rE   r      ra   zCompliantExpr.quantilefunction9Callable[[CompliantSeries[Any]], CompliantExpr[Any, Any]]return_dtypeIntoDType | Nonereturns_scalarc                C  rA   rB   rC   )rD   r   r   r   rC   rC   rE   map_batches   s   zCompliantExpr.map_batchesdefaultSelf | NoDefaultoldSequence[Any]newc                C  rA   rB   rC   rD   r   r   r   r   rC   rC   rE   replace_strict   rp   zCompliantExpr.replace_strictNameNamespace[Self]c                 C  rA   rB   rC   rb   rC   rC   rE   rr      rd   zCompliantExpr.name)r@   r,   )r]   r   r@   r^   r@   r&   )r@   re   )rg   rh   ri   r0   r@   r&   )rm   rU   ri   r0   r@   r&   rr   rs   r@   r&   rx   ry   r@   r&   r   rh   r@   r&   )r   r   r   r   r@   r&   r   r   r   r7   r@   r&   )r   r   r   r   r   ry   r@   r&   
r   r   r   r   r   r   r   r   r@   r&   )r@   r   )&rP   rQ   rR   __annotations__rY   propertyr\   r`   rc   rf   classmethodrk   ro   rq   ru   rv   rw   r{   r|   r}   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rr   rC   rC   rC   rE   r9   U   sP   
 


























r9   c                   @  s$   e Zd ZedddZdd
dZdS )ImplExprindicesSequence[int]r@   rU   c                  s   d fdd}|S )Nr]   r   r@   r   c                   s   | j   fddD S )Nc                   s   g | ]} | qS rC   rC   ).0icolumn_namesrC   rE   
<listcomp>       z<ImplExpr._eval_names_indices.<locals>.fn.<locals>.<listcomp>)columnsr]   r   r   rE   fn   s   z(ImplExpr._eval_names_indices.<locals>.fn)r]   r   r@   r   rC   )r   r   rC   r   rE   _eval_names_indices   s   zImplExpr._eval_names_indicesframer   r   c                C  s    |  |}| j }r||S |S rB   )rV   rX   )rD   r   namesru   rC   rC   rE   _evaluate_aliases   s   
zImplExpr._evaluate_aliasesN)r   r   r@   rU   )r   r   r@   r   )rP   rQ   rR   staticmethodr   r   rC   rC   rC   rE   r      s    r   c                   @  s$   e Zd Zedd	d
ZdddZdS )r:   rj   
type[Self]rm   rU   ri   r0   r@   r&   c               C  rA   rB   rC   rn   rC   rC   rE   ro      rp   z#DepthTrackingExpr.from_column_namesry   c                 C  s   t t| j dkS )at  Check if expr is elementary.

        Examples:
            - nw.col('a').mean()  # depth 1
            - nw.mean('a')  # depth 1
            - nw.len()  # depth 0

        as opposed to, say

            - nw.col('a').filter(nw.col('b')>nw.col('c')).max()

        Elementary expressions are the only ones supported properly in
        pandas, PyArrow, and Dask.
           )r   listr\   op_nodes_reversedrb   rC   rC   rE   _is_elementary   s   z DepthTrackingExpr._is_elementaryN)rj   r   rm   rU   ri   r0   r@   r&   )r@   ry   )rP   rQ   rR   r   ro   r   rC   rC   rC   rE   r:      s    
r:   c                   @  s  e Zd ZU ded< d<ddZd=ddZd>ddZed?ddZed@d d!Z	dAd$d%Z
d&d'dBd.d/Zd&d'dCd1d2ZedDd6d7ZdEd8d9ZdFd=d>ZdGd?d@ZdHdCdDZdIdGdHZdIdIdJZdJdKdLZdJdMdNZdJdOdPZdJdQdRZdJdSdTZdJdUdVZdJdWdXZdJdYdZZdJd[d\ZdJd]d^ZdJd_d`ZdJdadbZdJdcddZ dJdedfZ!dJdgdhZ"dJdidjZ#dJdkdlZ$dJdmdnZ%dJdodpZ&dJdqdrZ'dGdsdtZ(dGdudvZ)dGdwdxZ*dGdydzZ+dGd{d|Z,dGd}d~Z-dGddZ.dKddZ/dKddZ0dGddZ1dGddZ2dGddZ3dGddZ4dGddZ5dGddZ6dGddZ7dGddZ8dLddZ9dMddZ:dNddZ;dGddZ<dGddZ=dOddZ>dPddZ?dQddZ@dGddZAdRddZBdGddZCdSddZDdTddÄZEdGddńZFdGddǄZGdGddɄZHdUddτZIdVdd҄ZJdGddԄZKdGddքZLdGdd؄ZMdWddބZNdXddZOdXddZPdYddZQdGddZRdGddZSdGddZTdZddZUd[ddZVdGddZWd\ddZXd]ddZYd\ddZZd]ddZ[d^ddZ\dXddZ]d_ddZ^d_d	d
Z_d_ddZ`d_ddZad_ddZbd`ddZcdaddZddGddZedGddZfdGddZgdbd d!ZhdGd"d#ZidGd$d%Zjdcd'd(Zkelddd*d+Zmelded-d.Zneldfd0d1Zoeldgd3d4Zpeldhd6d7Zqeldid9d:Zrd;S (j  r;   )EvalSeries[EagerDataFrameT, EagerSeriesT]_callcallevaluate_output_namesEvalNames[EagerDataFrameT]alias_output_namesrW   implementationr.   versionr/   r@   Nonec                C  rA   rB   rC   )rD   r   r   r   r   r   rC   rC   rE   __init__   s   zEagerExpr.__init__r]   r   Sequence[EagerSeriesT]c                 C  
   |  |S rB   )r   r_   rC   rC   rE   r`         
zEagerExpr.__call__=EagerNamespace[EagerDataFrameT, EagerSeriesT, Self, Any, Any]c                 C  rA   rB   rC   rb   rC   rC   rE   rf      ra   z EagerExpr.__narwhals_namespace__funcri   r0   r&   c                C  s   | ||||j |jdS )Nr   r   r   r   rT   _version)rj   r   r   r   ri   rC   rC   rE   _from_callable   s   	zEagerExpr._from_callableseriesr   c                   s&   |  fdd fddd  j  jdS )Nc                   s    gS rB   rC   _dfr   rC   rE   <lambda>  s    z(EagerExpr._from_series.<locals>.<lambda>c                   s    j gS rB   rr   r   r   rC   rE   r     s    r   r   )rj   r   rC   r   rE   _from_series  s   

zEagerExpr._from_series
alias_nameAliasName | Nonec                  s^   j  d u r	d nd ur fddn fdddfdd	}j|jjjd
S )Nc                       fdd| D S )Nc                      g | ]} |qS rC   rC   r   xr   rC   rE   r     s    HEagerExpr._with_alias_output_names.<locals>.<lambda>.<locals>.<listcomp>rC   output_names)r   current_alias_output_namesrC   rE   r     s   
 z4EagerExpr._with_alias_output_names.<locals>.<lambda>c                       fdd| D S )Nc                   r   rC   rC   r   r   rC   rE   r   "  r   r   rC   r   r   rC   rE   r   "  s    r]   r   r@   list[EagerSeriesT]c                   sD    rdd t |  | D S dd t | | D S )Nc                 S     g | ]	\}}| |qS rC   ru   r   r   rr   rC   rC   rE   r   '      zDEagerExpr._with_alias_output_names.<locals>.func.<locals>.<listcomp>c                 S  r   rC   r   r   rC   rC   rE   r   -  r   )r!   rV   r   )r   rD   rC   rE   r   %  s   z0EagerExpr._with_alias_output_names.<locals>.funcr   r]   r   r@   r   )rX   	__class__rV   rT   r   )rD   r   r   rC   )r   r   r   rD   rE   _with_alias_output_names  s   
z"EagerExpr._with_alias_output_namesFr   method_namers   r   ry   kwargsr   c                K  s.   t | jf||d|}| j|| j| j| dS )a  Reuse Series implementation for expression.

        If Series.foo is already defined, and we'd like Expr.foo to be the same, we can
        leverage this method to do that for us.

        Arguments:
            method_name: name of method.
            returns_scalar: whether the Series version returns a scalar. In this case,
                the expression version should return a 1-row Series.
            kwargs: keyword arguments to pass to function.
        )r   r   r   r   ri   )r   _reuse_series_innerr   rV   rX   )rD   r   r   r   r   rC   rC   rE   _reuse_series:  s   zEagerExpr._reuse_seriesdict[str, Any]c                C  s   i S rB   rC   )rD   r   rC   rC   rE   _reuse_series_extra_kwargsW  rl   z$EagerExpr._reuse_series_extra_kwargsobj
Self | AnyTypeIs[Self]c                 C  s
   t |dS )Nrc   )hasattr)rj   r   rC   rC   rE   _is_expr\  s   
zEagerExpr._is_exprc          	        s    fdd|  D }t|fi jd|fdd D } dd |D }}tdd t||D rId	| d
}t||S )Nc                   *   i | ]\}}| |r |n|qS rC   r   _evaluate_single_output_exprr   rr   rH   r]   rD   rC   rE   
<dictcomp>h      z1EagerExpr._reuse_series_inner.<locals>.<dictcomp>r   c                   s&   g | ]}r|  |n |qS rC   )_from_scalarr   r   )methodr   rC   rE   r   s      z1EagerExpr._reuse_series_inner.<locals>.<listcomp>c                 s      | ]}|j V  qd S rB   r   )r   srC   rC   rE   	<genexpr>w      z0EagerExpr._reuse_series_inner.<locals>.<genexpr>c                 s  s    | ]	\}}||kV  qd S rB   rC   )r   ru   rr   rC   rC   rE   r  x  s    
ztSafety assertion failed, please report a bug to https://github.com/narwhals-dev/narwhals/issues
Expression aliases: 
)itemsr   r   r   rw   r!   rZ   )	rD   r]   r   r   r   outaliasesr   r[   rC   )r]   r  r   rD   rE   r   `  s.   
zEagerExpr._reuse_series_innerseries_namespace5Literal['cat', 'dt', 'list', 'name', 'str', 'struct']expressifiable_argsc                   s*   d	 fdd}j |jjdS )
a  Reuse Series implementation for expression.

        Just like `_reuse_series`, but for e.g. `Expr.dt.foo` instead
        of `Expr.foo`.

        Arguments:
            series_namespace: The Series namespace.
            method_name: name of method, within `series_namespace`.
            expressifiable_args: keyword arguments to pass to function, which may
                be expressifiable (e.g. `nw.col('a').str.replace('abc', nw.col('b')))`).
        r]   r   r@   r   c                   s2    fdd  D fdd D S )Nc                   r   rC   r   r  r  rC   rE   r    r  zDEagerExpr._reuse_series_namespace.<locals>.inner.<locals>.<dictcomp>c                   s&   g | ]}t t |d i  qS )rC   )getattrr  )r   r   r  rC   rE   r     r  zDEagerExpr._reuse_series_namespace.<locals>.inner.<locals>.<listcomp>)r  r   r  r   rD   r  )r]   r   rE   inner  s   z0EagerExpr._reuse_series_namespace.<locals>.innerr   Nr   r   rV   rX   )rD   r  r   r  r  rC   r  rE   _reuse_series_namespace  s   z!EagerExpr._reuse_series_namespacec                   s,   d fdd}t  | j j j jdS )	Nr]   r   r@   r   c                   s&   g } | D ]
}d|_ || q|S )NT)
_broadcastappend)r]   resultsresultrb   rC   rE   r     s
   z!EagerExpr.broadcast.<locals>.funcr   r   )typerV   rX   rT   r   rD   r   rC   rb   rE   rq     s   zEagerExpr.broadcastdtyper3   c                 C     | j d|dS )Ncast)r  r   )rD   r  rC   rC   rE   r!       zEagerExpr.castoperatorotherc                C  s   | j ||dS )Nr%  r"  rD   r$  r%  rC   rC   rE   _with_binary  r#  zEagerExpr._with_binaryc                C  s   |  dj||dS )Nliteralr&  )ru   r   r'  rC   rC   rE   _with_binary_right  s   zEagerExpr._with_binary_rightc                 C     |  d|S )NrN   r(  rD   r%  rC   rC   rE   rN        zEagerExpr.__eq__c                 C  r+  )NrO   r,  r-  rC   rC   rE   rO     r.  zEagerExpr.__ne__c                 C  r+  )NrL   r,  r-  rC   rC   rE   rL     r.  zEagerExpr.__ge__c                 C  r+  )NrJ   r,  r-  rC   rC   rE   rJ     r.  zEagerExpr.__gt__c                 C  r+  )NrM   r,  r-  rC   rC   rE   rM     r.  zEagerExpr.__le__c                 C  r+  )NrK   r,  r-  rC   rC   rE   rK     r.  zEagerExpr.__lt__c                 C  r+  )N__and__r,  r-  rC   rC   rE   r/    r.  zEagerExpr.__and__c                 C  r+  )N__or__r,  r-  rC   rC   rE   r0    r.  zEagerExpr.__or__c                 C  r+  )N__add__r,  r-  rC   rC   rE   r1    r.  zEagerExpr.__add__c                 C  r+  )N__sub__r,  r-  rC   rC   rE   r2    r.  zEagerExpr.__sub__c                 C  r+  )N__rsub__r*  r-  rC   rC   rE   r3    r.  zEagerExpr.__rsub__c                 C  r+  )N__mul__r,  r-  rC   rC   rE   r5    r.  zEagerExpr.__mul__c                 C  r+  )N__truediv__r,  r-  rC   rC   rE   r6    r.  zEagerExpr.__truediv__c                 C  r+  )N__rtruediv__r4  r-  rC   rC   rE   r7    r.  zEagerExpr.__rtruediv__c                 C  r+  )N__floordiv__r,  r-  rC   rC   rE   r8    r.  zEagerExpr.__floordiv__c                 C  r+  )N__rfloordiv__r4  r-  rC   rC   rE   r9    r.  zEagerExpr.__rfloordiv__c                 C  r+  )N__pow__r,  r-  rC   rC   rE   r:    r.  zEagerExpr.__pow__c                 C  r+  )N__rpow__r4  r-  rC   rC   rE   r;    r.  zEagerExpr.__rpow__c                 C  r+  )N__mod__r,  r-  rC   rC   rE   r<    r.  zEagerExpr.__mod__c                 C  r+  )N__rmod__r4  r-  rC   rC   rE   r=    r.  zEagerExpr.__rmod__c                 C  
   |  dS )N
__invert__r"  rb   rC   rC   rE   r?     r   zEagerExpr.__invert__c                 C     | j dddS )Nr   Tr   r"  rb   rC   rC   rE   r     r#  zEagerExpr.null_countc                 C  r@  )Nr   Tr   r"  rb   rC   rC   rE   r     r#  zEagerExpr.n_uniquec                 C  r@  )Nr   Tr   r"  rb   rC   rC   rE   r   
  r#  zEagerExpr.sumc                 C  r@  )Nr|   Tr   r"  rb   rC   rC   rE   r|     r#  zEagerExpr.countc                 C  r@  )Nr   Tr   r"  rb   rC   rC   rE   r     r#  zEagerExpr.meanc                 C  r@  )Nr   Tr   r"  rb   rC   rC   rE   r     r#  zEagerExpr.medianr   rh   c                C     | j dd|dS )Nr   Tr   r   r"  r   rC   rC   rE   r        zEagerExpr.stdc                C  rA  )Nr   TrB  r"  r   rC   rC   rE   r     rC  zEagerExpr.varc                 C  r@  )Nr   Tr   r"  rb   rC   rC   rE   r     r#  zEagerExpr.skewc                 C  r@  )Nr   Tr   r"  rb   rC   rC   rE   r     r#  zEagerExpr.kurtosisc                 C  r@  )Nrw   Tr   r"  rb   rC   rC   rE   rw   "  r#  zEagerExpr.anyc                 C  r@  )Nrv   Tr   r"  rb   rC   rC   rE   rv   %  r#  zEagerExpr.allc                 C  r@  )Nr~   Tr   r"  rb   rC   rC   rE   r~   (  r#  zEagerExpr.maxc                 C  r@  )Nr}   Tr   r"  rb   rC   rC   rE   r}   +  r#  zEagerExpr.minc                 C  r@  )Narg_minTr   r"  rb   rC   rC   rE   rD  .  r#  zEagerExpr.arg_minc                 C  r@  )Narg_maxTr   r"  rb   rC   rC   rE   rE  1  r#  zEagerExpr.arg_maxlower_boundupper_boundc                 C     | j d||dS )Nclip)rF  rG  r"  )rD   rF  rG  rC   rC   rE   rI  6     zEagerExpr.clipc                 C  r   )N
clip_lower)rF  r"  )rD   rF  rC   rC   rE   rK  ;  r#  zEagerExpr.clip_lowerc                 C  r   )N
clip_upper)rG  r"  )rD   rG  rC   rC   rE   rL  >  r#  zEagerExpr.clip_upperc                 C  r>  )Nis_nullr"  rb   rC   rC   rE   rM  A  r   zEagerExpr.is_nullc                 C  r>  )Nis_nanr"  rb   rC   rC   rE   rN  D  r   zEagerExpr.is_nanrH   float | Nonec                 C  r   )Nfill_nan)rH   r"  rI   rC   rC   rE   rP  G  r#  zEagerExpr.fill_nanSelf | NonestrategyFillNullStrategy | Nonelimit
int | Nonec                 C     | j d|||dS )N	fill_null)rH   rR  rT  r"  )rD   rH   rR  rT  rC   rC   rE   rW  J     zEagerExpr.fill_nullc                 C  r   )Nis_inr&  r"  r-  rC   rC   rE   rY  Q  r#  zEagerExpr.is_inc                 C  r>  )Narg_truer"  rb   rC   rC   rE   rZ  T  r   zEagerExpr.arg_true
predicatesc                 G  s&   |   }|j|ddi}| jd|dS )Nrx   Ffilter)	predicate)rf   all_horizontalr   )rD   r[  plxr]  rC   rC   rE   r\  W  s   zEagerExpr.filterc                 C  r>  )N
drop_nullsr"  rb   rC   rC   rE   r`  \  r   zEagerExpr.drop_nullsr   r   r   r   r   r   r   c                C  s   | j d||||dS )Nr   )r   r   r   r   r"  r   rC   rC   rE   r   _     
zEagerExpr.replace_strict
descending
nulls_lastc                C  rH  )Nsortrb  rc  r"  rD   rb  rc  rC   rC   rE   rd  k  rC  zEagerExpr.sortc                 C  r>  )Nabsr"  rb   rC   rC   rE   rg  n  r   zEagerExpr.absc                 C  r@  )NuniqueF)maintain_orderr"  rb   rC   rC   rE   rh  q  r#  zEagerExpr.uniquec                 C  r>  )Ndiffr"  rb   rC   rC   rE   rj  t  r   zEagerExpr.diffnfractionwith_replacementseedc                C     | j d||||dS )Nsample)rk  rl  rm  rn  r"  )rD   rk  rl  rm  rn  rC   rC   rE   rp  w  ra  zEagerExpr.samplerr   c                   s4   d	 fdd}t  fddj|jjdS )
Nr   r   r@   c                   $   t | dkrd|  }t| gS N   z:Expected function with single output, found output names: )r   r$   r   r[   r   rC   rE   r        
z+EagerExpr.alias.<locals>.alias_output_namesc                   r   )Nc                   s   g | ]}|  qS rC   r   r  r   rC   rE   r         z5EagerExpr.alias.<locals>.<lambda>.<locals>.<listcomp>rC   r   rr   rD   rC   rE   r     rv  z!EagerExpr.alias.<locals>.<lambda>r   r   r   r@   r   )r  rV   rT   r   )rD   rr   r   rC   rw  rE   ru     s   zEagerExpr.aliasc                 C  r>  )N	is_uniquer"  rb   rC   rC   rE   ry    r   zEagerExpr.is_uniquec                 C  r>  )Nis_first_distinctr"  rb   rC   rC   rE   rz    r   zEagerExpr.is_first_distinctc                 C  r>  )Nis_last_distinctr"  rb   rC   rC   rE   r{    r   zEagerExpr.is_last_distinctr   r   r   r7   c                 C  s   | j dd||dS )Nr   T)r   r   r   r"  r   rC   rC   rE   r     s   zEagerExpr.quantilec                 C  r   )Nheadrk  r"  rD   rk  rC   rC   rE   r|    r#  zEagerExpr.headc                 C  r   )Ntailr}  r"  r~  rC   rC   rE   r    r#  zEagerExpr.taildecimalsc                 C  r   )Nround)r  r"  )rD   r  rC   rC   rE   r    r#  zEagerExpr.roundc                 C  r>  )Nfloorr"  rb   rC   rC   rE   r    r   zEagerExpr.floorc                 C  r>  )Nceilr"  rb   rC   rC   rE   r    r   zEagerExpr.ceilc                 C  r@  )Nr   Tr   r"  rb   rC   rC   rE   r     r#  zEagerExpr.lenoffsetc                 C  rH  )Ngather_every)rk  r  r"  )rD   rk  r  rC   rC   rE   r    rC  zEagerExpr.gather_everykeepr4   c                C  r   )Nmode)r  r"  )rD   r  rC   rC   rE   r    r#  zEagerExpr.modec                 C  r>  )N	is_finiter"  rb   rC   rC   rE   r    r   zEagerExpr.is_finitewindow_sizemin_samplescenterc                C  rV  )Nrolling_meanr  r  r  r"  rD   r  r  r  rC   rC   rE   r    s   zEagerExpr.rolling_meanc                C  ro  )Nrolling_stdr  r  r  r   r"  rD   r  r  r  r   rC   rC   rE   r       zEagerExpr.rolling_stdc                C  rV  )Nrolling_sumr  r"  r  rC   rC   rE   r    s   zEagerExpr.rolling_sumc                C  ro  )Nrolling_varr  r"  r  rC   rC   rE   r    r  zEagerExpr.rolling_varr   Callable[[Any], Any]c                  s*   d fdd}j |jjdS )	Nr]   r   r@   r   c                   s4  | }dd |D }t fdd|D }|d |d }}t||}t|s,t|r?t|jd t  fdd|D }nt||jrOt dd |D }n|jt fdd|D }d urlt fd	d|D }t d
d |D }st	|rt
| dkr|d}	t||	 }
dt|
 d}t||S )Nc                 s  r	  rB   r   )r   input_seriesrC   rC   rE   r    r  z6EagerExpr.map_batches.<locals>.func.<locals>.<genexpr>c                 3  s    | ]} |V  qd S rB   rC   r  )r   rC   rE   r    s    r   )ri   c                 3  "    | ]\}} | |V  qd S rB   r   )r   arrout_name)
from_numpyrC   rE   r         c                 s  s    | ]
\}}| |V  qd S rB   r   )r   r   r  rC   rC   rE   r    s    c                 3  r  rB   r   )r   valr  )from_scalarrC   rE   r    r  c                 3  s    | ]}|  V  qd S rB   )r!  r  )r   rC   rE   r    s    c                 s  s    | ]	}t |d kV  qdS )rs  N)r   )r   rrC   rC   rE   r    s    rs  TzG`map_batches` with `returns_scalar=False` must return a Series; found 'zQ'.

If `returns_scalar` is set to `True`, a returned value can be a scalar value.)tupler!   r"   r#   r   r  
isinstancer   r  rw   r   indexr  r    	TypeError)r]   udf_series_inr   udf_series_out	_first_in
_first_outitr  is_scalar_result_idx_typer[   r   r   r   rD   )r  r  rE   r     s0   

z#EagerExpr.map_batches.<locals>.funcr   r]   r   r@   r   r  )rD   r   r   r   r   rC   r  rE   r     s    zEagerExpr.map_batchesc                 C  r   )Nshiftr}  r"  r~  rC   rC   rE   r    r#  zEagerExpr.shiftreversec                C  r   )Ncum_sumr  r"  rD   r  rC   rC   rE   r    r#  zEagerExpr.cum_sumc                C  r   )N	cum_countr  r"  r  rC   rC   rE   r    r#  zEagerExpr.cum_countc                C  r   )Ncum_minr  r"  r  rC   rC   rE   r    r#  zEagerExpr.cum_minc                C  r   )Ncum_maxr  r"  r  rC   rC   rE   r    r#  zEagerExpr.cum_maxc                C  r   )Ncum_prodr  r"  r  rC   rC   rE   r     r#  zEagerExpr.cum_prodr  r6   c                C  rH  )Nrank)r  rb  r"  )rD   r  rb  rC   rC   rE   r  #  rC  zEagerExpr.rankbasec                 C  r   )Nlog)r  r"  )rD   r  rC   rC   rE   r  &  r#  zEagerExpr.logc                 C  r>  )Nexpr"  rb   rC   rC   rE   r  )  r   zEagerExpr.expc                 C  r>  )Nsinr"  rb   rC   rC   rE   r  ,  r   zEagerExpr.sinc                 C  r>  )Nsqrtr"  rb   rC   rC   rE   r  /  r   zEagerExpr.sqrtclosedr1   c                 C  rV  )N
is_between)rF  rG  r  r"  )rD   rF  rG  r  rC   rC   rE   r  2  rX  zEagerExpr.is_betweenc                 C  r@  )Nr   Tr   r"  rb   rC   rC   rE   r   9  r#  zEagerExpr.firstc                 C  r@  )Nr   Tr   r"  rb   rC   rC   rE   r   <  r#  zEagerExpr.lastrx   c                C  rA  )Nr{   T)r   rx   r"  rz   rC   rC   rE   r{   ?  rJ  zEagerExpr.any_valueEagerExprCatNamespace[Self]c                 C     t | S rB   )EagerExprCatNamespacerb   rC   rC   rE   catD     zEagerExpr.cat EagerExprDateTimeNamespace[Self]c                 C  r  rB   )EagerExprDateTimeNamespacerb   rC   rC   rE   dtH  r  zEagerExpr.dtEagerExprListNamespace[Self]c                 C  r  rB   )EagerExprListNamespacerb   rC   rC   rE   r   L  r  zEagerExpr.listEagerExprNameNamespace[Self]c                 C  r  rB   )EagerExprNameNamespacerb   rC   rC   rE   rr   P  r  zEagerExpr.nameEagerExprStringNamespace[Self]c                 C  r  rB   )EagerExprStringNamespacerb   rC   rC   rE   rs   T  r  zEagerExpr.strEagerExprStructNamespace[Self]c                 C  r  rB   )EagerExprStructNamespacerb   rC   rC   rE   structX  r  zEagerExpr.structN)r   r   r   r   r   rW   r   r.   r   r/   r@   r   r  )r@   r   )
r   r   r   r   r   rW   ri   r0   r@   r&   )r   r   r@   r&   )r   r   r@   r&   )r   rs   r   ry   r   r   r@   r&   )r   ry   r@   r   )r   r   r@   r   )
r]   r   r   rs   r   ry   r   r   r@   r   )r  r  r   rs   r  r   r@   r&   r   )r  r3   r@   r&   )r$  rs   r%  r&   r@   r&   )r%  r&   r@   r&   r   )rF  r&   rG  r&   r@   r&   )rF  r&   r@   r&   )rG  r&   r@   r&   )rH   rO  r@   r&   )rH   rQ  rR  rS  rT  rU  r@   r&   )r%  r   r@   r&   )r[  r&   r@   r&   r   )rb  ry   rc  ry   r@   r&   )
rk  rU  rl  rO  rm  ry   rn  rU  r@   r&   r   r   )rk  rh   r@   r&   )r  rh   r@   r&   )rk  rh   r  rh   r@   r&   )r  r4   r@   r&   )r  rh   r  rh   r  ry   r@   r&   )
r  rh   r  rh   r  ry   r   rh   r@   r&   )r   r  r   r   r   ry   r@   r&   )r  ry   r@   r&   )r  r6   rb  ry   r@   r&   )r  r   r@   r&   )rF  r&   rG  r&   r  r1   r@   r&   r   )r@   r  )r@   r  )r@   r  )r@   r  )r@   r  )r@   r  )srP   rQ   rR   r   r   r`   rf   r   r   r   r   r   r   r   r   r  rq   r!  r(  r*  rN   rO   rL   rJ   rM   rK   r/  r0  r1  r2  r3  r5  r6  r7  r8  r9  r:  r;  r<  r=  r?  r   r   r   r|   r   r   r   r   r   r   rw   rv   r~   r}   rD  rE  rI  rK  rL  rM  rN  rP  rW  rY  rZ  r\  r`  r   rd  rg  rh  rj  rp  ru   ry  rz  r{  r   r|  r  r  r  r  r   r  r  r  r  r  r  r  r   r  r  r  r  r  r  r  r  r  r  r  r  r   r   r{   r   r  r  r   rr   rs   r  rC   rC   rC   rE   r;      s   
 
	$"%
.r;   c                   @  sJ   e Zd ZU dddZdd	d
ZedddZe Ze Z	e Z
ded< dS )r<   r   rW   r@   r&   c                C  rA   rB   rC   r  rC   rC   rE   r   a  rG   z!LazyExpr._with_alias_output_namesrr   rs   c                   s   d fdd}|  |S )Nr   r   r@   c                   rq  rr  )r   
ValueErrorrt  r   rC   rE   r   c  ru  zLazyExpr.alias.<locals>.fnrx  )r   )rD   rr   r   rC   r   rE   ru   b  s   
zLazyExpr.aliasLazyExprNameNamespace[Self]c                 C  r  rB   )LazyExprNameNamespacerb   rC   rC   rE   rr   k  r  zLazyExpr.namer   r  N)r   rW   r@   r&   r   )r@   r  )rP   rQ   rR   r   ru   r   rr   r   ewm_meanr   r  r   rC   rC   rC   rE   r<   ^  s   
 

	r<   c                   @  s$   e Zd ZU ded< edddZdS )_ExprNamespacer   _compliant_exprr@   c                 C  s   | j S rB   r  rb   rC   rC   rE   	complianty  s   z_ExprNamespace.compliantNr@   r   )rP   rQ   rR   r   r   r  rC   rC   rC   rE   r  t  s   
 r  c                   @     e Zd ZdddZdS )	EagerExprNamespaceexprr   r@   r   c                C  
   || _ d S rB   r  rD   r  rC   rC   rE   r     r   zEagerExprNamespace.__init__N)r  r   r@   r   rP   rQ   rR   r   rC   rC   rC   rE   r  ~      r  c                   @  r  )	LazyExprNamespacer  r   r@   r   c                C  r  rB   r  r  rC   rC   rE   r     r   zLazyExprNamespace.__init__N)r  r   r@   r   r  rC   rC   rC   rE   r    r  r  c                   @  s   e Zd ZdddZdS )r  r@   r   c                 C     | j ddS )Nr  get_categoriesr  r  rb   rC   rC   rE   r    r#  z$EagerExprCatNamespace.get_categoriesNr@   r   )rP   rQ   rR   r  rC   rC   rC   rE   r        r  c                   @  s   e Zd Zd:ddZd;d	d
Zd<ddZd=ddZd>ddZd>ddZd>ddZ	d>ddZ
d>ddZd>ddZd>ddZd>dd Zd>d!d"Zd>d#d$Zd>d%d&Zd>d'd(Zd>d)d*Zd>d+d,Zd>d-d.Zd>d/d0Zd>d1d2Zd?d4d5Zd@d7d8Zd9S )Ar  formatrs   r@   r   c                 C     | j jdd|dS )Nr  	to_stringr  r  rD   r  rC   rC   rE   r       z$EagerExprDateTimeNamespace.to_string	time_zone
str | Nonec                 C  r  )Nr  replace_time_zoner  r  rD   r  rC   rC   rE   r       z,EagerExprDateTimeNamespace.replace_time_zonec                 C  r  )Nr  convert_time_zoner  r  r  rC   rC   rE   r    r  z,EagerExprDateTimeNamespace.convert_time_zone	time_unitr8   c                 C  r  )Nr  	timestamp)r  r  )rD   r  rC   rC   rE   r    r  z$EagerExprDateTimeNamespace.timestampc                 C  r  )Nr  dater  rb   rC   rC   rE   r    r#  zEagerExprDateTimeNamespace.datec                 C  r  )Nr  yearr  rb   rC   rC   rE   r    r#  zEagerExprDateTimeNamespace.yearc                 C  r  )Nr  monthr  rb   rC   rC   rE   r    r#  z EagerExprDateTimeNamespace.monthc                 C  r  )Nr  dayr  rb   rC   rC   rE   r    r#  zEagerExprDateTimeNamespace.dayc                 C  r  )Nr  hourr  rb   rC   rC   rE   r    r#  zEagerExprDateTimeNamespace.hourc                 C  r  )Nr  minuter  rb   rC   rC   rE   r    r#  z!EagerExprDateTimeNamespace.minutec                 C  r  )Nr  secondr  rb   rC   rC   rE   r    r#  z!EagerExprDateTimeNamespace.secondc                 C  r  )Nr  millisecondr  rb   rC   rC   rE   r    r#  z&EagerExprDateTimeNamespace.millisecondc                 C  r  )Nr  microsecondr  rb   rC   rC   rE   r    r#  z&EagerExprDateTimeNamespace.microsecondc                 C  r  )Nr  
nanosecondr  rb   rC   rC   rE   r    r#  z%EagerExprDateTimeNamespace.nanosecondc                 C  r  )Nr  ordinal_dayr  rb   rC   rC   rE   r    r#  z&EagerExprDateTimeNamespace.ordinal_dayc                 C  r  )Nr  weekdayr  rb   rC   rC   rE   r    r#  z"EagerExprDateTimeNamespace.weekdayc                 C  r  )Nr  total_minutesr  rb   rC   rC   rE   r     r#  z(EagerExprDateTimeNamespace.total_minutesc                 C  r  )Nr  total_secondsr  rb   rC   rC   rE   r    r#  z(EagerExprDateTimeNamespace.total_secondsc                 C  r  )Nr  total_millisecondsr  rb   rC   rC   rE   r    r#  z-EagerExprDateTimeNamespace.total_millisecondsc                 C  r  )Nr  total_microsecondsr  rb   rC   rC   rE   r    r#  z-EagerExprDateTimeNamespace.total_microsecondsc                 C  r  )Nr  total_nanosecondsr  rb   rC   rC   rE   r    r#  z,EagerExprDateTimeNamespace.total_nanosecondseveryc                 C  r  )Nr  truncate)r  r  )rD   r  rC   rC   rE   r    r  z#EagerExprDateTimeNamespace.truncatebyc                 C  r  )Nr  	offset_byr  r  rD   r  rC   rC   rE   r    r  z$EagerExprDateTimeNamespace.offset_byN)r  rs   r@   r   )r  r  r@   r   )r  rs   r@   r   )r  r8   r@   r   r  )r  rs   r@   r   r  rs   r@   r   )rP   rQ   rR   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r  r  r  rC   rC   rC   rE   r    s0    





















r  c                   @  sp   e Zd ZdddZdddZd d	d
Zd!ddZdddZdddZdddZ	dddZ
dddZd"ddZdS )#r  r@   r   c                 C  r  )Nr   r   r  rb   rC   rC   rE   r     r#  zEagerExprListNamespace.lenc                 C  r  )Nr   rh  r  rb   rC   rC   rE   rh    r#  zEagerExprListNamespace.uniqueitemr5   c                 C  r  )Nr   contains)r  r  )rD   r  rC   rC   rE   r    r  zEagerExprListNamespace.containsr  rh   c                 C  r  )Nr   get)r  r  )rD   r  rC   rC   rE   r    r  zEagerExprListNamespace.getc                 C  r  )Nr   r}   r  rb   rC   rC   rE   r}     r#  zEagerExprListNamespace.minc                 C  r  )Nr   r~   r  rb   rC   rC   rE   r~     r#  zEagerExprListNamespace.maxc                 C  r  )Nr   r   r  rb   rC   rC   rE   r     r#  zEagerExprListNamespace.meanc                 C  r  )Nr   r   r  rb   rC   rC   rE   r     r#  zEagerExprListNamespace.medianc                 C  r  )Nr   r   r  rb   rC   rC   rE   r     r#  zEagerExprListNamespace.sumrb  ry   rc  c                C     | j jdd||dS )Nr   rd  re  r  rf  rC   rC   rE   rd       zEagerExprListNamespace.sortNr  )r  r5   r@   r   )r  rh   r@   r   )rb  ry   rc  ry   r@   r   )rP   rQ   rR   r   rh  r  r  r}   r~   r   r   r   rd  rC   rC   rC   rE   r    s    








r  c                   @  s`   e Zd ZdddZdddZdddZdddZdddZdddZe	d ddZ
d!ddZdS )"CompliantExprNameNamespacer@   r   c                 C  s
   |  d S rB   r   rb   rC   rC   rE   r    r   zCompliantExprNameNamespace.keepr   r   c                 C  r   rB   r  )rD   r   rC   rC   rE   map
  r   zCompliantExprNameNamespace.mapprefixrs   c                      |   fddS )Nc                   s     |  S rB   rC   r   r  rC   rE   r         z3CompliantExprNameNamespace.prefix.<locals>.<lambda>r  rD   r  rC   r  rE   r    r  z!CompliantExprNameNamespace.prefixsuffixc                   r  )Nc                   s   |    S rB   rC   r   r  rC   rE   r     r  z3CompliantExprNameNamespace.suffix.<locals>.<lambda>r  rD   r  rC   r  rE   r    r  z!CompliantExprNameNamespace.suffixc                 C     |  tjS rB   )r   rs   lowerrb   rC   rC   rE   to_lowercase  r.  z'CompliantExprNameNamespace.to_lowercasec                 C  r  rB   )r   rs   upperrb   rC   rC   rE   to_uppercase  r.  z'CompliantExprNameNamespace.to_uppercaser   r   c                  s   d fdd}|S )Nr   r   r@   c                  r   )Nc                   r   rC   rC   )r   rr   r   rC   rE   r     r   zNCompliantExprNameNamespace._alias_output_names.<locals>.fn.<locals>.<listcomp>rC   r   r!  rC   rE   r     r  z:CompliantExprNameNamespace._alias_output_names.<locals>.fn)r   r   r@   r   rC   )r   r   rC   r!  rE   rX     s   z.CompliantExprNameNamespace._alias_output_namesr   c                C  rA   rB   rC   r  rC   rC   rE   r      rG   z)CompliantExprNameNamespace._from_callableNr  )r   r   r@   r   )r  rs   r@   r   )r  rs   r@   r   )r   r   r@   r   )r   r   r@   r   )rP   rQ   rR   r  r  r  r  r  r   r   rX   r   rC   rC   rC   rE   r    s    





r  c                   @  r  )	r  r   r   r@   r   c                 C  s   | j }||S rB   )r  r   )rD   r   r  rC   rC   rE   r   (  s   
z%EagerExprNameNamespace._from_callableN)r   r   r@   r   rP   rQ   rR   r   rC   rC   rC   rE   r  #      r  c                   @  r  )	r  r   r   r@   r   c                 C  s"   | j }|r
| |nd }||S rB   )r  rX   r   )rD   r   r  r   rC   rC   rE   r   2  s   
z$LazyExprNameNamespace._from_callableN)r   r   r@   r   r"  rC   rC   rC   rE   r  -  r#  r  c                   @  s   e Zd Zd3ddZd4ddZd5ddZd6ddZd7ddZd8ddZd9ddZ	d:dd Z
d;d"d#Zd<d%d&Zd<d'd(Zd3d)d*Zd3d+d,Zd=d.d/Zd3d0d1Zd2S )>r  r@   r   c                 C  r  )Nrs   	len_charsr  rb   rC   rC   rE   r$  ;  r#  z"EagerExprStringNamespace.len_charsrH   patternrs   r)  ry   rk  rh   c                C  s   | j jdd||||dS )Nrs   replace)r%  rH   r)  rk  r  )rD   rH   r%  r)  rk  rC   rC   rE   r&  >  s   z EagerExprStringNamespace.replacec                C  s   | j jdd|||dS )Nrs   replace_all)r%  rH   r)  r  )rD   rH   r%  r)  rC   rC   rE   r'  E  s   
z$EagerExprStringNamespace.replace_all
charactersr  c                 C  r  )Nrs   strip_chars)r(  r  )rD   r(  rC   rC   rE   r)  L  r  z$EagerExprStringNamespace.strip_charsr  c                 C  r  )Nrs   starts_withr  r  r  rC   rC   rE   r*  Q  r  z$EagerExprStringNamespace.starts_withr  c                 C  r  )Nrs   	ends_withr  r  r  rC   rC   rE   r+  T  r  z"EagerExprStringNamespace.ends_withc                C  r  )Nrs   r  )r%  r)  r  )rD   r%  r)  rC   rC   rE   r  W  r  z!EagerExprStringNamespace.containsr  lengthrU  c                 C  r  )Nrs   slice)r  r,  r  )rD   r  r,  rC   rC   rE   r-  \  r  zEagerExprStringNamespace.slicer  c                 C  r  )Nrs   splitr	  r  r
  rC   rC   rE   r.  a  r  zEagerExprStringNamespace.splitr  c                 C  r  )Nrs   to_datetimer  r  r  rC   rC   rE   r/  d  r  z$EagerExprStringNamespace.to_datetimec                 C  r  )Nrs   to_dater  r  r  rC   rC   rE   r0  g  r  z EagerExprStringNamespace.to_datec                 C  r  )Nrs   r  r  rb   rC   rC   rE   r  j  r#  z%EagerExprStringNamespace.to_lowercasec                 C  r  )Nrs   r   r  rb   rC   rC   rE   r   m  r#  z%EagerExprStringNamespace.to_uppercasewidthc                 C  r  )Nrs   zfill)r1  r  )rD   r1  rC   rC   rE   r2  p  r  zEagerExprStringNamespace.zfillc                 C  r  )Nrs   to_titlecaser  rb   rC   rC   rE   r3  s  r#  z%EagerExprStringNamespace.to_titlecaseNr  )
rH   r   r%  rs   r)  ry   rk  rh   r@   r   )rH   r   r%  rs   r)  ry   r@   r   )r(  r  r@   r   )r  rs   r@   r   )r  rs   r@   r   )r%  rs   r)  ry   r@   r   )r  rh   r,  rU  r@   r   r  )r  r  r@   r   )r1  rh   r@   r   )rP   rQ   rR   r$  r&  r'  r)  r*  r+  r  r-  r.  r/  r0  r  r   r2  r3  rC   rC   rC   rE   r  8  s     













r  c                   @  r  )	r  rr   rs   r@   r   c                 C  s   | j jdd|d|S )Nr  fieldr   )r  r  ru   rt   rC   rC   rE   r4  z  s   zEagerExprStructNamespace.fieldN)rr   rs   r@   r   )rP   rQ   rR   r4  rC   rC   rC   rE   r  w  r  r  N)Z
__future__r   	functoolsr   r$  r   typingr   r   r   r   r	   r
   !narwhals._compliant.any_namespacer   r   r   r   r   r   narwhals._compliant.columnr   narwhals._compliant.namespacer   narwhals._compliant.typingr   r   r   r   r   r   r   r   r   r   r   narwhals._utilsr   r   r    r!   narwhals.dependenciesr"   r#   narwhals.exceptionsr$   collections.abcr%   typing_extensionsr&   r'   r(   narwhals._compliant.seriesr)   r*   r+   narwhals._expression_parsingr,   narwhals._typingr-   r.   r/   r0   narwhals.typingr1   r2   r3   r4   r5   r6   r7   r8   __all__r=   r9   r   r:   r;   r<   r  r  r  r  r  r  r  r  r  r  r  rC   rC   rC   rE   <module>   s      4(

X





%

    
|




O
$
!



?