L i~,ddlmZddlZddlmZmZmZmZm Z ddl m Z ddl m Z mZmZmZmZddlmZddlmZmZddlmZdd lmZmZmZmZer0dd lmZdd l m!Z!dd l m Z mZdd l"m#Z#ddl$m%Z%ddl&m'Z'ddl(m)Z)m*Z*m+Z+Gdde eefe eefZ,y)) annotationsN) TYPE_CHECKINGAnyCallableLiteralProtocol)LazyExpr) AliasNames EvalNames EvalSeries NativeExprTWindowFunction) WindowInputs)combine_alias_output_namescombine_evaluate_output_names) SQLLazyFrameT)ImplementationVersion extend_boolnot_implemented)Sequence)Self)r r)SQLExprDateTimeNamesSpace)SQLExprStringNamespace) SQLNamespace)ModeKeepStrategy PythonLiteral RankMethodceZdZUded<ded<ded<ded<d ed <d ed < diej d djdZdkdZ dldZ dmdZ dndZ dodZ di dpdZ dqdZ drdZdsdZedtdZdudZdvdZdwdZdxdZdydZdydZ di dzd Z d{d d d! d|d"Z d}d#Z di d~d$Zedd%Zedd&Ze dd'Zdd(Z dd)Z!dd*Z"dd+Z#dd,Z$dd-Z%dd.Z&dd/Z'dd0Z(dd1Z)dd2Z*dd3Z+dd4Z,dd5Z-dd6Z.dd7Z/dd8Z0dd9Z1dd:Z2dd;Z3dd<Z4dd=Z5dd>Z6dd?Z7dd@Z8ddAZ9ddBZ:ddCZ;ddDZddGZ?ddHZ@ddIZAddJZBddKZCddLZDddMZEddNZFddOZGddPZHddQZIddRZJddSZKddTZLddUZMddVZNddWZOddXZPddYZQddZZR dd[ZS dd\ZTdd]ZUdd^ZVdd_ZWdd`ZXddaZYddbZZddcZ[dddZ\ ddeZ]ddfZ^eddgZ_eddhZ`eaZbeaZceaZdy )SQLExpr&EvalSeries[SQLLazyFrameT, NativeExprT]_callEvalNames[SQLLazyFrameT]_evaluate_output_namesAliasNames | None_alias_output_namesr_versionr_implementation1WindowFunction[SQLLazyFrameT, NativeExprT] | None_window_functionN)implementationcyN)selfcallwindow_functionevaluate_output_namesalias_output_namesversionr+s X/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/narwhals/_sql/expr.py__init__zSQLExpr.__init__*sc$|j|Sr-)r")r/dfs r5__call__zSQLExpr.__call__5szz"~r7cyr-r.r/s r5__narwhals_namespace__zSQLExpr.__narwhals_namespace__8s>Ar7c dfd }|S)Nc|}jDcic]\}}||j|}}}|Dcgc] }|fi| c}Scc}}wcc}wr-)items_evaluate_single_output_expr) r9native_series_listkeyvalueother_native_series native_seriesr0expressifiable_argsr/s r5funcz.SQLExpr._callable_to_eval_series..func?s|!%b #6";";"=#CR44U;;# # &8!]:&9:  #s AA)r9rreturnzlist[NativeExprT]r.)r/r0rGrHs``` r5_callable_to_eval_seriesz SQLExpr._callable_to_eval_series<s  r7c ( dfd }|S)Nc  j||}jDcic]\}}||j||}}}|Dcgc] }|fi| c}Scc}}wcc}wr-)r1r@_evaluate_window_expr) r9 window_inputsrBrCrDrErFr0rGr/s r5window_fz4SQLExpr._push_down_window_function..window_fOs"&!5!5b-!H #6";";"=#CR--e]CC# # &8!]:&9:  #s A A$r9rrNWindowInputs[NativeExprT]rISequence[NativeExprT]r.)r/r0rGrOs``` r5_push_down_window_functionz"SQLExpr._push_down_window_functionLs'  .G  " $r7c|j|j||j|j|j|j SNr2r3r4r+) __class__r"r$r&r'r()r/r1s r5_with_window_functionzSQLExpr._with_window_functioncsF~~ JJ "&"="=#77MM//   r7c |j|j|fi|||j|j|j|j SrU)rWrJr$r&r'r()r/r0 window_funcrGs r5_with_callablezSQLExpr._with_callableosU~~ )D ) )$ F2E F "&"="=#77MM//   r7c |j|j|fi||j|fi||j|j|j |j SrUrWrJrSr$r&r'r()r/r0rGs r5_with_elementwisezSQLExpr._with_elementwisesh~~ )D ) )$ F2E F +D + +D H4G H"&"="=#77MM//   r7c|j|j|||j|||j|j|j |j S)NotherrVr])r/opras r5 _with_binaryzSQLExpr._with_binarys`~~  ) )"E ) :  + +Be + <"&"="=#77MM//   r7c|jdn nfd}t||j|j|j||j |j S)Nc |Sr-r.) output_namescurrent_alias_output_namesrHs r5z2SQLExpr._with_alias_output_names..sd+El+S&Tr7rV)r&typer"r*r$r'r()r/rHr3rgs ` @r5_with_alias_output_namesz SQLExpr._with_alias_output_namessq%)%=%="| *1T tDz JJ  ! !"&"="=1MM//   r7c< dfd }jxs|S)Nc|jrJ|Dcgc]}j||j c}Scc}wr-)order_by_window_expression partition_byr9inputsexprr/s r5default_window_funcz4SQLExpr.window_function..default_window_funcsG &&OSTVxGK''f.A.AB s#Ar9rrqrQrIrR)r*)r/rss` r5r1zSQLExpr.window_functions4  '@  " $$;(;;r7cD|jj|g|Sr-)r= _function)r/nameargss r5rvzSQLExpr._functions#6t**,66tCdCCr7c@|jj|Sr-)r=_lit)r/rDs r5rzz SQLExpr._lits**,11%88r7c<|jj|Sr-)r= _coalesce)r/rrs r5r|zSQLExpr._coalesces6t**,66==r7cyr-r.r<s r5 _count_starzSQLExpr._count_starr7cyr-r.r/rrrms r5_firstzSQLExpr._firstrr7cyr-r.rs r5_lastz SQLExpr._lastrr7cD|jj|||Sr-)r=_when)r/ conditionrD otherwises r5rz SQLExpr._whens" **,229eYOOr7 descending nulls_lastcyr-r.)r/rrrorm rows_startrows_endrrs r5rnzSQLExpr._window_expressionsr7c( dfd }|S)Nc,tt|j}|Dcgc]^}jj d|j j ||j |j||d`c}Scc}w)Nisnullrrrr)rlenrmrrvrnro)r9rqflagsrr func_namereverser/s r5rHz&SQLExpr._cum_window_func..funcs V__)=>E!H  ^^Hd33++y$7++#(#(!" ,    sA#Brtr.)r/rrrHs``` r5_cum_window_funczSQLExpr._cum_window_funcs'  '@  " & r7c gd |r|dz dz}|dz dz}||z | n|dz d d  fd }|S)N)summeanstdvarrc dvr}n\dk(rdk(rd}nOdvrdk(rd}nCdk(rdk(rd}n6dk(rdk(rd }n)d vrd d }t|d dd }t||j|j d} |Dcgc]h} j j j d|fi| j k\ j j ||fi|jc}Scc}w)N>rrrrvar_poprvar_sampr stddev_pop stddev_samp>rrz;Only ddof=0 and ddof=1 are currently supported for rolling_.z,Only the following functions are supported: z. Got: )rormrrcount) ValueErrorrormrrnrvrz) r9rqfunc_msg window_kwargsrrddofendr min_samplesr/startsupported_funcss r5rHz*SQLExpr._rolling_window_func..funcsMO+&e# !e# "e# $e# %n,ST]S^^_` o%D_DUU]^g]hhij o% & 3 3"OO# "M!H  +D++w59Fyy-.,D++DNN5$,GY=Y    s A-C:rtr.) r/r window_sizerrcenterhalf remainderrHrrrs `` `` @@@r5_rolling_window_funczSQLExpr._rolling_window_funcsv8 !O)D$qA-IY&'EC!Ao&EC" " '@"  "" " H r7c6|jjSr-)r(_backend_versionr<s r5rzSQLExpr._backend_version%s##4466r7cyr-r.)clsrrrws r5 _alias_nativezSQLExpr._alias_native)sLOr7cdfd } dfd }d}|||tt|j|jS)Nc \Dcgc]}||D]}|c}}gScc}}wr-r.)r9rreexprsrHs r5r0z5SQLExpr._from_elementwise_horizontal_op..call0s/@tBx@!!@!@AB B@s( crDcgc]}|j||D]}|}}}|gScc}}wr-)r1)r9rNrrrlstrrHs r5r1z@SQLExpr._from_elementwise_horizontal_op..window_function3sC"'X0D0DR0WX11X1XCXI; Ys 3r)r1r2r3r4r+r9rrIrRrP)rrr'r()rrHrr0r1contexts `` r5_from_elementwise_horizontal_opz'SQLExpr._from_elementwise_horizontal_op,sf C  .G  "  ( +"?"G95A$$"22   r7cJ|jjjS)a Return `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(). ) _metadataexpansion_kindis_multi_unnamedr<s r5_is_multi_output_unnamedz SQLExpr._is_multi_output_unnamedCs~~,,==??r7c(|jd|S)Nc$|j|Sr-)__eq__rrras r5rhz SQLExpr.__eq__..RT[[5Gr7rcr/ras r5rzSQLExpr.__eq__Q  !GOOr7c(|jd|S)Nc$|j|Sr-)__ne__rs r5rhz SQLExpr.__ne__..Urr7rrs r5rzSQLExpr.__ne__Trr7c(|jd|S)Nc$|j|Sr-)__add__rs r5rhz!SQLExpr.__add__..XT\\%5Hr7rrs r5rzSQLExpr.__add__W  !H%PPr7c(|jd|S)Nc$|j|Sr-)__sub__rs r5rhz!SQLExpr.__sub__..[rr7rrs r5rzSQLExpr.__sub__Zrr7cF|jd|jdS)Nc ||z Sr-r.rs r5rhz"SQLExpr.__rsub__..^ UT\r7literalrcaliasrs r5__rsub__zSQLExpr.__rsub__]"  !A5IOOPYZZr7c(|jd|S)Nc$|j|Sr-)__mul__rs r5rhz!SQLExpr.__mul__..arr7rrs r5rzSQLExpr.__mul__`rr7c(|jd|S)Nc$|j|Sr-) __truediv__rs r5rhz%SQLExpr.__truediv__..dsT5E5Ee5Lr7rrs r5rzSQLExpr.__truediv__cs  !LeTTr7cF|jd|jdS)Nc ||z Sr-r.rs r5rhz&SQLExpr.__rtruediv__..grr7rrrs r5 __rtruediv__zSQLExpr.__rtruediv__frr7c(|jd|S)Nc$|j|Sr-)__pow__rs r5rhz!SQLExpr.__pow__..jrr7rrs r5rzSQLExpr.__pow__irr7cF|jd|jdS)Nc ||zSr-r.rs r5rhz"SQLExpr.__rpow__..ms UD[r7rrrs r5__rpow__zSQLExpr.__rpow__ls!  !@%HNNyYYr7c(|jd|S)Nc$|j|Sr-)__mod__rs r5rhz!SQLExpr.__mod__..prr7rrs r5rzSQLExpr.__mod__orr7cF|jd|jdS)Nc ||zSr-r.rs r5rhz"SQLExpr.__rmod__..srr7rrrs r5__rmod__zSQLExpr.__rmod__rrr7c(|jd|S)Nc$|j|Sr-)__ge__rs r5rhz SQLExpr.__ge__..vrr7rrs r5rzSQLExpr.__ge__urr7c(|jd|S)Nc$|j|Sr-)__gt__rs r5rhz SQLExpr.__gt__..yrr7rrs r5rzSQLExpr.__gt__xrr7c(|jd|S)Nc$|j|Sr-)__le__rs r5rhz SQLExpr.__le__..|rr7rrs r5rzSQLExpr.__le__{rr7c(|jd|S)Nc$|j|Sr-)__lt__rs r5rhz SQLExpr.__lt__..rr7rrs r5rzSQLExpr.__lt__~rr7c(|jd|S)Nc$|j|Sr-)__and__rs r5rhz!SQLExpr.__and__..rr7rrs r5rzSQLExpr.__and__rr7c(|jd|S)Nc$|j|Sr-)__or__rs r5rhz SQLExpr.__or__..rr7rrs r5rzSQLExpr.__or__rr7c6dfd }j||S)Ncj|jdk7tj||jdSNrrrzrbfloordivrrrar/s r5rHz"SQLExpr.__floordiv__..funcs;::1%r{{4'?4 r7r`rrr rar rIr rr/rarHs` r5 __floordiv__zSQLExpr.__floordiv__s     U 33r7cTdfd }j||jdS)Ncj|jdk7tj||jdSr r rs r5rHz#SQLExpr.__rfloordiv__..funcs;:: ! $bkk%&> $ r7r`rrrrs` r5 __rfloordiv__zSQLExpr.__rfloordiv__s+    U 399)DDr7cLdfd } dfd }j||S)Ncfjjd|jdSNbool_andTr|rvrzrrr/s r5fzSQLExpr.all..fs'>>$..T"BDIIdOT Tr7c |Dcgc]M}jjjd||jj dOc}Scc}wrr|rnrvrorzrps r5rOzSQLExpr.all..window_fse!H ++z48&:M:MIIdO  AA!rrr rIr rtr[r/rrOs` r5allz SQLExpr.all; U  '@  " ""1h//r7cLdfd } dfd }j||S)Ncfjjd|jdSNbool_orFrrs r5rzSQLExpr.any..fs(>>$..D"A499UCST Tr7c |Dcgc]M}jjjd||jj dOc}Scc}wr&rrps r5rOzSQLExpr.any..window_fsf!H ++y$79L9LIIe$  rrrtr r!s` r5anyz SQLExpr.anyr#r7c,jfdS)Nc(jd|S)Nmaxrvrs r5rhzSQLExpr.max..ud0Kr7r r<s`r5r,z SQLExpr.max""#KLLr7c,jfdS)Nc(jd|S)Nrr-rs r5rhzSQLExpr.mean..vt0Lr7r r<s`r5rz SQLExpr.means""#LMMr7c6dfd }j|S)Nc Fdk(rjd|Sdk(rjd|Sjd|}tjjd|jdtj|dtj|z S)Nrrrrrsqrtrvrbmulsubrr n_samplesrr/s r5rHzSQLExpr.std..funcsqy~~lD99qy~~mT::w5I66}d3vy!(<yRV@W'WX r7rr r/rrHs`` r5rz SQLExpr.std ""4((r7c6dfd }j|S)Nc&dk(rjd|Sdk(rjd|Sjd|}tjjd|tj|dtj|z S)Nrrrrrr6r9s r5rHzSQLExpr.var..funcsqy~~i66qy~~j$77w5I66z40y!$rvvi'>> r7rr r;s`` r5rz SQLExpr.varr<r7c,jfdS)Nc(jd|S)Nmedianr-rs r5rhz SQLExpr.median..sx0Nr7r r<s`r5rAzSQLExpr.medians""#NOOr7c6dfd }j|S)Nchjjd|j|S)Nisnan)rrvrz)rrr/rDs r5 _fill_nanz#SQLExpr.fill_nan.._fill_nans*::dnnWd;TYYu=MtT Tr7rr^)r/rDrEs`` r5fill_nanzSQLExpr.fill_nans U%%i00r7c,jfdS)Nc(jd|S)Nminr-rs r5rhzSQLExpr.min..r.r7r r<s`r5rJz SQLExpr.minr/r7c,jfdS)Nc(jd|S)Nrr-rs r5rhzSQLExpr.count..sw0Mr7r r<s`r5rz SQLExpr.counts""#MNNr7cLdfd } dfd }j||S)Ncfjjd|jdSNrrrrs r5rzSQLExpr.sum..fs'>>$.."=tyy|L Lr7c |jrJ|Dcgc]M}jjjd||jj dOc}Scc}wrO)rmr|rnrvrorzrps r5rOzSQLExpr.sum..window_fst &&!H ++ud3V5H5HIIaL  sAA/rrtr r!s` r5rz SQLExpr.sums; M  '@  " ""1h//r7cjjjdjdcdfd } dfd }j||S)Nrrc |tjd|djd|SNcount_distinctr,r)rbaddr)rrFoner/zeros r5rHzSQLExpr.n_unique..funcs=66"D)%Ah$5sDAB r7c|Dcgc]`}tjd||jdjd||jbc}Scc}wrS)rbrUror)r9rqrrrVWrWr/rXs r5rOz"SQLExpr.n_unique..window_fs{!H a($/1D1DE%Ah,=sD!IJ++   sA%A4rrt)rvrnrzr[)r/rHrOrVrZrWrXs` @@@@r5n_uniquezSQLExpr.n_uniquess NN  # #IIaL$))A, c    '@  "  ""422r7c,jfdS)Nc(jd|S)Nabsr-rs r5rhzSQLExpr.abs.. 4>>%3Nr7rFr<s`r5r^z SQLExpr.abs%%&NOOr7cH dfd }j|||S)NcLjdjd|||S)Ngreatestleastr-)rr lower_bound upper_boundr/s r5_clipzSQLExpr.clip.._clip#s*>>DNN7D+F  r7)rerf)rrr rer rfr rIr rF)r/rerfrgs` r5clipz SQLExpr.clip"sI  ,7 FQ   %% { &  r7c6dfd }j||S)Nc*jd||S)Nrcr-)rrrer/s r5rgz!SQLExpr.clip_lower.._clip/s>>*dK@ @r7)re)rrr rer rIr rF)r/rergs` r5 clip_lowerzSQLExpr.clip_lower.s! A%%e%EEr7c6dfd }j||S)Nc*jd||S)Nrdr-)rrrfr/s r5rgz!SQLExpr.clip_upper.._clip5s>>'4= =r7)rf)rrr rfr rIr rF)r/rfrgs` r5 clip_upperzSQLExpr.clip_upper4s  >%%e%EEr7c,jfdS)Nc(jd|S)Nrr-rs r5rhz!SQLExpr.is_null..;s4>>(D3Qr7rFr<s`r5is_nullzSQLExpr.is_null:s%%&QRRr7c0jfdS)NcHjd|jS)Nround)rvrz)rrdecimalsr/s r5rhzSQLExpr.round..?styy7JKr7rF)r/rus``r5rtz SQLExpr.round=s%% K  r7c,jfdS)Nc(jd|S)Nfloorr-rs r5rhzSQLExpr.floor..Cs4>>'43Pr7rFr<s`r5rxz SQLExpr.floorBs%%&PQQr7c,jfdS)Nc(jd|S)Nceilr-rs r5rhzSQLExpr.ceil..Fs4>>&$3Or7rFr<s`r5r{z SQLExpr.ceilEs%%&OPPr7c2dfd }j|S)Ncj|jdkjtdjd|S)Nrnanr5)rrzfloatrvrs r5_sqrtzSQLExpr.sqrt.._sqrtIsA::tyy|#TYYuU|%Z r7rrF)r/rs` r5r5z SQLExpr.sqrtHs  %%e,,r7c,jfdS)Nc(jd|S)Nexpr-rs r5rhzSQLExpr.exp..Qr_r7rFr<s`r5rz SQLExpr.expPr`r7c6dfd }j|S)Ncnj}j|jdkjtdj|jdk(jtdt j |d||djS)Nrr~z-inflog)rvrrzrrbtruediv)rrrVbaser/s r5_logzSQLExpr.log.._logTsA::tyy|# %,' DIIaL(IIeFm,JJq~q $/HI r7rrF)r/rrs`` r5rz SQLExpr.logSs %%d++r7cF|j|jd|S)NrrrXrr/rs r5cum_sumzSQLExpr.cum_sumc#))$*?*?w*?*WXXr7cF|j|jd|S)Nr,rrrs r5cum_maxzSQLExpr.cum_maxfrr7cF|j|jd|S)NrJrrrs r5cum_minzSQLExpr.cum_minirr7cB dfd }j|S)Nc tt|j}|Dcgc]=}jj d||j |j||d?c}Scc}w)Nrrr)rrrmrnrvro)r9rqrrrrr/s r5rHzSQLExpr.cum_count..funcmsy V__)=>E!H ''NN7D1''OO$$ (   sAA0rtrX)r/rrHs`` r5 cum_countzSQLExpr.cum_countls3  '@  "  ))$//r7cF|j|jd|S)Nproductrrrs r5cum_prodzSQLExpr.cum_prods())  ! !)W ! =  r7cJ|j|jd|||S)NrrrXrr/rrrs r5 rolling_sumzSQLExpr.rolling_sums,))  % %e[+f % U  r7cJ|j|jd|||S)Nrrrrs r5 rolling_meanzSQLExpr.rolling_means,))  % %fk;v % V  r7c L|j|jd||||S)Nrrrrr/rrrrs r5 rolling_varzSQLExpr.rolling_var5))  % %{Kd6 &   r7c L|j|jd||||S)Nrrrrs r5 rolling_stdzSQLExpr.rolling_stdrr7c> dfd }j|S)Nc j}j}|Dcgc];}tj|||d||j|j =c}Scc}wNlag)rvrnrbr8rorm)r9rqrVwindowrrr/s r5rHzSQLExpr.diff..funcscA,,F!HtVAeTNF4G4GYZ sAA'rtrr/rHs` r5diffz SQLExpr.diff3  '@  " ))$//r7cB dfd }j|S)Nc |Dcgc]:}jjd||j|j<c}Scc}wr)rnrvrorm)r9rqrrnr/s r5rHzSQLExpr.shift..funcsT!H ''NN5$2F4G4G s?Artr)r/rrHs`` r5shiftz SQLExpr.shifts3  '@  " ))$//r7c> dfd }j|S)Nc|Dcgc]O}jjdg|j||jj dk(Qc}Scc}w)N row_numberr)rnrvrormrzrps r5rHz'SQLExpr.is_first_distinct..funcsn!H ''NN<00f))040OO 99Q<   sAA#rtrrs` r5is_first_distinctzSQLExpr.is_first_distincts3  '@  " ))$//r7c> dfd }j|S)Nc tdt|j}|Dcgc]R}jj dg|j ||j||j dk(Tc}Scc}w)NTrrr)rrrmrnrvrorz)r9rqrrrr/s r5rHz&SQLExpr.is_last_distinct..funcs c&//&:;E!H ''NN<00f))040OO$$ (99Q<    sABrtrrs` r5is_last_distinctzSQLExpr.is_last_distincts3  '@  "  ))$//r7c> dfd }j|S)Nc |Dcgc]9}jj|g|j|j;c}Scc}wr-)rnrrmrorps r5rHzSQLExpr.first..funcsU!H ''DKK7v79L9L >A rtrrs` r5firstz SQLExpr.firstrr7c> dfd }j|S)Nc |Dcgc]9}jj|g|j|j;c}Scc}wr-)rnrrmrorps r5rHzSQLExpr.last..funcsU!H ''DJJt6foo68K8K rrtrrs` r5lastz SQLExpr.lastrr7cdvrjdn(dk(rjdnjd d d fd d fd } d fd }j||S) N>r,rJaveragerankdense dense_rankrc : j}||f|gdgd}dg||i} j} j} dk(rHtjtj | fi|||fi| j d}ny dk(rktj | fi|tjtj||fi| j d j d}n | fi|} j|d||S) NT)rormrrror,rrg@r) r~rnrvrbr8rUrzrr) rrror count_exprrcount_window_kwargsrrV rank_exprrHmethodr/s r5_rankzSQLExpr.rank.._ranks- ))+J ,!G)l#f -M 4BCX\CXSWCX2Y ,,FAFFFFt5}5zA-@AIIaL  9$FF41=1JJvjH4GH$))TU,W # #49=9 ::q400)< ._unpartitioned_rank&s*5 5r7c|jr d}t||Dcgc]}||jc}Scc}w)Nz[`rank` followed by `over` with `order_by` specified is not supported for SQL-like backends.r)rmNotImplementedErrorro)r9rqrrrrrr/s r5_partitioned_rankz'SQLExpr.rank.._partitioned_rank)sQs)#..!HdF//JG sA)r.)rrr roSequence[str | NativeExprT]rboolrIr rrt)rvr[)r/rrrrrrHs``` @@r5rz SQLExpr.ranks . .>>&)D w >>,/D>>,/D9;" =" =5" = " =  " =H 6  '@  " ""#68IJJr7c dfd dfd } dfd }j|j|S)Ncpjj|g|jdk(S)Nr)rnr~rz)rrror/s r5 _is_uniquez%SQLExpr.is_unique.._is_unique7s>**  "T$9L$91 r7c|Sr-r.)rrrs r5_unpartitioned_is_uniquez3SQLExpr.is_unique.._unpartitioned_is_unique>sd# #r7cx|jrJ|Dcgc]}|g|jc}Scc}wr-)rmro)r9rqrrrr/s r5_partitioned_is_uniquez1SQLExpr.is_unique.._partitioned_is_uniqueAs: &&GKBxPtJt:f&9&9:P PPs7)rrr rozstr | NativeExprTrIr rrt)r[rX)r/rrrs` @r5 is_uniquezSQLExpr.is_unique6sj  .?    $ Q Q'@ Q " Q ""#;<RR "  r7cdfd }j|jjjjS)Nc<j|tSr-)r1r)r9rmror/s r5rHzSQLExpr.over..funcOs''Lx,PQ Qr7rVr)rWr$r&r'r()r/rormrHs``` r5overz SQLExpr.overLsF R~~ "&"="=#77MM//   r7cr|dk7rd|djd}t|jfdS)Nr)z`Expr.mode(keep='z#')` is not implemented for backend z3 Hint: Use `nw.col(...).mode(keep='any')` instead.c(jd|S)Nmoder-rs r5rhzSQLExpr.mode..br2r7)r(rr[)r/keeprs` r5rz SQLExpr.modeZsP 5=#D6)LTMaMaLbcDD &c* *""#LMMr7cyr-r.r<s r5strz SQLExpr.stres36r7cyr-r.r<s r5dtz SQLExpr.dths58r7r-)r0r!r1r)r2r#r3r%r4rr+rrINoner)rIz3SQLNamespace[SQLLazyFrameT, Self, Any, NativeExprT])r0Callable[..., NativeExprT]rGrrIr!)r0rrGrrI*WindowFunction[SQLLazyFrameT, NativeExprT])r1rrIr)r0rrZr)rGrrIr)r0rrGrrIr)rbrrarrIr)rHr%rIr)rIr)rwrrxzNativeExprT | PythonLiteralrIr )rDrrIr r)rIr )rrr rmrrIr )rr rDr rzNativeExprT | NonerIr )r.r.NN)rrr rorrmrr int | NonerrrSequence[bool] | NonerrrIr )rz'Literal['sum', 'max', 'min', 'product']rrrIr) rz$Literal['sum', 'mean', 'std', 'var']rintrrrrrrrIr)rIztuple[int, ...])rrr rwrrIr )rHz*Callable[[list[NativeExprT]], NativeExprT]rrrIr)rIr)rarrIr)rIr)rrrIr)rDz float | NonerIr)rerrfrrIr)rerrIr)rfrrIr)rurrIr)rrrIr)rrrIr)rrrrrrrIr) rrrrrrrrrIr)rrrIr)rrrrrIr)rorrmz Sequence[str]rIr)rrrIr)rIzSQLExprStringNamespace[Self])rIzSQLExprDateTimeNamesSpace[Self])e__name__ __module__ __qualname____annotations__rDUCKDBr6r:r=rJrSrXr[r^rcrjpropertyr1rvrzr|r~rrrrnrrr classmethodrrrrrrrrrrrrrrrrrrrrrrrr"r)r,rrrrArGrJrrr[r^rhrkrnrqrtrxr{r5rrrrrrrrrrrrrrrrrrrrrrrr drop_nullsfilteruniquer.r7r5r r "s 1144**##GG NR *8)>)> 4 K  8  .  '   B <B.JN / .JN 3.  I    JN ( G $     .  JN      $ < <D9>.KJ )- PPP& P  P5702!%# -1,0  2 .     * *   @NR 3: 7777 7  77 47r77OO = GK   , @PPQQ[QU[QZQ[PPPPQP4E0&0&MN ) )P1 MO0(38P  F F S RQ-P , YYY0&     03 =A IL    03 =A IL   0 00"0& 0 0:Kx ,  7  CP    N66 88 "J  F  Fr7r )- __future__roperatorrbtypingrrrrrnarwhals._compliant.exprr narwhals._compliant.typingr r r r rnarwhals._compliant.windowrnarwhals._expression_parsingrrnarwhals._sql.typingrnarwhals._utilsrrrrcollections.abcrtyping_extensionsrnarwhals._sql.expr_dtrnarwhals._sql.expr_strrnarwhals._sql.namespacernarwhals.typingrrrr r.r7r5rsr"BB-4/QQ(&E?=4KKK h}k12H]K=W4XK r7