
    Lpj#q                       % S SK Jr  S SKJrJrJrJrJr  S SKr	S SK
JrJrJrJrJrJrJrJrJrJrJrJrJrJr  S SKJrJrJr  S SKJrJr  \(       ax  S SK J!r!J"r"J#r#J$r$  S SK%J&r&  S S	KJ'r'J(r(J)r)  S SK*r+S SK,r-S S
K.J/r/J0r0  S SK1J2r2J3r3  S SK4J5r5  S SK6J7r7  S SKJ8r8J9r9  S SK:J;r;  S SK<J=r=  S SK>J?r?J@r@JArAJBrBJCrCJDrDJErE  \)" S5      rF\'S   rGS\HS'   \rIS\HS'   \J" / SQ5      rK " S S5      rL " S S\\L\	Rz                  4   5      rM " S S\M\\L\	Rz                  4   5      rN " S S\M\\L\	Rz                  4   5      rO " S  S!\M\\L\	Rz                  4   5      rP " S" S#\M\\L\	Rz                  4   5      rQ " S$ S%\M\\L\	Rz                  4   5      rRg)&    )annotations)TYPE_CHECKINGAnyClassVarcastoverloadN)BACKEND_VERSIONSERIES_ACCEPTS_PD_INDEXSERIES_RESPECTS_DTYPEPolarsAnyNamespacePolarsCatNamespacePolarsDateTimeNamespacePolarsListNamespacePolarsStringNamespacePolarsStructNamespacecatch_polars_exceptionextract_args_kwargsextract_nativenarwhals_to_native_dtypenative_to_narwhals_dtype)
NO_DEFAULTImplementationrequires)is_numpy_array_1dis_pandas_index)IterableIteratorMappingSequence)
ModuleType)Literal	TypeAliasTypeVar)SelfTypeIs)MethodPolarsDataFramePolarsNamespace)	NoDefault)Version_LimitedContext)DType)Series)Into1DArray	IntoDTypeModeKeepStrategyMultiIndexSelectorNonNestedLiteralPythonLiteral_1DArrayT)FTr"   IncludeBreakpoint
Incomplete)R__add____and____floordiv__
__invert____iter____mod____mul____neg____or____pow____radd____rand____rfloordiv____rmod____rmul____ror____rsub____rtruediv____sub____truediv__absallanyarg_maxarg_minarg_trueceilclipcoscountcum_maxcum_mincum_prodcum_sumdiff
drop_nullsexp	fill_nullfill_nanfilterfloorgather_everyhead
is_betweenis_closeis_duplicatedis_empty	is_finiteis_first_distinctis_inis_last_distinctis_null	is_sorted	is_uniqueitemkurtosislenlogmaxmeanminmoden_unique
null_countquantilerankroundsampleshiftsinskewsqrtstdsumtailto_arrowto_frameto_list	to_pandasuniquevarzip_withc                     \ rS rSr% \R
                  rS\S'   S\S'   S\S'   SS	/S	/S
.rS\S'   SS jr	\
SS j5       rSS jrSS jrSS jrSS jrSS jr\SSS.         SS jj5       r\SS j5       r\SS j5       r\SS j5       rSS jrSS jr\SS j5       r\SS j5       r\SS j5       r    SS  jrSS! jrSS" jrSS# jr\
SS$ j5       r\
SS% j5       r\
SS& j5       r SS' jr!SS) jr"SS* jr#SS+ jr$SS, jr%SS- jr&\'RP                  " S.5                SS/ j5       r)SSS0.SS1 jjjr*SS2 jr+SS3 jr,SS4 jr-SS5 jr.SS6 jr/SS7 jr0SS8 jr1SS9 jr2SS: jr3SS; jr4SS< jr5SS= jr6                SS> jr7\'RP                  " S.5                SS? j5       r8\'RP                  " S.5                SS@ j5       r9SSA jr:SSB jr;SSC jr<SSD jr=          SSE jr>SSF jr?SSG jr@SSH jrA      SSI jrB      SSJ jrCSSK jrD        SSL jrESSM jrFSSN jrGSSO jrHSSP jrI\
SSQ j5       rJ\
SSR j5       rK\
SSS j5       rL\
SST j5       rMSU\SV'   SU\SW'   SU\SX'   SU\SY'   SZ\S['   SU\S\'   SU\S]'   SU\S^'   SU\S_'   SU\S`'   SU\Sa'   SU\Sb'   SU\Sc'   SU\Sd'   SU\Se'   SU\Sf'   SU\Sg'   SU\Sh'   SU\Si'   SU\Sj'   Sk\Sl'   Sk\Sm'   Sn\So'   Sn\Sp'   SU\Sq'   SU\Sr'   Sn\S	'   SU\Ss'   SU\St'   SU\Su'   SU\Sv'   SU\Sw'   SU\Sx'   SU\Sy'   SU\Sz'   SU\S{'   SU\S|'   SU\S}'   SU\S~'   SU\S'   SU\S'   SU\S'   SU\S'   Sk\S'   SU\S'   SU\S'   SU\S'   SU\S'   Sk\S'   SU\S'   S\S('   S\S'   Sn\S'   SU\S'   S\S'   S\S'   S\S'   Sn\S'   Sn\S'   S\S'   SU\S'   SU\S'   SU\S'   SU\S'   SU\S'   S\S'   SU\S'   S\S'   S\S'   SU\S'   S\S'   S\S'   S\S'   S\S'   SU\S'   S\S'   SU\S'   \
SS j5       rNSrOg)PolarsSeries   r   _implementation	pl.Series_native_seriesr+   _version
breakpointrV   )TFz3ClassVar[Mapping[IncludeBreakpoint, Sequence[str]]]_HIST_EMPTY_SCHEMAc                   Xl         X l        g Nr   r   )selfseriesversions      S/var/www/html/pdf-tiff/venv/lib/python3.13/site-packages/narwhals/_polars/series.py__init__PolarsSeries.__init__   s    $    c                6    U R                   R                  5       $ r   )r   _backend_versionr   s    r   r   PolarsSeries._backend_version   s    ##4466r   c                    g)Nr    r   s    r   __repr__PolarsSeries.__repr__   s    r   c                .    SSK Jn  U" U R                  S9$ )Nr   r(   r   )narwhals._polars.namespacer)   r   )r   r)   s     r   __narwhals_namespace__#PolarsSeries.__narwhals_namespace__   s    >t}}55r   c                    U $ r   r   r   s    r   __narwhals_series__ PolarsSeries.__narwhals_series__   s    r   c                    U R                   [        R                  L a  U R                   R                  5       $ S[	        U R                   5       3n[        U5      e)NzExpected polars, got: )r   r   POLARSto_native_namespacetypeAssertionError)r   msgs     r   __native_namespace__!PolarsSeries.__native_namespace__   sN    >#8#88'';;==&tD,@,@'A&BCS!!r   c                6    U R                  U R                  US9$ Nr   )	__class__native)r   r   s     r   _with_versionPolarsSeries._with_version   s    ~~dkk7~;;r    N)namedtypec               X   UR                   nU(       a  [        XE5      OS nUn[        (       a  [        R                  " X7US9nOY[
        (       d   [        U5      (       a  UR                  5       n[        R                  " X75      nU(       a  UR                  U5      nU R                  XS9$ )Nr   context)
r   r   r   plr.   r
   r   	to_seriesr   from_native)	clsdatar   r   r   r   dtype_plvaluesr   s	            r   from_iterablePolarsSeries.from_iterable   s     ""?D+E;$!  YYt8<F++1H1H))+YYt,FX.v77r   c                6    [        U [        R                  5      $ r   )
isinstancer   r.   )objs    r   
_is_nativePolarsSeries._is_native   s    #ryy))r   c              "    U " XR                   S9$ r   )r   )r   r   r   s      r   r   PolarsSeries.from_native   s    4!1!122r   c              r    [         R                  " [        U5      (       a  UOU/5      nU R                  X2S9$ )Nr   )r   r.   r   r   )r   r   r   r   s       r   
from_numpyPolarsSeries.from_numpy   s0    #4T#:#:4Gv77r   c                6    U R                   R                  U SS9$ )Nfull)level)r   r   r   s    r   to_narwhalsPolarsSeries.to_narwhals   s    }}##D#77r   c                4    U R                  XR                  S9$ r   )r   r   r   r   s     r   _with_nativePolarsSeries._with_native   s    ~~fmm~<<r   c                    g r   r   r   s     r   _from_native_object PolarsSeries._from_native_object   s    >Ar   c                    g r   r   r   s     r   r   r      s    LOr   c                    g r   r   r   s     r   r   r      s    36r   c                    U R                  U5      (       a  U R                  U5      $ [        U[        R                  5      (       a  SSKJn  UR                  " XS9$ U$ )Nr   r'   r   )r   r   r   r   	DataFramenarwhals._polars.dataframer'   r   )r   r   r'   s      r   r   r      sN     ??6""$$V,,fbll++B"..vDDr   c                ~   ^ ^ T[         ;  a'  T R                  R                   ST S3n[        U5      eSUU 4S jjnU$ )Nz has not attribute 'z'.c                 t   > [        X5      u  p#TR                  [        TR                  T5      " U0 UD65      $ r   )r   r   getattrr   )argskwargsposkwdsattrr   s       r   func&PolarsSeries.__getattr__.<locals>.func   s5    +D9IC++GDKK,F,Tt,TUUr   )r   r   r   r   returnr   )INHERITED_METHODSr   __name__AttributeError)r   r   r   r   s   ``  r   __getattr__PolarsSeries.__getattr__   sH    ((^^,,--A$rJC %%	V 	V r   c                ,    [        U R                  5      $ r   )rq   r   r   s    r   __len__PolarsSeries.__len__  s    4;;r   c                v   U R                   S:  aw  U R                  nU R                  5       nU R                  5       R	                  UR                  U5      R                  U5      R                  U5      5      R                  U5      $ U R                  U R                  R                  [        U5      5      5      $ )N)   
   r   )r   r   r   r   selectcolrE   alias
get_columnr   r   r   )r   otherr   nss       r   rE   PolarsSeries.__rfloordiv__  s      :-99D,,.B33E:AA$GHD!
   !:!:>%;P!QRRr   c                .    U R                   R                  $ r   )r   r   r   s    r   r   PolarsSeries.name  s    {{r   c                V    [        U R                  R                  U R                  5      $ r   )r   r   r   r   r   s    r   r   PolarsSeries.dtype  s    '(9(94==IIr   c                    U R                   $ r   )r   r   s    r   r   PolarsSeries.native  s    """r   c                V    U R                  U R                  R                  U5      5      $ r   )r   r   r   )r   r   s     r   r   PolarsSeries.alias  s"    ''(9(9$(?@@r   ro   c                    [        U[        5      (       a4  U R                  U R                  R	                  UR                  5      5      $ U R                  U R                  R	                  U5      5      $ r   )r   r   r   r   __getitem__)r   ro   s     r   r  PolarsSeries.__getitem__  sS    dL))++DKK,C,CDKK,PQQ''(?(?(EFFr   c                    [        XR                  5      nU R                  U R                  R	                  U5      5      $ r   )r   r   r   r   r   )r   r   r   s      r   r   PolarsSeries.cast#  s0    +E==A  !1!1(!;<<r   c                |    U R                  U R                  R                  [        U5      [        U5      5      5      $ r   r   r   rT   r   )r   lower_boundupper_bounds      r   rT   PolarsSeries.clip'  s3      KK^K8.:UV
 	
r   c                h    U R                  U R                  R                  [        U5      5      5      $ r   r  )r   r  s     r   
clip_lowerPolarsSeries.clip_lower,  s'      !1!1.2M!NOOr   c                d    U R                  U R                  R                  [        U5      S95      $ )N)r  r  )r   r  s     r   
clip_upperPolarsSeries.clip_upper/  s/      KK)DE
 	
r   r   c                   U R                   nU(       a  [        X@R                  5      OS nU[        L a  0 OS[	        U5      0nU R                  UR                  " X#4SU0UD65      $ )Ndefaultreturn_dtype)r   r   r   r   r   r   replace_strict)r   r  oldnewr   serr   extra_kwargss           r   r!  PolarsSeries.replace_strict4  sr     kk  %\==A 	 Z'Bi9P-Q 	   sLeL|L
 	
r   copyc                    U R                  XS9$ )Nr'  )	__array__r   r   r(  s      r   to_numpyPolarsSeries.to_numpyK  s    ~~e~//r   c                   U R                   S:  a  U R                  R                  US9$ U R                  R                  XS9$ )N)r         r   )r   r(  )r   r   r*  r+  s      r   r*  PolarsSeries.__array__N  s@      ;.;;((u(55{{$$5$<<r   c                h    U R                  U R                  R                  [        U5      5      5      $ r   )r   r   __eq__r   r   r  s     r   r3  PolarsSeries.__eq__S  '      !3!3N54I!JKKr   c                h    U R                  U R                  R                  [        U5      5      5      $ r   )r   r   __ne__r   r4  s     r   r8  PolarsSeries.__ne__V  r6  r   c                h    U R                  U R                  R                  [        U5      5      5      $ r   )r   r   __ge__r   r4  s     r   r;  PolarsSeries.__ge__Z  r6  r   c                h    U R                  U R                  R                  [        U5      5      5      $ r   )r   r   __gt__r   r4  s     r   r>  PolarsSeries.__gt__]  r6  r   c                h    U R                  U R                  R                  [        U5      5      5      $ r   )r   r   __le__r   r4  s     r   rA  PolarsSeries.__le__`  r6  r   c                h    U R                  U R                  R                  [        U5      5      5      $ r   )r   r   __lt__r   r4  s     r   rD  PolarsSeries.__lt__c  r6  r   c                    U R                   R                  [        U5      5      nU R                  S:  a  UR	                  U R
                  5      nU R                  U5      $ )N)r      r   )r   __rpow__r   r   r   r   r   )r   r  results      r   rH  PolarsSeries.__rpow__f  sL    %%nU&;<  :-\\$)),F  ((r   c                    U R                   R                  5       nU R                  S:  ao  [
        R                  " U R                   R                  5       5      R                  U5      nU R                  [
        R                  " U5      U R                     5      $ U R                  U5      $ ! [         a  n[        U5      S eS nAff = fN)r      )r   is_nan	Exceptionr   r   r   whenis_not_nullthenr   r   r   )r   native_is_naner   s       r   rN  PolarsSeries.is_nanm  s    	6 KK..0M   7*WWT[[4467<<]KF$$RYYv%6tyy%ABB  //  	6(+5	6s   B, ,
C6CCc                V   U R                   R                  5       nU R                  S:  ao  [        R                  " U R                   R                  5       5      R                  U5      nU R                  [        R                  " U5      U R                     5      $ U R                  U5      $ rL  )
r   rh   r   r   rP  rQ  rR  r   r   r   )r   native_is_finiter   s      r   rh   PolarsSeries.is_finitew  s    ;;002  7*WWT[[4467<<=MNF$$RYYv%6tyy%ABB  !122r   c                    SSK Jn  U R                  R                  5       (       d
  SnU" U5      eU R                  R                  5       $ )Nr   )InvalidOperationErrorz<`median` operation not supported for non-numeric input type.)narwhals.exceptionsrZ  r   
is_numericr   median)r   rZ  r   s      r   r]  PolarsSeries.median~  s;    =zz$$&&PC',,{{!!##r   c                  SSK Jn  U R                  S:  a  U R                  R	                  5       R                  5       nU R                  R                  US9nUR                  nU(       a  UR                  [        U5      5      nUR                  U5      nOU R                  R                  XS9nUR                  [        R                  " 5       R                  [        R                  5      5      nUR                   " XPS9$ )Nr   r   )r   r/     )	separator)ra  
drop_firstr   )r   r'   r   r   rl   rO   
to_dummiescolumnspopintr   with_columnsr   rN   r   Int8r   )r   ra  rb  r'   	has_nullsrI  output_columns_s           r   rc  PolarsSeries.to_dummies  s    >  ;.++-113I[[++i+@F#^^N"&&s9~6]]>2F[[++i+WF$$RVVX]]277%;<**6@@r   c          
        U R                   S:  a  SU0OSU0nU R                  R                  " SUUUUUUS.UD6n	U R                   S:  a  U R                  [        R
                  " [        R                  " U R                  R                  5       ) 5      R                  U	5      R                  S 5      5      U R                  R                     5      $ U R                  U	5      $ )Nr      r   min_periodsmin_samples)comspan	half_lifealphaadjustignore_nullsr  r   )r   r   ewm_meanr   r   r   rP  rl   rR  	otherwiser   )
r   rr  rs  rt  ru  rv  rq  rw  r%  native_results
             r   rx  PolarsSeries.ewm_mean  s     $$z1 K(- 	 ,, 
%
 
   4'$$		GGT[[0022388GQQRVW++""$    //r   c          	         U R                   S:  a  SU0OSU0nU R                  U R                  R                  " SXUS.UD65      $ Nrn  rp  rq  )window_sizecenterddofr   )r   r   r   rolling_varr   r~  rq  r  r  r%  s         r   r  PolarsSeries.rolling_var  b     $$z1 K(- 	
   KK## 'TEQ
 	
r   c          	         U R                   S:  a  SU0OSU0nU R                  U R                  R                  " SXUS.UD65      $ r}  )r   r   r   rolling_stdr  s         r   r  PolarsSeries.rolling_std  r  r   c                   U R                   S:  a  SU0OSU0nU R                  U R                  R                  " SXS.UD65      $ Nrn  rp  rq  )r~  r  r   )r   r   r   rolling_sumr   r~  rq  r  r%  s        r   r  PolarsSeries.rolling_sum  s`     $$z1 K(- 	
   KK## ':F
 	
r   c                   U R                   S:  a  SU0OSU0nU R                  U R                  R                  " SXS.UD65      $ r  )r   r   r   rolling_meanr  s        r   r  PolarsSeries.rolling_mean  s`     $$z1 K(- 	
   KK$$ ':F
 	
r   c               F   U R                   S:  ah  U R                  R                  US9nU(       aG  UR                  5       n[        R
                  " UR                  U) 5      UR                  U5      /5      nOU R                  R                  XS9nU R                  U5      $ )N)r   r/     )
descending)r  
nulls_last)r   r   sortrl   r   concatr`   r   )r   r  r  rI  rl   s        r   r  PolarsSeries.sort  s      :-[[%%%<F ..*FMM7($;V]]7=S#TU[[%%%SF  ((r   c                    U R                   R                  5       R                  UR                   UR                   5      nU R                  U5      $ r   )r   clonescatterr   )r   indicesr   ss       r   r  PolarsSeries.scatter  s:    KK''F  ##r   c                  SSK Jn  U R                  S:  a  U=(       d    U(       a  SOSnU R                  R	                  XS9R
                  " S	0 U R                  R                  [        R                  " U R                  R                  5      UU(       a-  [        R                  " S5      [        R                  " S5      -  O[        R                  " S5      0D6nOU R                  R	                  XX4S9nUR                  " XpS9$ )
Nr   r   )r   r   r   
proportionrV   )r  parallel)r  r  r   	normalizer   r   )r   r'   r   r   value_countsr   r   r   r   r   r   )r   r  r  r   r  r'   value_name_rI  s           r   r  PolarsSeries.value_counts   s     	?  9,J9<'K[[--4-KRR [[%%t{{/?/?(@  "$266'?!B	F [[--4 . F **6@@r   c               R    U R                  U R                  R                  US95      $ )N)reverse)r   r   	cum_count)r   r  s     r   r  PolarsSeries.cum_count  s%      !6!6w!6!GHHr   c                v     U R                   R                  U5      $ ! [         a  n[        U5      S eS nAff = fr   )r   __contains__rO  r   )r   r  rT  s      r   r  PolarsSeries.__contains__  s9    	6;;++E22 	6(+5	6s    
838c                   U R                   R                  5       nU R                  US:X  a  UR                  S5      5      $ U5      $ )NrO   r   )r   rv   r   rc   )r   keeprI  s      r   rv   PolarsSeries.mode  s;    !!#  45=QMMfMMr   c               Z   [        U5      S::  a"  [        R                  " U R                  U   S9nOU R                  R                  5       (       a  U(       aY  [        R                  " USS  5      R                  S5      R                  [        R                  " S[        R                  5      S9nOU[        R                  " [        R                  " [        U5      S-
  [        R                  5      S9nOU R                  US US9$ U R                  5       R                  R!                  X0S9$ )Nr   schemar   r   rV   bins	bin_countinclude_breakpointr   )rq   r   r   r   r   rg   r.   r   rg  litInt64r   zeros_hist_from_datar   
_dataframer   )r   r  r  r   s       r   hist_from_binsPolarsSeries.hist_from_bins#  s     t9>\\)@)@AS)TUF[[!!##!IId12h'Xl+!\q"(((;\<  #d)a-)JK''T>P (   **,77CCFCYYr   c               f   US:X  a"  [         R                  " U R                  U   S9nOU R                  R	                  5       (       a  U(       aT  [         R
                  " [         R                  " SUS-   5      U-  [         R                  " S[         R                  5      S9nOi[         R
                  " [         R                  " U[         R                  5      S9nO1[        S:  a  S nU R                  US9nOUnS nU R                  UUUS9$ U R                  5       R                  R                  X0S	9$ )
Nr   r  r   )r   rV   r  r   r`  )r  r  r   )r   r   r   r   rg   r   	int_ranger  r  r  r	   _bins_from_bin_countr  r   r  r   )r   r  r  r   rV   r  s         r   hist_from_bin_count PolarsSeries.hist_from_bin_count7  s    >\\)@)@AS)TUF[[!!##!!||Ay1}=	I&&BHH-
 )RXX)FG (0090E!''#5 (  
 **,77CCFCYYr   c                    [        SU R                  R                  5       5      n[        SU R                  R                  5       5      nX#:X  a
  US-  nUS-  nX2-
  U-  n[        R
                  " SUS-   SS9U-  U-   $ )a  Prepare bins based on backend version compatibility.

polars <1.15 does not adjust the bins when they have equivalent min/max
polars <1.5 with bin_count=...
returns bins that range from -inf to +inf and has bin_count + 1 bins.
  for compat: convert `bin_count=` call to `bins=`
floatg      ?r   r   T)eager)r   r   ru   rs   r   r  )r   r  lowerupperwidths        r   r  !PolarsSeries._bins_from_bin_countS  sv     Wdkkoo/0Wdkkoo/0>SLESLE)+||Ay1}D9EAEIIr   c               ,   SSK Jn  U R                  n[        S:  d  Ub  UR	                  S5      nUR                  UUSUS9nU(       dD  UR                  S   nUR                  [        R                  " U5      R                  S5      5      nO[        S:  a  UR                  S	S
05      nUb  [        S:  aF  [        R                  " S[        U5      5      nUR                  US:  U[        U5      S-
  :  -  5      n[        S:  a~  UR                  SS5      R!                  [        R                  " S5      [        R"                  " U5      US   :H  R%                  5       -   5      R'                  UR                  S5      5      nUR(                  " X`S9$ )zbCalculate histogram from non-empty data and post-process the results based on the backend version.r   r   r  NF)r  include_categoryr  rV   )r   r   break_pointr   )r   r  r   )r      r   )r   r'   r   r	   r_   histrd  r   r   r   r   renamer  rq   r`   slicerg  r  r   vstackr   )	r   r  r  r  r'   r   dfcol_namers	            r   r  PolarsSeries._hist_from_datae  sP    	? W$(8__T*F[["1	  
 "zz!}H266(+11':;Bv%M<89B'LLCG,YYA!c"gk/:;(HHQN!\"&&/bffVnQ6O5T5T5V"WXVBHHQK(  **2<<r   c                    U R                   $ r   )r   r   s    r   	to_polarsPolarsSeries.to_polars  s    {{r   c                    U R                   S:  a-  [        U 5      (       a  U R                  R                  S5      $ S $ U R                  R	                  5       $ )Nr   r   r   )r   rq   r   ro   firstr   s    r   r  PolarsSeries.first  sE      7**-d))4;;##A&=={{  ""r   c                    U R                   S:  a-  [        U 5      (       a  U R                  R                  S5      $ S $ U R                  R	                  5       $ )Nr  )r   rq   r   ro   lastr   s    r   r  PolarsSeries.last  sE      7*+.t994;;##B'>$>{{!!r   c               l    U(       a  U R                  5       R                  5       $ U R                  5       $ r   )r\   r  )r   rw  s     r   	any_valuePolarsSeries.any_value  s%    ,8t &&(JdjjlJr   c                    [        U 5      $ r   )PolarsSeriesDateTimeNamespacer   s    r   dtPolarsSeries.dt  s    ,T22r   c                    [        U 5      $ r   )PolarsSeriesStringNamespacer   s    r   strPolarsSeries.str      *400r   c                    [        U 5      $ r   )PolarsSeriesCatNamespacer   s    r   catPolarsSeries.cat  s    '--r   c                    [        U 5      $ r   )PolarsSeriesStructNamespacer   s    r   structPolarsSeries.struct  r  r   zMethod[Self]r9   r:   r;   r<   zMethod[Iterator[Any]]r=   r>   r?   r@   rA   rB   rC   rD   rF   rG   rH   rI   rJ   rK   rL   rM   zMethod[bool]rN   rO   zMethod[int]rP   rQ   rR   rS   rU   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   rf   rg   ri   rj   rk   rl   rm   rn   zMethod[Any]zMethod[float | None]rp   rq   rr   rs   zMethod[float]rt   ru   rw   rx   ry   rz   r{   r|   r}   r~   r   r   r   r   r   zMethod[pa.Array[Any]]r   zMethod[PolarsDataFrame]r   zMethod[list[Any]]r   zMethod[pd.Series[Any]]r   r   r   r   c                    [        U 5      $ r   )PolarsSeriesListNamespacer   s    r   listPolarsSeries.list  s    (..r   r   )r   r   r   r+   r   None)r   ztuple[int, ...]r   r  r   r)   )r   r$   )r   r    )r   r+   r   r$   )
r   zIterable[Any]r   r,   r   r  r   IntoDType | Noner   r$   )r   zpl.Series | Anyr   zTypeIs[pl.Series])r   r   r   r,   r   r$   )r   r/   r   r,   r   r$   )r   zSeries[pl.Series])r   r   r   r$   )r   zpl.DataFramer   r'   )r   r6   r   r6   )r   zpl.Series | pl.DataFrame | Tr   zSelf | PolarsDataFrame | T)r   r  r   r   )r   rf  )r  r   r   r   )r   r-   r   r   )r   r  r   r$   )ro   zMultiIndexSelector[Self]r   z
Any | Self)r   r0   r   r$   )r  r   r  r   r   r$   )r  r   r   r$   )r  r   r   r$   )
r  zPolarsSeries | NoDefaultr"  Sequence[Any]r#  r  r   r  r   r$   r   )r   r   r(  zbool | Noner   r5   )r  objectr   r$   )r  r$   r   r$   )r  zPolarsSeries | Anyr   r$   )r   r   )ra  r  rb  boolr   r'   )rr  float | Noners  r  rt  r  ru  r  rv  r   rq  rf  rw  r   r   r$   )
r~  rf  rq  rf  r  r   r  rf  r   r$   )r~  rf  rq  rf  r  r   r   r$   )r  r   r  r   r   r$   )r  r$   r   r$   r   r$   )
r  r   r  r   r   z
str | Noner  r   r   r'   )r  r   r   r$   )r  r   r   r   )r  r1   r   r$   )r  zlist[float]r  r   r   r'   )r  rf  r  r   r   r'   )r  rf  r   r   )r  zlist[float] | Noner  z
int | Noner  r   r   r'   )r   r4   )rw  r   r   r4   )r   r  )r   r  )r   r  )r   r  )r   r  )Pr   
__module____qualname____firstlineno__r   r   r   __annotations__r   r   propertyr   r   r   r   r   r   classmethodr   staticmethodr   r   r   r   r   r   r   r   r   rE   r   r   r   r   r  r   rT   r  r  r   backend_versionr!  r,  r*  r3  r8  r;  r>  rA  rD  rH  rN  rh   r]  rc  rx  r  r  r  r  r  r  r  r  r  rv   r  r  r  r  r  r  r  r  r  r  r  r  r  __static_attributes__r   r   r   r   r      sF   &4&;&;O^; W%yOK 
  7 76
"<  "&88 !	8
 8  8 
8 8* * * 3 3 8 88= A AO O6 6
2
	#
	 	S     J J # #AG
=

P

 d#
)
 
 	
 '
 

 $
,0 0 0=
LLLLLL)03$A !0 !0 	!0
  !0 !0 !0 !0 !0 
!0F d#

03
=A
IL
	
 $
 d#

03
=A
IL
	
 $





)$AA'+A3=AJNA	A,I6NZZ8<Z	Z(ZZ59Z	Z8J$*=&*=3=*=VZ*=	*=X#
"
K 3 3 1 1 . . 1 1 ##			
	
	
##""
""			
	
	

		
##%%%%	/ /r   r   c                  n    \ rS rSrS
S jr\SS j5       r\SS j5       r\SS j5       rSS jr	SS jr
Srg	)PolarsSeriesNamespacei  c                    Xl         g r   _seriesr   s     r   r   PolarsSeriesNamespace.__init__  s    r   c                    U R                   $ r   r  r   s    r   	compliantPolarsSeriesNamespace.compliant  s    ||r   c                .    U R                   R                  $ r   )r  r   r   s    r   r   PolarsSeriesNamespace.native  s    ||"""r   c                .    U R                   R                  $ r   )r  r   r   s    r   r   PolarsSeriesNamespace.name  s    ~~"""r   c                6    U R                   R                  5       $ r   )r  r   r   s    r   r   ,PolarsSeriesNamespace.__narwhals_namespace__  s    ~~4466r   c                6    U R                   R                  5       $ r   )r  r   r   s    r   r   PolarsSeriesNamespace.to_frame  s    ~~&&((r   r  N)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    sM       # # # #7)r   r  c                      \ rS rSrSrg)r  i  r   Nr   r  r  r  r
  r   r   r   r  r        r   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	rg
)r  i   c                    U R                   nU R                  5       nU R                  5       R                  UR	                  U5      R
                  R                  5       5      R                  U5      $ r   )r   r   r   r   r   r  to_titlecaser  r   r   r  s      r   r"  (PolarsSeriesStringNamespace.to_titlecase#  sS    yy((*}}%%bffTl&6&6&C&C&EFQQRVWWr   c                    U R                   nU R                  5       nU R                  5       R                  UR	                  U5      R
                  R                  U5      5      R                  U5      $ r   )r   r   r   r   r   r  zfillr  )r   r  r   r  s       r   r&  !PolarsSeriesStringNamespace.zfill(  sU    yy((*}}%%bffTl&6&6&<&<U&CDOOPTUUr   c          	         [        U5      nU R                  R                  U R                  R                  R                  X%X4S95      $ )N)literaln)r   r  r   r   r  replace)r   valuepatternr)  r*  value_natives         r   r+  #PolarsSeriesStringNamespace.replace-  s@     &e,~~**KKOO##G7#P
 	
r   c                   [        U5      nU R                  R                  U R                  R                  R                  X$US95      $ N)r)  )r   r  r   r   r  replace_all)r   r,  r-  r)  r.  s        r   r2  'PolarsSeriesStringNamespace.replace_all5  s@     &e,~~**KKOO''w'O
 	
r   c                   [        U5      nU R                  R                  U R                  R                  R                  X2S95      $ r1  )r   r  r   r   r  contains)r   r-  r)  pattern_natives       r   r5  $PolarsSeriesStringNamespace.contains=  s<    '0~~**KKOO$$^$E
 	
r   c                    U R                   R                  U R                  R                  R	                  [        U5      5      5      $ r   )r  r   r   r  starts_withr   )r   prefixs     r   r9  'PolarsSeriesStringNamespace.starts_withC  s4    ~~**KKOO''v(>?
 	
r   c                    U R                   R                  U R                  R                  R	                  [        U5      5      5      $ r   )r  r   r   r  	ends_withr   )r   suffixs     r   r=  %PolarsSeriesStringNamespace.ends_withH  s4    ~~**KKOO%%nV&<=
 	
r   r   Nr  )r  rf  r   r   )
r,  r   r-  r  r)  r   r*  rf  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  r5  r9  r=  r
  r   r   r   r  r     so    X
V

!
,/
=A
FI
	

!
,/
=A
	




r   r  c                      \ rS rSrSrg)r  iN  r   Nr  r   r   r   r  r  N  r  r   r  c                  (    \ rS rSrSS jrSS jrSrg)r  iS  c                    U R                   nU R                  5       nU R                  5       R                  UR	                  U5      R
                  R                  5       5      R                  U5      $ r   )r   r   r   r   r   r  rq   r  r#  s      r   rq   PolarsSeriesListNamespace.lenV  sR    yy((*}}%%bffTl&7&7&;&;&=>II$OOr   c                    U R                   nU R                  5       nU R                  5       R                  UR	                  U5      R
                  R                  U5      5      R                  U5      $ r   )r   r   r   r   r   r  r5  r  )r   ro   r   r  s       r   r5  "PolarsSeriesListNamespace.contains[  sU    yy((*}}%%bffTl&7&7&@&@&FGRRSWXXr   r   Nr  )ro   r3   r   r   )r   r  r  r  rq   r5  r
  r   r   r   r  r  S  s    P
Yr   r  c                      \ rS rSrSrg)r  ia  r   Nr  r   r   r   r  r  a  r  r   r  )S
__future__r   typingr   r   r   r   r   polarsr   narwhals._polars.utilsr	   r
   r   r   r   r   r   r   r   r   r   r   r   r   narwhals._utilsr   r   r   narwhals.dependenciesr   r   collections.abcr   r   r   r   typesr    r!   r"   r#   pandaspdpyarrowpatyping_extensionsr$   r%   r   r&   r'   r   r)   narwhals._typingr*   r+   r,   narwhals.dtypesr-   narwhals.seriesr.   narwhals.typingr/   r0   r1   r2   r3   r4   r5   r6   r7   r  r8   	frozensetr   r   r  r  r  r  r  r  r   r   r   <module>rY     sh   " ? ?      A @ DEE 22.B:*8%&   	A#*;#7y7
I  SU pp	/ p	/f).|RYY/FG ).2<3JK
+
0ryy1HI+
\-lBII.EF
Y.|RYY/FGY0ryy1HIr   