
    h1                       S SK Jr  S SKrS SKJr  S SKJr  S SKJr  S SKJ	r	  S SKJ
r
  S SKJr  S S	KJr  S S
KJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJ r   S SKJ!r!  S SKJ"r"  S SKJ#r#  S SKJ$r$  S SK%J&r&  S S K'J(r(  S S!K'J)r)  S S"K*J+r+  S S#K,J-r-  S S$K,J.r.  S S%K,J/r/  \(       d  \R`                  S&:  a  S SKJr1  OS SKJr1  OS SKJr1  \(       a  S S
KJr  S S'K2J3r3  S S(K2J4r4  S SKJr  S S)KJ5r5  S S*K6J7r7  S SKJr  S S+KJ8r8  S S,KJ9r9  S S-K%J:r:  S S.K%J;r;  S S"K*J+r+  S S/K<J=r=  S S0K<J>r>  S S1K<J?r?  S S2K<J@r@  S S3K<JArA  S S4K<JBrB  S S5K<JCrC  S S6K,JDrD  S S7K,JErE  S S8K,JFrF  / S9QrG " S: S;\5      rH " S< S=\1\\4   5      rI " S> S?\I\\4   \1\\4   5      rJ " S@ SA\J\ \"4   \1\ \"4   5      rK " SB SC\I\\$4   \1\\$4   5      rL " SD SE\-\   \\   5      rM " SF SG\M\!   \\!   5      rN " SH SI\M\#   \\#   5      rO " SJ SK\N\!   \\!   \\!   5      rP " SL SM\N\!   \\!   \\!   5      rQ " SN SO\N\!   \\!   \\!   5      rR " SP SQ\M\   \\   \\   5      rS " SR SS\N\!   \S\!   \\!   5      rT " ST SU\O\#   \S\#   \\#   5      rU " SV SW\N\!   \\!   \\!   5      rV " SX SY\N\!   \\!   \\!   5      rWg)Z    )annotationsN)partial)methodcaller)TYPE_CHECKING)Any)Callable)Generic)Literal)Mapping)Protocol)Sequence)CatNamespace)DateTimeNamespace)ListNamespace)NameNamespace)StringNamespace)StructNamespace)CompliantNamespace)	AliasName)
AliasNames)CompliantExprT_co)CompliantFrameT)CompliantLazyFrameT)CompliantSeriesOrNativeExprT_co)EagerDataFrameT)
EagerExprT)EagerSeriesT)	LazyExprT)NativeExprT)!evaluate_output_names_and_aliases)	get_numpy)is_numpy_array)DType)_StoresCompliant)
deprecated)not_implemented)   	   )Self)TypeIs)EagerNamespace)CompliantSeries)	EvalNames)
EvalSeries)ExprKind)ExprMetadata)FillNullStrategy)NonNestedLiteral)NumericLiteral)
RankMethod)RollingInterpolationMethod)TemporalLiteral)TimeUnit)Implementation)Version)_FullContext)CompliantExpr	EagerExprLazyExpr
NativeExprc                  ,    \ rS rSrSrSS jrSS jrSrg)r>   P   zAn `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.
c                    g N selfargskwdss      J/var/www/html/env/lib/python3.13/site-packages/narwhals/_compliant/expr.pybetweenNativeExpr.betweenW   s    s    c                    g rB   rC   rD   s      rH   isinNativeExpr.isinX   s    CrK   rC   N)rF   r   rG   r   returnr   )__name__
__module____qualname____firstlineno____doc__rI   rM   __static_attributes__rC   rK   rH   r>   r>   P   s     ;7rK   r>   c                     \ rS rSr% S\S'   S\S'   S\S'   S\S	'   S
\S'   S\S'       ScS jrSdS jrSeS jr\      SfS j5       r	\        SgS j5       r
ShS jrShS jrShS jrShS jrSiS jrSjS jrShS jrShS jrShS jrShS jrShS jrShS jrShS jrShS  jrShS! jrShS" jrSkS# jrSkS$ jrShS% jrShS& jrShS' jr        SlS( jr ShS) jr!ShS* jr"ShS+ jr#SmS, jr$ShS- jr%SnS. jr&SnS/ jr'SnS0 jr(ShS1 jr)ShS2 jr*ShS3 jr+ShS4 jr,ShS5 jr-SoS6 jr.SoS7 jr/SoS8 jr0SoS9 jr1SoS: jr2SpS; jr3SqS< jr4SrS= jr5        SsS> jr6      StS? jr7          SuS@ jr8      SvSA jr9      SwSB jr:      SxSC jr;\<SySD j5       r=\<SySE j5       r>\<SySF j5       r?\<SySG j5       r@\<SySH j5       rA\<SySI j5       rB                SzSJ jrC        S{SK jrD        S{SL jrE          S|SM jrF          S|SN jrG\H" SO5      S}SP j5       rISpSQ jrJSpSR jrKSpSS jrLSpST jrMSpSU jrNSpSV jrOSpSW jrPSpSX jrQSpSY jrRSpSZ jrSSpS[ jrTSpS\ jrUSpS] jrVShS^ jrW    S~S_ jrXSS` jrYSarZgb)r;   [   r8   _implementationtuple[int, ...]_backend_versionr9   _versionEvalNames[CompliantFrameT]_evaluate_output_namesAliasNames | None_alias_output_nameszExprMetadata | None	_metadatac                    g rB   rC   rE   dfs     rH   __call__CompliantExpr.__call__c   s    47rK   c                    g rB   rC   rE   s    rH   __narwhals_expr__CompliantExpr.__narwhals_expr__f       rK   c                    g rB   rC   rg   s    rH   __narwhals_namespace__$CompliantExpr.__narwhals_namespace__g   s    SVrK   c                  g rB   rC   )clsevaluate_column_namescontexts      rH   from_column_namesCompliantExpr.from_column_namesh        rK   c                   g rB   rC   )ro   rq   column_indicess      rH   from_column_indices!CompliantExpr.from_column_indicesp   s     rK   c                    g rB   rC   rg   s    rH   is_nullCompliantExpr.is_nullu       srK   c                    g rB   rC   rg   s    rH   absCompliantExpr.absv       3rK   c                    g rB   rC   rg   s    rH   allCompliantExpr.allw   r   rK   c                    g rB   rC   rg   s    rH   anyCompliantExpr.anyx   r   rK   c                    g rB   rC   rE   names     rH   aliasCompliantExpr.aliasy       rK   c                    g rB   rC   rE   dtypes     rH   castCompliantExpr.castz   s    rK   c                    g rB   rC   rg   s    rH   countCompliantExpr.count{   s    SrK   c                    g rB   rC   rg   s    rH   minCompliantExpr.min|   r   rK   c                    g rB   rC   rg   s    rH   maxCompliantExpr.max}   r   rK   c                    g rB   rC   rg   s    rH   arg_minCompliantExpr.arg_min~   r|   rK   c                    g rB   rC   rg   s    rH   arg_maxCompliantExpr.arg_max   r|   rK   c                    g rB   rC   rg   s    rH   arg_trueCompliantExpr.arg_true       rK   c                    g rB   rC   rg   s    rH   meanCompliantExpr.mean       CrK   c                    g rB   rC   rg   s    rH   sumCompliantExpr.sum   r   rK   c                    g rB   rC   rg   s    rH   medianCompliantExpr.median       crK   c                    g rB   rC   rg   s    rH   skewCompliantExpr.skew   r   rK   c                   g rB   rC   rE   ddofs     rH   stdCompliantExpr.std   rj   rK   c                   g rB   rC   r   s     rH   varCompliantExpr.var   rj   rK   c                    g rB   rC   rg   s    rH   n_uniqueCompliantExpr.n_unique   r   rK   c                    g rB   rC   rg   s    rH   
null_countCompliantExpr.null_count       #rK   c                    g rB   rC   rg   s    rH   
drop_nullsCompliantExpr.drop_nulls   r   rK   c                    g rB   rC   rE   valuestrategylimits       rH   	fill_nullCompliantExpr.fill_null   s    
 rK   c                    g rB   rC   rg   s    rH   diffCompliantExpr.diff   r   rK   c                    g rB   rC   rg   s    rH   uniqueCompliantExpr.unique   r   rK   c                    g rB   rC   rg   s    rH   lenCompliantExpr.len   r   rK   c                    g rB   rC   rE   decimalss     rH   roundCompliantExpr.round   s    CrK   c                    g rB   rC   rg   s    rH   modeCompliantExpr.mode   r   rK   c                    g rB   rC   rE   ns     rH   headCompliantExpr.head       CrK   c                    g rB   rC   r   s     rH   tailCompliantExpr.tail   r   rK   c                    g rB   rC   r   s     rH   shiftCompliantExpr.shift   s    SrK   c                    g rB   rC   rg   s    rH   	is_finiteCompliantExpr.is_finite       rK   c                    g rB   rC   rg   s    rH   is_nanCompliantExpr.is_nan   r   rK   c                    g rB   rC   rg   s    rH   	is_uniqueCompliantExpr.is_unique   r   rK   c                    g rB   rC   rg   s    rH   is_first_distinctCompliantExpr.is_first_distinct   rj   rK   c                    g rB   rC   rg   s    rH   is_last_distinctCompliantExpr.is_last_distinct   r   rK   c                   g rB   rC   rE   reverses     rH   cum_sumCompliantExpr.cum_sum       rK   c                   g rB   rC   r   s     rH   	cum_countCompliantExpr.cum_count   s    3rK   c                   g rB   rC   r   s     rH   cum_minCompliantExpr.cum_min   r   rK   c                   g rB   rC   r   s     rH   cum_maxCompliantExpr.cum_max   r   rK   c                   g rB   rC   r   s     rH   cum_prodCompliantExpr.cum_prod   s    #rK   c                    g rB   rC   rE   others     rH   is_inCompliantExpr.is_in   rj   rK   c                   g rB   rC   rE   
descending
nulls_lasts      rH   sortCompliantExpr.sort       3rK   c                   g rB   rC   )rE   methodr  s      rH   rankCompliantExpr.rank   s    SrK   c                   g rB   rC   rE   oldnewreturn_dtypes       rH   replace_strictCompliantExpr.replace_strict        rK   c                    g rB   rC   )rE   partition_byorder_bys      rH   overCompliantExpr.over       rK   c                   g rB   rC   rE   r   fractionwith_replacementseeds        rH   sampleCompliantExpr.sample   rt   rK   c                    g rB   rC   rE   quantileinterpolations      rH   r2  CompliantExpr.quantile   r(  rK   c                    g rB   rC   )rE   functionr  s      rH   map_batchesCompliantExpr.map_batches        rK   c                    g rB   rC   rE   lower_boundupper_bounds      rH   clipCompliantExpr.clip   r9  rK   c                    g rB   rC   rg   s    rH   strCompliantExpr.str       rK   c                    g rB   rC   rg   s    rH   r   CompliantExpr.name       rK   c                    g rB   rC   rg   s    rH   dtCompliantExpr.dt   s    rK   c                    g rB   rC   rg   s    rH   catCompliantExpr.cat   rC  rK   c                    g rB   rC   rg   s    rH   listCompliantExpr.list   rF  rK   c                    g rB   rC   rg   s    rH   structCompliantExpr.struct   s     rK   c                   g rB   rC   )rE   comspan	half_lifealphaadjustmin_samplesignore_nullss           rH   ewm_meanCompliantExpr.ewm_mean   s     rK   c                   g rB   rC   rE   window_sizerY  centers       rH   rolling_sumCompliantExpr.rolling_sum   r"  rK   c                   g rB   rC   r^  s       rH   rolling_meanCompliantExpr.rolling_mean   r"  rK   c                   g rB   rC   rE   r_  rY  r`  r   s        rH   rolling_varCompliantExpr.rolling_var   rt   rK   c                   g rB   rC   rg  s        rH   rolling_stdCompliantExpr.rolling_std   rt   rK   zSince `1.22.0`c                    g rB   rC   rE   r   offsets      rH   gather_everyCompliantExpr.gather_every  s    9<rK   c                    g rB   rC   r  s     rH   __and__CompliantExpr.__and__      3rK   c                    g rB   rC   r  s     rH   __or__CompliantExpr.__or__      #rK   c                    g rB   rC   r  s     rH   __add__CompliantExpr.__add__  ru  rK   c                    g rB   rC   r  s     rH   __sub__CompliantExpr.__sub__  ru  rK   c                    g rB   rC   r  s     rH   __mul__CompliantExpr.__mul__  ru  rK   c                    g rB   rC   r  s     rH   __floordiv__CompliantExpr.__floordiv__  s    rK   c                    g rB   rC   r  s     rH   __truediv__CompliantExpr.__truediv__	  s    srK   c                    g rB   rC   r  s     rH   __mod__CompliantExpr.__mod__
  ru  rK   c                    g rB   rC   r  s     rH   __pow__CompliantExpr.__pow__  ru  rK   c                    g rB   rC   r  s     rH   __gt__CompliantExpr.__gt__  ry  rK   c                    g rB   rC   r  s     rH   __ge__CompliantExpr.__ge__  ry  rK   c                    g rB   rC   r  s     rH   __lt__CompliantExpr.__lt__  ry  rK   c                    g rB   rC   r  s     rH   __le__CompliantExpr.__le__  ry  rK   c                    g rB   rC   rg   s    rH   
__invert__CompliantExpr.__invert__  r   rK   c                    g rB   rC   )rE   kinds     rH   	broadcastCompliantExpr.broadcast  r(  rK   c                h    U R                   c   eU R                   R                  R                  5       $ )zReturn `True` for multi-output aggregations without names.

For example, column `'a'` only appears in the output as a grouping key:

    df.group_by('a').agg(nw.all().sum())

It does not get included in:

    nw.all().sum().
)r`   expansion_kindis_multi_unnamedrg   s    rH   _is_multi_output_unnamed&CompliantExpr._is_multi_output_unnamed  s-     ~~)))~~,,==??rK   rC   N)rc   r   rO   z)Sequence[CompliantSeriesOrNativeExprT_co]rO   None)rO   z)CompliantNamespace[CompliantFrameT, Self])rp   r\   rq   r:   rO   r)   )ro   
type[Self]rv   intrq   r:   rO   r)   rO   r)   r   rA  rO   r)   r   zDType | type[DType]rO   r)   r   r  rO   r)   r   zSelf | NonNestedLiteralr   zFillNullStrategy | Noner   
int | NonerO   r)   r   r  rO   r)   r   r  rO   r)   )r   boolrO   r)   r  r   rO   r)   r  r  r  r  rO   r)   )r  r4   r  r  rO   r)   r  z!Sequence[Any] | Mapping[Any, Any]r  zSequence[Any]r  DType | type[DType] | NonerO   r)   )r$  Sequence[str]r%  zSequence[str] | NonerO   r)   
r   r  r+  float | Noner,  r  r-  r  rO   r)   r2  floatr3  r5   rO   r)   )r6  z9Callable[[CompliantSeries[Any]], CompliantExpr[Any, Any]]r  r  rO   r)   r<  .Self | NumericLiteral | TemporalLiteral | Noner=  r  rO   r)   )rO   r   )rT  r  rU  r  rV  r  rW  r  rX  r  rY  r  rZ  r  rO   r)   r_  r  rY  r  r`  r  rO   r)   
r_  r  rY  r  r`  r  r   r  rO   r)   r   r  ro  r  rO   r)   r  z/Literal[ExprKind.AGGREGATION, ExprKind.LITERAL]rO   r)   rO   r  )[rP   rQ   rR   rS   __annotations__rd   rh   rl   classmethodrr   rw   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   r   r  r  r	  r  r  r  r   r&  r.  r2  r7  r>  propertyrA  r   rH  rK  rN  rQ  r[  ra  rd  rh  rk  r%   rp  rs  rw  r{  r~  r  r  r  r  r  r  r  r  r  r  r  r  rU   rC   rK   rH   r;   r;   [   s   ##%%66**""8!8	28 -V9
  
  *-8D	  #+; ""#!,,#%%& * 	
 
  !/''($!$,+46445,FH. 
 1 
)5I	 	
   
.H	K 1 
	C D 
	         
 
 	

  
 
 
 
 
 

 	
  
 	
  
 	
   
 	
   
  !< "<.-...32..----%C	@rK   r;   c                  l    \ rS rSr% S\S'   S\S'   \SS.         SS jj5       rSS	 jrSS
 jrSr	g)DepthTrackingExpri#  r  _depthrA  _function_name )function_namec                  g rB   rC   )ro   rp   rq   r  s       rH   rr   #DepthTrackingExpr.from_column_names*  s     rK   c                     U R                   S:  $ )a,  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  rg   s    rH   _is_elementary DepthTrackingExpr._is_elementary4  s     {{QrK   c                f    [        U 5      R                   SU R                   SU R                   S3$ )Nz(depth=z, function_name=))typerP   r  r  rg   s    rH   __repr__DepthTrackingExpr.__repr__E  s3    t*%%&gdkk]:J4K^K^J__`aarK   rC   N)
ro   r  rp   r\   rq   r:   r  rA  rO   r)   r  )rO   rA  )
rP   rQ   rR   rS   r  r  rr   r  r  rU   rC   rK   rH   r  r  #  s_     K  9
   
 "brK   r  c                  
   \ rS rSr% S\S'   S\S'   SS.                   SbS jjrScS	 jr  SdS
 jrSeS jr\	SS.               SfS jj5       r
\	SgS j5       rSSS.         ShS jjrSS.   SiS jjr\	SjS j5       r            SkS jr        SlS jrSmS jrSnS jrSoS jrSoS jrSoS jrSoS jrSoS jrSoS jrSpS jrSpS jrSoS  jrSoS! jrSoS" jrSoS# jrSoS$ jrSoS% jr SoS& jr!SoS' jr"SoS( jr#SoS) jr$SoS* jr%SoS+ jr&SqS, jr'SqS- jr(SqS. jr)SqS/ jr*SqS0 jr+SqS1 jr,SqS2 jr-SrS3 jr.SrS4 jr/SqS5 jr0SqS6 jr1SqS7 jr2SqS8 jr3SqS9 jr4SqS: jr5SqS; jr6      SsS< jr7SqS= jr8SqS> jr9        StS? jr:SuS@ jr;SqSA jr<SvSB jr=SqSC jr>        SwSD jr?SxSE jr@SqSF jrASqSG jrBSqSH jrC          SySI jrDSzSJ jrESqSK jrFSqSL jrGSqSM jrH      S{SN jrIS|SO jrJS|SP jrKS}SQ jrLSqSR jrMS~SS jrNSqST jrOSqSU jrPSSV jrQ          SSW jrRSSX jrS          SSY jrT      SSZ jrU\VSS[ j5       rW\VSS\ j5       rX\VSS] j5       rY\VSS^ j5       rZ\VSS_ j5       r[\VSS` j5       r\Sar]g)r<   iI  )EvalSeries[EagerDataFrameT, EagerSeriesT]_calldict[str, Any]_call_kwargsN)call_kwargsc                   g rB   rC   )
rE   calldepthr  evaluate_output_namesalias_output_namesimplementationbackend_versionversionr  s
             rH   __init__EagerExpr.__init__P  s     rK   c                $    U R                  U5      $ rB   )r  rb   s     rH   rd   EagerExpr.__call__^  s    zz"~rK   c                    g rB   rC   rg   s    rH   rl    EagerExpr.__narwhals_namespace__a  s    HKrK   c                    g rB   rC   rg   s    rH   rh   EagerExpr.__narwhals_expr__d  rj   rK   c               Z    U " UUUUUUR                   UR                  UR                  US9	$ )N)r  r  r  r  r  r  r  r  rX   rZ   r[   )ro   funcr  r  r  r  rq   r  s           rH   _from_callableEagerExpr._from_callablef  s>     '"71"22#44$$#

 
	
rK   c                j   ^ U " U4S jSSU4S jS TR                   TR                  TR                  S9$ )Nc                
   > T/$ rB   rC   _dfseriess    rH   <lambda>(EagerExpr._from_series.<locals>.<lambda>  s    rK   r   r  c                   > TR                   /$ rB   r   r  s    rH   r  r    s    v{{mrK   )r  r  r  r  r  r  r  r  )ro   r  s    `rH   _from_seriesEagerExpr._from_series~  s8     "";#!11"33OO	
 		
rK   Freturns_scalarr  c          
         [        U R                  UUU=(       d    0 US9nU R                  UU R                  S-   U R                   SU 3U R
                  U R                  UU S9$ )ax  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.
    call_kwargs: non-expressifiable args which we may need to reuse in `agg` or `over`,
        such as `ddof` for `std` and `var`.
    expressifiable_args: keyword arguments to pass to function, which may
        be expressifiable (e.g. `nw.col('a').is_between(3, nw.col('b')))`).
)method_namer  r  expressifiable_args   ->r  r  r  r  r  rq   )r   _reuse_series_innerr  r  r  r]   r_   )rE   r  r  r  r  r  s         rH   _reuse_seriesEagerExpr._reuse_series  s}    , $$#)#)r 3
 ""++/!001K=A"&"="=#77# # 
 	
rK   r  c                   0 $ rB   rC   )rE   r  s     rH   _reuse_series_extra_kwargs$EagerExpr._reuse_series_extra_kwargs  s	     	rK   c                    [        US5      $ Nrh   hasattrro   objs     rH   _is_exprEagerExpr._is_expr      s/00rK   c          	     F   0 UEUR                  5        VVs0 s H.  u  pgX`R                  U5      (       a  UR                  U5      OU_M0     snnEn[        U40 U R	                  US9DUD6n	U " U5       V
s/ s H)  n
U(       a  U
R                  U	" U
5      5      OU	" U
5      PM+     nn
[        X/ 5      u  pU Vs/ s H  oR                  PM     sn[        U5      :w  a-  SU SU Vs/ s H  oR                  PM     sn 3n[        U5      eU$ s  snnf s  sn
f s  snf s  snf )Nr	  ztSafety assertion failed, please report a bug to https://github.com/narwhals-dev/narwhals/issues
Expression aliases: z
Series names: )
itemsr  _evaluate_exprr   r  _from_scalarr    r   rN  AssertionError)rE   rc   r  r  r  r  r   r   kwargsr  r  out_aliasessmsgs                   rH   r  EagerExpr._reuse_series_inner  sO   

 $7#<#<#>#>KD --2F2Fb''.EQ#>
 
--^-L
 
 r('
" 4BFv/vf~U" 	 '
 7tD
 CqFFC DM1''.i 0!25!6#Q&&#!6 79 
 !%%
-'

 ! "7s   5D60D:D'D
c           
        ^ ^^^ T R                  UUU U4S jT R                  S-   T R                   ST ST 3T R                  T R                  0 T R
                  ETET S9$ )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`.
    kwargs: keyword arguments to pass to function.
c           	     t   > T" U 5       Vs/ s H  n[        [        UT5      T5      " S0 TD6PM!     sn$ s  snf )NrC   )getattr)rc   r  r  r  rE   series_namespaces     rH   r  3EagerExpr._reuse_series_namespace.<locals>.<lambda>  s>    "2h&F (89;GQ&Q& s   &5r  r  .r  )r  r  r  r]   r_   r  )rE   r%  r  r  s   ````rH   _reuse_series_namespace!EagerExpr._reuse_series_namespace  st      "" ++/!0014D3EQ{mT"&"="=#7774,,77 # 
 	
rK   c                   ^  SU 4S jjn[        T 5      " UT R                  T R                  T R                  T R                  T R
                  T R                  T R                  T R                  S9	$ )Nc                Z   > / nT" U 5       H  nSUl         UR                  U5        M     U$ )NT)
_broadcastappend)rc   resultsresultrE   s      rH   r  !EagerExpr.broadcast.<locals>.func  s1    Gr($(!v& # NrK   r  r  r  r  r  r  r  r  )rc   r   rO   zlist[EagerSeriesT])	r  r  r  r]   r_   rZ   rX   r[   r  )rE   r  r  s   `  rH   r  EagerExpr.broadcast  sb    	 Dz++--"&"="=#77 11//MM))

 
	
rK   c                "    U R                  SUS9$ )Nr   )r   r  r   s     rH   r   EagerExpr.cast  s    !!&!66rK   c                "    U R                  SUS9$ )N__eq__r  r4  r  s     rH   r7  EagerExpr.__eq__      !!(%!88rK   c                "    U R                  SUS9$ )N__ne__r8  r4  r  s     rH   r<  EagerExpr.__ne__  r:  rK   c                "    U R                  SUS9$ )Nr  r8  r4  r  s     rH   r  EagerExpr.__ge__  r:  rK   c                "    U R                  SUS9$ )Nr  r8  r4  r  s     rH   r  EagerExpr.__gt__   r:  rK   c                "    U R                  SUS9$ )Nr  r8  r4  r  s     rH   r  EagerExpr.__le__#  r:  rK   c                "    U R                  SUS9$ )Nr  r8  r4  r  s     rH   r  EagerExpr.__lt__&  r:  rK   c                "    U R                  SUS9$ )Nrs  r8  r4  r  s     rH   rs  EagerExpr.__and__)      !!)5!99rK   c                "    U R                  SUS9$ )Nrw  r8  r4  r  s     rH   rw  EagerExpr.__or__,  r:  rK   c                "    U R                  SUS9$ )Nr{  r8  r4  r  s     rH   r{  EagerExpr.__add__/  rH  rK   c                "    U R                  SUS9$ )Nr~  r8  r4  r  s     rH   r~  EagerExpr.__sub__2  rH  rK   c                @    U R                  S5      R                  SUS9$ )Nliteral__rsub__r8  r   r  r  s     rH   rQ  EagerExpr.__rsub__5  !    zz)$22:U2KKrK   c                "    U R                  SUS9$ )Nr  r8  r4  r  s     rH   r  EagerExpr.__mul__8  rH  rK   c                "    U R                  SUS9$ )Nr  r8  r4  r  s     rH   r  EagerExpr.__truediv__;  s    !!-u!==rK   c                @    U R                  S5      R                  SUS9$ )NrP  __rtruediv__r8  rR  r  s     rH   rZ  EagerExpr.__rtruediv__>  s!    zz)$22>2OOrK   c                "    U R                  SUS9$ )Nr  r8  r4  r  s     rH   r  EagerExpr.__floordiv__A  s    !!.!>>rK   c                @    U R                  S5      R                  SUS9$ )NrP  __rfloordiv__r8  rR  r  s     rH   r_  EagerExpr.__rfloordiv__D  s!    zz)$22?%2PPrK   c                "    U R                  SUS9$ )Nr  r8  r4  r  s     rH   r  EagerExpr.__pow__G  rH  rK   c                @    U R                  S5      R                  SUS9$ )NrP  __rpow__r8  rR  r  s     rH   rd  EagerExpr.__rpow__J  rT  rK   c                "    U R                  SUS9$ )Nr  r8  r4  r  s     rH   r  EagerExpr.__mod__M  rH  rK   c                @    U R                  S5      R                  SUS9$ )NrP  __rmod__r8  rR  r  s     rH   ri  EagerExpr.__rmod__P  rT  rK   c                $    U R                  S5      $ )Nr  r4  rg   s    rH   r  EagerExpr.__invert__T      !!,//rK   c                "    U R                  SSS9$ )Nr   Tr	  r4  rg   s    rH   r   EagerExpr.null_countX  s    !!,t!DDrK   c                "    U R                  SSS9$ )Nr   Tr	  r4  rg   s    rH   r   EagerExpr.n_unique[  s    !!*T!BBrK   c                "    U R                  SSS9$ )Nr   Tr	  r4  rg   s    rH   r   EagerExpr.sum^      !!%!==rK   c                "    U R                  SSS9$ )Nr   Tr	  r4  rg   s    rH   r   EagerExpr.counta  s    !!'$!??rK   c                "    U R                  SSS9$ )Nr   Tr	  r4  rg   s    rH   r   EagerExpr.meand      !!&!>>rK   c                "    U R                  SSS9$ )Nr   Tr	  r4  rg   s    rH   r   EagerExpr.mediang  s    !!(4!@@rK   c               (    U R                  SSSU0S9$ )Nr   Tr   r  r4  r   s     rH   r   EagerExpr.stdj      !!%6SW.!YYrK   c               (    U R                  SSSU0S9$ )Nr   Tr   r  r4  r   s     rH   r   EagerExpr.varm  r~  rK   c                "    U R                  SSS9$ )Nr   Tr	  r4  rg   s    rH   r   EagerExpr.skewp  ry  rK   c                "    U R                  SSS9$ )Nr   Tr	  r4  rg   s    rH   r   EagerExpr.anys  rt  rK   c                "    U R                  SSS9$ )Nr   Tr	  r4  rg   s    rH   r   EagerExpr.allv  rt  rK   c                "    U R                  SSS9$ )Nr   Tr	  r4  rg   s    rH   r   EagerExpr.maxy  rt  rK   c                "    U R                  SSS9$ )Nr   Tr	  r4  rg   s    rH   r   EagerExpr.min|  rt  rK   c                "    U R                  SSS9$ )Nr   Tr	  r4  rg   s    rH   r   EagerExpr.arg_min      !!)D!AArK   c                "    U R                  SSS9$ )Nr   Tr	  r4  rg   s    rH   r   EagerExpr.arg_max  r  rK   c                "    U R                  SXS9$ )Nr>  )r<  r=  r4  r;  s      rH   r>  EagerExpr.clip  s!    
 !! " 
 	
rK   c                $    U R                  S5      $ )Nrz   r4  rg   s    rH   rz   EagerExpr.is_null  s    !!),,rK   c                $    U R                  S5      $ )Nr   r4  rg   s    rH   r   EagerExpr.is_nan  s    !!(++rK   c                $    U R                  SXUS9$ )Nr   )r   r   r   r4  r   s       rH   r   EagerExpr.fill_null  s#     !!uu " 
 	
rK   c                "    U R                  SUS9$ )Nr  r8  r4  r  s     rH   r  EagerExpr.is_in  s    !!'!77rK   c                $    U R                  S5      $ )Nr   r4  rg   s    rH   r   EagerExpr.arg_true  s    !!*--rK   c                `    U R                  5       nUR                  " U6 nU R                  SUS9$ )Nfilter)	predicate)rl   all_horizontalr  )rE   
predicatesplxr  s       rH   r  EagerExpr.filter  s6    ))+&&
3	!!(i!@@rK   c                $    U R                  S5      $ )Nr   r4  rg   s    rH   r   EagerExpr.drop_nulls  rm  rK   c               $    U R                  SXUS9$ )Nr   )r  r  r  r4  r  s       rH   r   EagerExpr.replace_strict  s#     !!#\ " 
 	
rK   c               "    U R                  SXS9$ )Nr  )r  r  r4  r  s      rH   r  EagerExpr.sort  s    !!&Z!WWrK   c                $    U R                  S5      $ )Nr~   r4  rg   s    rH   r~   EagerExpr.abs  s    !!%((rK   c                "    U R                  SSS9$ )Nr   F)maintain_orderr4  rg   s    rH   r   EagerExpr.unique  s    !!(5!AArK   c                $    U R                  S5      $ )Nr   r4  rg   s    rH   r   EagerExpr.diff      !!&))rK   c               $    U R                  SXX4S9$ )Nr.  )r   r+  r,  r-  r4  r*  s        rH   r.  EagerExpr.sample  s$     !!?O " 
 	
rK   c                   ^ ^ SU4S jjn[        T 5      " UU 4S jT R                  T R                  T R                  UT R                  T R
                  T R                  T R                  S9	$ )Nc                H   > [        U 5      S:w  a  SU  3n[        U5      eT/$ )Nr  z:Expected function with single output, found output names: )r   
ValueError)namesr   r   s     rH   r  +EagerExpr.alias.<locals>.alias_output_names  s-    5zQRSXRYZ o%6MrK   c                \   > T" U 5       Vs/ s H  oR                  T5      PM     sn$ s  snf rB   r   )rc   r  r   rE   s     rH   r  !EagerExpr.alias.<locals>.<lambda>  s"    bBvT*BBs   )r1  )r  r  rO   r  )r  r  r  r]   rZ   rX   r[   r  )rE   r   r  s   `` rH   r   EagerExpr.alias  s\    	 DzB++--"&"="=1 11//MM))

 
	
rK   c                $    U R                  S5      $ )Nr   r4  rg   s    rH   r   EagerExpr.is_unique      !!+..rK   c                $    U R                  S5      $ )Nr   r4  rg   s    rH   r   EagerExpr.is_first_distinct  s    !!"566rK   c                $    U R                  S5      $ )Nr   r4  rg   s    rH   r   EagerExpr.is_last_distinct  s    !!"455rK   c                &    U R                  SUUSS9$ )Nr2  T)r2  r3  r  r4  r1  s      rH   r2  EagerExpr.quantile  s(     !!'	 " 
 	
rK   c                "    U R                  SUS9$ )Nr   r   r4  r   s     rH   r   EagerExpr.head      !!&A!..rK   c                "    U R                  SUS9$ )Nr   r  r4  r   s     rH   r   EagerExpr.tail  r  rK   c                "    U R                  SUS9$ )Nr   )r   r4  r   s     rH   r   EagerExpr.round  s    !!'H!==rK   c                "    U R                  SSS9$ )Nr   Tr	  r4  rg   s    rH   r   EagerExpr.len  rt  rK   c                "    U R                  SXS9$ )Nrp  )r   ro  r4  rn  s      rH   rp  EagerExpr.gather_every  s    !!.A!EErK   c                $    U R                  S5      $ )Nr   r4  rg   s    rH   r   EagerExpr.mode  r  rK   c                $    U R                  S5      $ )Nr   r4  rg   s    rH   r   EagerExpr.is_finite  r  rK   c               &    U R                  SUUUS9$ )Nrd  r_  rY  r`  r4  r^  s       rH   rd  EagerExpr.rolling_mean  s&    !!##	 " 
 	
rK   c               (    U R                  SUUUUS9$ )Nrk  r_  rY  r`  r   r4  rg  s        rH   rk  EagerExpr.rolling_std  +     !!## " 
 	
rK   c               $    U R                  SXUS9$ )Nra  r  r4  r^  s       rH   ra  EagerExpr.rolling_sum!  s"    !!{TZ " 
 	
rK   c               (    U R                  SUUUUS9$ )Nrh  r  r4  rg  s        rH   rh  EagerExpr.rolling_var&  r  rK   c           	        ^ ^^ SUUU 4S jjnT R                  UT R                  S-   T R                  S-   T R                  T R                  T S9$ )Nc                   > T" U 5      nU Vs/ s H  o"R                   PM     nnU Vs/ s H  nT
" U5      PM     nn[        US   5      (       d&  [        5       =nby  UR                  US   5      (       a`  [	        TR                  5       R                  R                  TS9n[        XS5       VV	s/ s H  u  pU" U5      R                  U	5      PM     nnn	Tb   U Vs/ s H  oDR                  T5      PM     nnU$ s  snf s  snf s  sn	nf s  snf )Nr   )rq   )r   r"   r!   isscalarr   rl   _series
from_numpyzipr   r   )rc   input_series_listinput_seriesoutput_namesr  r/  npr  arrayoutput_namer6  r  rE   s             rH   r  #EagerExpr.map_batches.<locals>.func6  s
    $RBSTBS,--BSLT5FG5F6hv&5FFGfQi(( {"/BKKq	4J4J$//199DDd

 /2&.G.G* u%++K8.G   'BHI&++l3&IM UG
 Js   C;D 0#DDr  z->map_batches)r  r  r  r  rq   rc   r   rO   Sequence[EagerSeriesT])r  r  r  r]   r_   )rE   r6  r  r  s   ``` rH   r7  EagerExpr.map_batches1  sX    
	 	$ ""++/--?"&"="=#77 # 
 	
rK   c                    [        U 5      $ rB   )EagerExprCatNamespacerg   s    rH   rK  EagerExpr.catQ      $T**rK   c                    [        U 5      $ rB   )EagerExprDateTimeNamespacerg   s    rH   rH  EagerExpr.dtU  s    )$//rK   c                    [        U 5      $ rB   )EagerExprListNamespacerg   s    rH   rN  EagerExpr.listY      %d++rK   c                    [        U 5      $ rB   )EagerExprNameNamespacerg   s    rH   r   EagerExpr.name]  r  rK   c                    [        U 5      $ rB   )EagerExprStringNamespacerg   s    rH   rA  EagerExpr.stra      '--rK   c                    [        U 5      $ rB   )EagerExprStructNamespacerg   s    rH   rQ  EagerExpr.structe  r  rK   rC   )r  r  r  r  r  rA  r  EvalNames[EagerDataFrameT]r  r^   r  r8   r  rY   r  r9   r  dict[str, Any] | NonerO   r  r  )rO   z=EagerNamespace[EagerDataFrameT, EagerSeriesT, Self, Any, Any]r  )r  r  r  r  r  rA  r  r  r  r^   rq   r:   r  r  rO   r)   )r  r   rO   r)   )
r  rA  r  r  r  r  r  r   rO   r)   )r  r  rO   r  r  
Self | AnyrO   zTypeIs[Self])rc   r   r  rA  r  r  r  r  r  r  rO   r  )r%  z5Literal['cat', 'dt', 'list', 'name', 'str', 'struct']r  rA  r  r   rO   r)   r  r  )r  r  rO   r)   )r  zSelf | bool | AnyrO   r)   r  r  r  r  r  )r  r)   rO   r)   r  r  r  r  r  r  r  r  r  r  )r6  zCallable[[Any], Any]r  r  rO   r)   )rO   zEagerExprCatNamespace[Self])rO   z EagerExprDateTimeNamespace[Self])rO   zEagerExprListNamespace[Self])rO   zEagerExprNameNamespace[Self])rO   zEagerExprStringNamespace[Self])rO   zEagerExprStructNamespace[Self])^rP   rQ   rR   rS   r  r  rd   rl   rh   r  r  r  r  r  r  r  r(  r  r   r7  r<  r  r  r  r  rs  rw  r{  r~  rQ  r  r  rZ  r  r_  r  rd  r  ri  r  r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r>  rz   r   r   r  r   r  r   r   r  r~   r   r   r.  r   r   r   r   r2  r   r   r   r   rp  r   r   rd  rk  ra  rh  r7  r  rK  rH  rN  r   rA  rQ  rU   rC   rK   rH   r<   r<   I  s    54   .27 	
   : . ' )  + 
L	FL - .2
7
 	

 
  :
 .
 
 +
 

 
. 

 

   %-1%
%
 	%

 +%
  #%
 
%
T ).!%	
 1 1!! 	!
 ! $! ,! 
 !F
O
 
 	

 

:
.7999999:9::L:>P?Q:L:L0EC>@?AZZ?>>>>BB

C
 D
 
	
-,
&
 *
 	

 

8.A
0	
.	
 	

 1	
 
	
X)B*



 	


 

 

 



*/76

.H
	
//>>F*/
	
	
03	
=A	
IL	
		


	
	
03	
=A	
IL	
		

&
 1
 
	
@ + + 0 0 , , , , . . . .rK   r<   c                     \ rS rSr% \" 5       rS\S'   \" 5       rS\S'   \" 5       rS\S'   \" 5       r	S\S'   \" 5       r
S\S'   \" 5       rS\S'   \" 5       rS\S	'   \" 5       rS\S
'   \" 5       rS\S'   \" 5       rS\S'   \" 5       rS\S'   \" 5       rS\S'   \" 5       rS\S'   \SS j5       rSS jrSS jr\SS j5       rSrg)r=   ij  r&   r   r   r   r   r   r   r  r.  r7  r[  rp  r   rK  c                    [        US5      $ r  r  r  s     rH   r  LazyExpr._is_expr|  r  rK   c                   g rB   rC   )rE   r  s     rH   _with_callableLazyExpr._with_callable  r  rK   c                   g rB   rC   )rE   r  s     rH   _with_alias_output_names!LazyExpr._with_alias_output_names  s    CrK   c                    [        U 5      $ rB   )LazyExprNameNamespacerg   s    rH   r   LazyExpr.name  r  rK   rC   Nr  )r  zCallable[..., Any]rO   r)   )r  r^   rO   r)   )rO   zLazyExprNameNamespace[Self])rP   rQ   rR   rS   r&   r   r  r   r   r   r   r   r  r.  r7  r[  rp  r   rK  r  r  r  r  r  r   rU   rC   rK   rH   r=   r=   j  s      /0G_0.0G_0 / 1Ho1+-D/-+-D/-+-D/-+-D/--/FO/#2#4K4 / 1Ho1$3$5L/5&5&7NO7*,C,1 1 GO+ +rK   r=   c                  4    \ rS rSr% S\S'   \SS j5       rSrg)_ExprNamespacei  r   _compliant_exprc                    U R                   $ rB   r  rg   s    rH   	compliant_ExprNamespace.compliant  s    ###rK   rC   NrO   r   )rP   rQ   rR   rS   r  r  r  rU   rC   rK   rH   r  r    s     '&$ $rK   r  c                      \ rS rSrSS jrSrg)EagerExprNamespacei  c                   Xl         g rB   r  rE   exprs     rH   r  EagerExprNamespace.__init__      #rK   r  N)r!  r   rO   r  rP   rQ   rR   rS   r  rU   rC   rK   rH   r  r        $rK   r  c                      \ rS rSrSS jrSrg)LazyExprNamespacei  c                   Xl         g rB   r  r   s     rH   r  LazyExprNamespace.__init__  r#  rK   r  N)r!  r   rO   r  r$  rC   rK   rH   r'  r'    r%  rK   r'  c                      \ rS rSrSS jrSrg)r  i  c                :    U R                   R                  SS5      $ )NrK  get_categoriesr  r(  rg   s    rH   r,  $EagerExprCatNamespace.get_categories  s    ~~55e=MNNrK   rC   NrO   r   )rP   rQ   rR   rS   r,  rU   rC   rK   rH   r  r    s    OrK   r  c                      \ rS rSrSS jrSS jrSS jrSS jrSS jrSS jr	SS jr
SS	 jrSS
 jrSS jrSS jrSS jrSS jrSS jrSS jrSS jrSS jrSS jrSS jrSS jrSS jrSrg)r  i  c                8    U R                   R                  SSUS9$ )NrH  	to_stringformatr-  rE   r4  s     rH   r2  $EagerExprDateTimeNamespace.to_string  s    ~~55dKPV5WWrK   c                8    U R                   R                  SSUS9$ )NrH  replace_time_zone	time_zoner-  rE   r:  s     rH   r8  ,EagerExprDateTimeNamespace.replace_time_zone  &    ~~55% 6 
 	
rK   c                8    U R                   R                  SSUS9$ )NrH  convert_time_zoner9  r-  r;  s     rH   r?  ,EagerExprDateTimeNamespace.convert_time_zone  r=  rK   c                8    U R                   R                  SSUS9$ )NrH  	timestamp)	time_unitr-  )rE   rC  s     rH   rB  $EagerExprDateTimeNamespace.timestamp  s%    ~~55+ 6 
 	
rK   c                :    U R                   R                  SS5      $ )NrH  dater-  rg   s    rH   rF  EagerExprDateTimeNamespace.date      ~~55dFCCrK   c                :    U R                   R                  SS5      $ )NrH  yearr-  rg   s    rH   rJ  EagerExprDateTimeNamespace.year  rH  rK   c                :    U R                   R                  SS5      $ )NrH  monthr-  rg   s    rH   rM   EagerExprDateTimeNamespace.month  s    ~~55dGDDrK   c                :    U R                   R                  SS5      $ )NrH  dayr-  rg   s    rH   rP  EagerExprDateTimeNamespace.day  s    ~~55dEBBrK   c                :    U R                   R                  SS5      $ )NrH  hourr-  rg   s    rH   rS  EagerExprDateTimeNamespace.hour  rH  rK   c                :    U R                   R                  SS5      $ )NrH  minuter-  rg   s    rH   rV  !EagerExprDateTimeNamespace.minute      ~~55dHEErK   c                :    U R                   R                  SS5      $ )NrH  secondr-  rg   s    rH   rZ  !EagerExprDateTimeNamespace.second  rX  rK   c                :    U R                   R                  SS5      $ )NrH  millisecondr-  rg   s    rH   r]  &EagerExprDateTimeNamespace.millisecond      ~~55dMJJrK   c                :    U R                   R                  SS5      $ )NrH  microsecondr-  rg   s    rH   ra  &EagerExprDateTimeNamespace.microsecond  r_  rK   c                :    U R                   R                  SS5      $ )NrH  
nanosecondr-  rg   s    rH   rd  %EagerExprDateTimeNamespace.nanosecond  s    ~~55dLIIrK   c                :    U R                   R                  SS5      $ )NrH  ordinal_dayr-  rg   s    rH   rg  &EagerExprDateTimeNamespace.ordinal_day  r_  rK   c                :    U R                   R                  SS5      $ )NrH  weekdayr-  rg   s    rH   rj  "EagerExprDateTimeNamespace.weekday  s    ~~55dIFFrK   c                :    U R                   R                  SS5      $ )NrH  total_minutesr-  rg   s    rH   rm  (EagerExprDateTimeNamespace.total_minutes      ~~55dOLLrK   c                :    U R                   R                  SS5      $ )NrH  total_secondsr-  rg   s    rH   rq  (EagerExprDateTimeNamespace.total_seconds  ro  rK   c                :    U R                   R                  SS5      $ )NrH  total_millisecondsr-  rg   s    rH   rt  -EagerExprDateTimeNamespace.total_milliseconds      ~~55d<PQQrK   c                :    U R                   R                  SS5      $ )NrH  total_microsecondsr-  rg   s    rH   rx  -EagerExprDateTimeNamespace.total_microseconds  rv  rK   c                :    U R                   R                  SS5      $ )NrH  total_nanosecondsr-  rg   s    rH   r{  ,EagerExprDateTimeNamespace.total_nanoseconds  s    ~~55d<OPPrK   rC   N)r4  rA  rO   r   )r:  
str | NonerO   r   )r:  rA  rO   r   )rC  r7   rO   r   r/  )rP   rQ   rR   rS   r2  r8  r?  rB  rF  rJ  rM  rP  rS  rV  rZ  r]  ra  rd  rg  rj  rm  rq  rt  rx  r{  rU   rC   rK   rH   r  r    s}    X





DDECDFFKKJKGMMRRQrK   r  c                      \ rS rSrSS jrSrg)r  i  c                :    U R                   R                  SS5      $ )NrN  r   r-  rg   s    rH   r   EagerExprListNamespace.len  s    ~~55feDDrK   rC   Nr/  )rP   rQ   rR   rS   r   rU   rC   rK   rH   r  r    s    ErK   r  c                      \ rS rSrSS jrSS jrSS jrSS jrSS jrSS jr	\
SS j5       rS	S
.     SS jjrSrg)CompliantExprNameNamespacei  c                $    U R                  S SS9$ )Nc                    U $ rB   rC   r  s    rH   r  1CompliantExprNameNamespace.keep.<locals>.<lambda>  s    rK   Fr  r  rg   s    rH   keepCompliantExprNameNamespace.keep  s    ""#4E"BBrK   c                $    U R                  U5      $ rB   r  )rE   r6  s     rH   mapCompliantExprNameNamespace.map  s    ""8,,rK   c                .   ^ U R                  U4S j5      $ )Nc                   > T U  3$ rB   rC   )r   prefixs    rH   r  3CompliantExprNameNamespace.prefix.<locals>.<lambda>  s    6(4&0ArK   r  rE   r  s    `rH   r  !CompliantExprNameNamespace.prefix      ""#ABBrK   c                .   ^ U R                  U4S j5      $ )Nc                   > U  T 3$ rB   rC   )r   suffixs    rH   r  3CompliantExprNameNamespace.suffix.<locals>.<lambda>  s    4&0ArK   r  rE   r  s    `rH   r  !CompliantExprNameNamespace.suffix  r  rK   c                @    U R                  [        R                  5      $ rB   )r  rA  lowerrg   s    rH   to_lowercase'CompliantExprNameNamespace.to_lowercase      ""399--rK   c                @    U R                  [        R                  5      $ rB   )r  rA  upperrg   s    rH   to_uppercase'CompliantExprNameNamespace.to_uppercase  r  rK   c                  ^  SU 4S jjnU$ )Nc               @   > U  Vs/ s H  nT" U5      PM     sn$ s  snf rB   rC   )r  r   r  s     rH   fn:CompliantExprNameNamespace._alias_output_names.<locals>.fn  s    +78<4DJ<888s   )r  r  rO   r  rC   )r  r  s   ` rH   r_   .CompliantExprNameNamespace._alias_output_names
  s    	9 	rK   Tr  c                  g rB   rC   )rE   r  r   s      rH   r  )CompliantExprNameNamespace._from_callable  s    rK   rC   Nr  )r6  r   rO   r   )r  rA  rO   r   )r  rA  rO   r   )r  r   rO   r   )r  r   r   r  rO   r   )rP   rQ   rR   rS   r  r  r  r  r  r  staticmethodr_   r  rU   rC   rK   rH   r  r    s^    
C-CC..   48  ,0 	   rK   r  c                  &    \ rS rSrSS.SS jjrSrg)r  i  Tr  c                ^^ U R                   m[        T5      " UU4S jTR                  TR                  TR                  U(       a  U R                  T5      OS TR                  TR                  TR                  TR                  S9	$ )Nc           	        > [        T" U 5      TR                  U 5      5       VVs/ s H  u  pUR                  T" U5      5      PM     snn$ s  snnf rB   )r  r]   r   )rc   r  r   r!  r  s      rH   r  7EagerExprNameNamespace._from_callable.<locals>.<lambda>  sH    $'R$2M2Mb2Q$R$RLF T$Z($R s   #Ar1  )
r  r  r  r  r]   r_   rZ   rX   r[   r  )rE   r  r   r!  s    ` @rH   r  %EagerExprNameNamespace._from_callable  sq    ~~Dz ++--"&"="=AFt77=D 11//MM))
 	
rK   rC   N)r  r   r   r  rO   r   rP   rQ   rR   rS   r  rU   rC   rK   rH   r  r    s    
 CG 
 
rK   r  c                  &    \ rS rSrSS.SS jjrSrg)r  i-  Tr  c              p    U R                   nU(       a  U R                  U5      OS nUR                  U5      $ rB   )r  r_   r  )rE   r  r   r!  r  s        rH   r  $LazyExprNameNamespace._from_callable2  s0    ~~9>t//5D,,\::rK   rC   N)r  r   r   r  rO   r   r  rC   rK   rH   r  r  -  s    
 CG ; ;rK   r  c                      \ rS rSrSS jrSS jrSS jrSS jrSS jrSS jr	SS jr
SS	 jrSS
 jrSS jrSS jrSS jrSrg)r  i8  c                :    U R                   R                  SS5      $ )NrA  	len_charsr-  rg   s    rH   r  "EagerExprStringNamespace.len_chars;  s    ~~55e[IIrK   c          	     :    U R                   R                  SSXX4S9$ )NrA  replace)patternr   rP  r   r-  )rE   r  r   rP  r   s        rH   r   EagerExprStringNamespace.replace>  s'    ~~559gG 6 
 	
rK   c               :    U R                   R                  SSXUS9$ )NrA  replace_all)r  r   rP  r-  )rE   r  r   rP  s       rH   r  $EagerExprStringNamespace.replace_allC  s'    ~~55=' 6 
 	
rK   c                8    U R                   R                  SSUS9$ )NrA  strip_chars)
charactersr-  )rE   r  s     rH   r  $EagerExprStringNamespace.strip_charsH  s%    ~~55=Z 6 
 	
rK   c                8    U R                   R                  SSUS9$ )NrA  starts_with)r  r-  r  s     rH   r  $EagerExprStringNamespace.starts_withM      ~~55e]SY5ZZrK   c                8    U R                   R                  SSUS9$ )NrA  	ends_with)r  r-  r  s     rH   r  "EagerExprStringNamespace.ends_withP  s    ~~55e[QW5XXrK   c               8    U R                   R                  SSXS9$ )NrA  contains)r  rP  r-  )rE   r  rP  s      rH   r  !EagerExprStringNamespace.containsS  s%    ~~55:w 6 
 	
rK   c                8    U R                   R                  SSXS9$ )NrA  slice)ro  lengthr-  )rE   ro  r  s      rH   r  EagerExprStringNamespace.sliceX  s%    ~~5576 6 
 	
rK   c                8    U R                   R                  SSUS9$ )NrA  split)byr-  )rE   r  s     rH   r  EagerExprStringNamespace.split]  s    ~~55eW5LLrK   c                8    U R                   R                  SSUS9$ )NrA  to_datetimer3  r-  r5  s     rH   r  $EagerExprStringNamespace.to_datetime`  r  rK   c                :    U R                   R                  SS5      $ )NrA  r  r-  rg   s    rH   r  %EagerExprStringNamespace.to_lowercasec      ~~55e^LLrK   c                :    U R                   R                  SS5      $ )NrA  r  r-  rg   s    rH   r  %EagerExprStringNamespace.to_uppercasef  r  rK   rC   Nr/  )
r  rA  r   rA  rP  r  r   r  rO   r   )r  rA  r   rA  rP  r  rO   r   )r  r}  rO   r   )r  rA  rO   r   )r  rA  rO   r   )r  rA  rP  r  rO   r   )ro  r  r  r  rO   r   )r  rA  rO   r   )r4  r}  rO   r   )rP   rQ   rR   rS   r  r  r  r  r  r  r  r  r  r  r  r  rU   rC   rK   rH   r  r  8  sE    J





[Y



M[MMrK   r  c                      \ rS rSrSS jrSrg)r  ij  c                V    U R                   R                  SSUS9R                  U5      $ )NrQ  fieldr  )r  r(  r   r   s     rH   r  EagerExprStructNamespace.fieldm  s.    ~~55hd5SYY
 	
rK   rC   N)r   rA  rO   r   )rP   rQ   rR   rS   r  rU   rC   rK   rH   r  r  j  s    
rK   r  )X
__future__r   sys	functoolsr   operatorr   typingr   r   r   r	   r
   r   r   r   !narwhals._compliant.any_namespacer   r   r   r   r   r   narwhals._compliant.namespacer   narwhals._compliant.typingr   r   r   r   r   r   r   r   r   r   r   narwhals._expression_parsingr    narwhals.dependenciesr!   r"   narwhals.dtypesr#   narwhals.utilsr$   r%   r&   version_info
Protocol38typing_extensionsr)   r*   r+   narwhals._compliant.seriesr,   r-   r.   r/   r0   narwhals.typingr1   r2   r3   r4   r5   r6   r7   r8   r9   r:   __all__r>   r;   r  r<   r=   r  r  r'  r  r  r  r  r  r  r  r  rC   rK   rH   <module>r     s   " 
  !          : ? ; ; = = < 0 1 8 6 : F 6 1 3 0 2 J + 0 ! + % *
6!10 .&(@<:54559%00.*:/(-&+
B8 8E@J0OOP E@P#b/#BBC ??@#bL^.o|34,-^.B+%{23"K/0+<$&'2C)D$$
3WZ5H $
$y1793E $
Oz"L$<gj>QOFQz"$5j$A7:CVFQREz"M*$=wz?RE  $%#$  F
z"z*J
.;i y)I;/Mz"OJ$?AT/Md
z"OJ$?AT
rK   