o
    h7                     @  s  d dl mZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlm	Z	 d d	lm
Z
 d d
lmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ er7d dl m!Z! d dl"Z#d dl$Z%d dl&m'Z' d dl(m)Z) d dl*m+Z+ d d l,m-Z- d d!l,m.Z. d d"l/m0Z0 d d#l/m1Z1 d d$l2m3Z3 d d%l4m5Z5 d d&l4m6Z6 d d'l4m7Z7 d d(l4m8Z8 d d)l4m9Z9 d d*l4m:Z: d d+l4m;Z; d d,l4m<Z< d d-l4m=Z= d d.l4m>Z> d d/l4m?Z? d d0l4m@Z@ d d1lmAZA d d2lmBZB d d3lmCZC d4d5gZDG d6d4 d4ed7 eee e	e ZEG d8d5 d5eEe e	e ZFG d9d: d:ee ee e	eef ZGG d;d< d<eGeef eeef ZHG d=d> d>eGeef ee e	eef ZIG d?d@ d@eGeef ee e	eef ZJG dAdB dBeGeef ee e	eef ZKG dCdD dDeGeef ee e	eef ZLG dEdF dFeGeef ee e	eef ZMdS )G    )annotations)TYPE_CHECKING)Any)Generic)Iterable)Iterator)Mapping)Protocol)Sequence)CatNamespace)DateTimeNamespace)ListNamespace)StringNamespace)StructNamespace)CompliantSeriesT_co)EagerSeriesT_co)NativeSeriesT)NativeSeriesT_co)FromIterable)
FromNative)NumpyConvertible)_StoresCompliant)_StoresNative)is_compliant_series)is_sized_multi_index_selector)unstable)
ModuleTypeN)Self)
ArrowArray)CompliantDataFrame)CompliantExpr)	EagerExpr)CompliantNamespace)EagerNamespace)DType)ClosedInterval)FillNullStrategy)Into1DArray)MultiIndexSelector)NonNestedLiteral)NumericLiteral)
RankMethod)RollingInterpolationMethod)SizedMultiIndexSelector)TemporalLiteral)_1DArray)_SliceIndex)Implementation)Version)_FullContextCompliantSeriesEagerSeriesc                   @  s$  e Zd ZU ded< ded< ded< edLd	d
ZedMddZedNddZdOddZdPddZ	dQddZ
dRdd ZdSd#d$ZdTd'd(ZdUd*d+ZdVd-d.ZdWd0d1ZdXd3d4ZdYd6d7ZedZd;d<Zed[d>d?Zed@dAdBd\dFdGZd]dHdIZd]dJdKZd^dMdNZd]dOdPZd]dQdRZd]dSdTZdOdUdVZd]dWdXZd]dYdZZd]d[d\Z d]d]d^Z!d^d_d`Z"d]dadbZ#d]dcddZ$d]dedfZ%d]dgdhZ&d]didjZ'd]dkdlZ(d]dmdnZ)d]dodpZ*d]dqdrZ+d]dsdtZ,d]dudvZ-d]dwdxZ.d]dydzZ/dOd{d|Z0d_d}d~Z1d`ddZ2d`ddZ3dVddZ4dVddZ5dOddZ6daddZ7dbddZ8dVddZ9dcddZ:dcddZ;dcddZ<dcddZ=dcddZ>dOddZ?dOddZ@ddddZAdeddZBdfddZCdgddZDeEdhddZFdiddÄZGdjddǄZHdOddɄZIdOdd˄ZJd]dd̈́ZKdOddτZLdOddфZMdOddӄZNdkddքZOdOdd؄ZPdlddۄZQdVdd݄ZRdmdd߄ZSdnddZTdnddZUdmddZVdOddZWdVddZXdVddZYdoddZZdpddZ[dqddZ\drdd Z]dsddZ^drddZ_dsddZ`dtd	d
ZaduddZbdvddZcdiddZddwddZedxddZfdyddZgdnddZhdid d!Zidzd#d$Zjd{d'd(Zkd|d)d*Zld}d,d-Zmd~d/d0Zndd2d3Zodd5d6Zpdd;d<Zqdyd=d>Zrdd@dAZsedmdBdCZtedmdDdEZuedmdFdGZvedmdHdIZwedmdJdKZxdAS (  r4   r1   _implementationtuple[int, ...]_backend_versionr2   _versionreturnr$   c                 C     d S N selfr=   r=   N/var/www/vscode/kcb/lib/python3.10/site-packages/narwhals/_compliant/series.pydtypeI      zCompliantSeries.dtypestrc                 C  r;   r<   r=   r>   r=   r=   r@   nameK   rB   zCompliantSeries.namer   c                 C  r;   r<   r=   r>   r=   r=   r@   nativeM   rB   zCompliantSeries.nativer   c                 C  s   | S r<   r=   r>   r=   r=   r@   __narwhals_series__O   rB   z#CompliantSeries.__narwhals_series__CompliantNamespace[Any, Any]c                 C  r;   r<   r=   r>   r=   r=   r@   __narwhals_namespace__R       z&CompliantSeries.__narwhals_namespace__r   c                 C  r;   r<   r=   r>   r=   r=   r@   __native_namespace__S   rI   z$CompliantSeries.__native_namespace__rA   r   copybool | Noner/   c                C  r;   r<   r=   )r?   rA   rK   r=   r=   r@   	__array__T   rI   zCompliantSeries.__array__otherboolc                 C  r;   r<   r=   r?   rN   r=   r=   r@   __contains__U   rI   zCompliantSeries.__contains__itemMultiIndexSelector[Self]c                 C  r;   r<   r=   )r?   rR   r=   r=   r@   __getitem__V   rI   zCompliantSeries.__getitem__Iterator[Any]c                 C  r;   r<   r=   r>   r=   r=   r@   __iter__W   rI   zCompliantSeries.__iter__intc                 C  s
   t | jS r<   )lenrE   r>   r=   r=   r@   __len__X      
zCompliantSeries.__len__seriesc                 C  r;   r<   r=   r?   r[   r=   r=   r@   _with_native[   rI   zCompliantSeries._with_nativeversionc                 C  r;   r<   r=   )r?   r^   r=   r=   r@   _with_version\   rI   zCompliantSeries._with_versionCompliantExpr[Any, Self]c                 C  r;   r<   r=   r>   r=   r=   r@   _to_expr]   rI   zCompliantSeries._to_exprdatacontextr3   c               C  r;   r<   r=   clsrb   rc   r=   r=   r@   from_native^   rB   zCompliantSeries.from_nativer'   c               C  r;   r<   r=   rd   r=   r=   r@   
from_numpy`   rB   zCompliantSeries.from_numpy N)rD   rA   Iterable[Any]rD   DType | type[DType] | Nonec               C  r;   r<   r=   )re   rb   rc   rD   rA   r=   r=   r@   from_iterableb   s   	zCompliantSeries.from_iterablec                 C  r;   r<   r=   rP   r=   r=   r@   __add__n   rI   zCompliantSeries.__add__c                 C  r;   r<   r=   rP   r=   r=   r@   __and__o   rI   zCompliantSeries.__and__objectc                 C  r;   r<   r=   rP   r=   r=   r@   __eq__p   rI   zCompliantSeries.__eq__c                 C  r;   r<   r=   rP   r=   r=   r@   __floordiv__q   rI   zCompliantSeries.__floordiv__c                 C  r;   r<   r=   rP   r=   r=   r@   __ge__r   rI   zCompliantSeries.__ge__c                 C  r;   r<   r=   rP   r=   r=   r@   __gt__s   rI   zCompliantSeries.__gt__c                 C  r;   r<   r=   r>   r=   r=   r@   
__invert__t   rI   zCompliantSeries.__invert__c                 C  r;   r<   r=   rP   r=   r=   r@   __le__u   rI   zCompliantSeries.__le__c                 C  r;   r<   r=   rP   r=   r=   r@   __lt__v   rI   zCompliantSeries.__lt__c                 C  r;   r<   r=   rP   r=   r=   r@   __mod__w   rI   zCompliantSeries.__mod__c                 C  r;   r<   r=   rP   r=   r=   r@   __mul__x   rI   zCompliantSeries.__mul__c                 C  r;   r<   r=   rP   r=   r=   r@   __ne__y   rI   zCompliantSeries.__ne__c                 C  r;   r<   r=   rP   r=   r=   r@   __or__z   rI   zCompliantSeries.__or__c                 C  r;   r<   r=   rP   r=   r=   r@   __pow__{   rI   zCompliantSeries.__pow__c                 C  r;   r<   r=   rP   r=   r=   r@   __radd__|   rI   zCompliantSeries.__radd__c                 C  r;   r<   r=   rP   r=   r=   r@   __rand__}   rI   zCompliantSeries.__rand__c                 C  r;   r<   r=   rP   r=   r=   r@   __rfloordiv__~   rI   zCompliantSeries.__rfloordiv__c                 C  r;   r<   r=   rP   r=   r=   r@   __rmod__   rI   zCompliantSeries.__rmod__c                 C  r;   r<   r=   rP   r=   r=   r@   __rmul__   rI   zCompliantSeries.__rmul__c                 C  r;   r<   r=   rP   r=   r=   r@   __ror__   rI   zCompliantSeries.__ror__c                 C  r;   r<   r=   rP   r=   r=   r@   __rpow__   rI   zCompliantSeries.__rpow__c                 C  r;   r<   r=   rP   r=   r=   r@   __rsub__   rI   zCompliantSeries.__rsub__c                 C  r;   r<   r=   rP   r=   r=   r@   __rtruediv__   rI   zCompliantSeries.__rtruediv__c                 C  r;   r<   r=   rP   r=   r=   r@   __sub__   rI   zCompliantSeries.__sub__c                 C  r;   r<   r=   rP   r=   r=   r@   __truediv__   rI   zCompliantSeries.__truediv__c                 C  r;   r<   r=   r>   r=   r=   r@   abs   rI   zCompliantSeries.absc                 C  r;   r<   r=   )r?   rD   r=   r=   r@   alias   rI   zCompliantSeries.aliasc                 C  r;   r<   r=   r>   r=   r=   r@   all   rI   zCompliantSeries.allc                 C  r;   r<   r=   r>   r=   r=   r@   any   rI   zCompliantSeries.anyc                 C  r;   r<   r=   r>   r=   r=   r@   arg_max   rI   zCompliantSeries.arg_maxc                 C  r;   r<   r=   r>   r=   r=   r@   arg_min   rI   zCompliantSeries.arg_minc                 C  r;   r<   r=   r>   r=   r=   r@   arg_true   rI   zCompliantSeries.arg_trueDType | type[DType]c                 C  r;   r<   r=   )r?   rA   r=   r=   r@   cast   rI   zCompliantSeries.castlower_bound.Self | NumericLiteral | TemporalLiteral | Noneupper_boundc                 C  r;   r<   r=   )r?   r   r   r=   r=   r@   clip   s   zCompliantSeries.clipc                 C  r;   r<   r=   r>   r=   r=   r@   count   rI   zCompliantSeries.countreversec                C  r;   r<   r=   r?   r   r=   r=   r@   	cum_count   rI   zCompliantSeries.cum_countc                C  r;   r<   r=   r   r=   r=   r@   cum_max   rI   zCompliantSeries.cum_maxc                C  r;   r<   r=   r   r=   r=   r@   cum_min   rI   zCompliantSeries.cum_minc                C  r;   r<   r=   r   r=   r=   r@   cum_prod   rI   zCompliantSeries.cum_prodc                C  r;   r<   r=   r   r=   r=   r@   cum_sum   rI   zCompliantSeries.cum_sumc                 C  r;   r<   r=   r>   r=   r=   r@   diff   rI   zCompliantSeries.diffc                 C  r;   r<   r=   r>   r=   r=   r@   
drop_nulls   rI   zCompliantSeries.drop_nullscomfloat | Nonespan	half_lifealphaadjustmin_samplesignore_nullsc                C  r;   r<   r=   )r?   r   r   r   r   r   r   r   r=   r=   r@   ewm_mean   s   
zCompliantSeries.ewm_meanvalueSelf | NonNestedLiteralstrategyFillNullStrategy | Nonelimit
int | Nonec                 C  r;   r<   r=   )r?   r   r   r   r=   r=   r@   	fill_null   s   zCompliantSeries.fill_null	predicatec                 C  r;   r<   r=   )r?   r   r=   r=   r@   filter   rI   zCompliantSeries.filternoffsetc                 C  r;   r<   r=   )r?   r   r   r=   r=   r@   gather_every   rI   zCompliantSeries.gather_everybinslist[float | int] | None	bin_countinclude_breakpoint"CompliantDataFrame[Self, Any, Any]c                C  r;   r<   r=   )r?   r   r   r   r=   r=   r@   hist      zCompliantSeries.histc                 C  r;   r<   r=   r?   r   r=   r=   r@   head   rI   zCompliantSeries.headclosedr%   c                 C  r;   r<   r=   )r?   r   r   r   r=   r=   r@   
is_between      zCompliantSeries.is_betweenc                 C  r;   r<   r=   r>   r=   r=   r@   	is_finite   rI   zCompliantSeries.is_finitec                 C  r;   r<   r=   r>   r=   r=   r@   is_first_distinct   rI   z!CompliantSeries.is_first_distinctc                 C  r;   r<   r=   rP   r=   r=   r@   is_in   rI   zCompliantSeries.is_inc                 C  r;   r<   r=   r>   r=   r=   r@   is_last_distinct   rI   z CompliantSeries.is_last_distinctc                 C  r;   r<   r=   r>   r=   r=   r@   is_nan   rI   zCompliantSeries.is_nanc                 C  r;   r<   r=   r>   r=   r=   r@   is_null   rI   zCompliantSeries.is_null
descendingc                C  r;   r<   r=   )r?   r   r=   r=   r@   	is_sorted   rI   zCompliantSeries.is_sortedc                 C  r;   r<   r=   r>   r=   r=   r@   	is_unique   rI   zCompliantSeries.is_uniqueindexc                 C  r;   r<   r=   )r?   r   r=   r=   r@   rR      rI   zCompliantSeries.itemc                 C  r;   r<   r=   r>   r=   r=   r@   rX      rI   zCompliantSeries.lenc                 C  r;   r<   r=   r>   r=   r=   r@   max   rI   zCompliantSeries.maxfloatc                 C  r;   r<   r=   r>   r=   r=   r@   mean   rI   zCompliantSeries.meanc                 C  r;   r<   r=   r>   r=   r=   r@   median   rI   zCompliantSeries.medianc                 C  r;   r<   r=   r>   r=   r=   r@   min   rI   zCompliantSeries.minc                 C  r;   r<   r=   r>   r=   r=   r@   mode   rI   zCompliantSeries.modec                 C  r;   r<   r=   r>   r=   r=   r@   n_unique   rI   zCompliantSeries.n_uniquec                 C  r;   r<   r=   r>   r=   r=   r@   
null_count   rI   zCompliantSeries.null_countquantileinterpolationr,   c                 C  r;   r<   r=   )r?   r   r   r=   r=   r@   r      r   zCompliantSeries.quantilemethodr+   c                C  r;   r<   r=   )r?   r   r   r=   r=   r@   rank   rI   zCompliantSeries.rankold!Sequence[Any] | Mapping[Any, Any]newSequence[Any]return_dtypec                C  r;   r<   r=   )r?   r   r   r   r=   r=   r@   replace_strict      zCompliantSeries.replace_strictwindow_sizecenterc                C  r;   r<   r=   r?   r   r   r   r=   r=   r@   rolling_mean   r   zCompliantSeries.rolling_meanddofc                C  r;   r<   r=   r?   r   r   r   r   r=   r=   r@   rolling_std   r   zCompliantSeries.rolling_stdc                C  r;   r<   r=   r   r=   r=   r@   rolling_sum   r   zCompliantSeries.rolling_sumc                C  r;   r<   r=   r   r=   r=   r@   rolling_var   r   zCompliantSeries.rolling_vardecimalsc                 C  r;   r<   r=   )r?   r   r=   r=   r@   round   rI   zCompliantSeries.roundfractionwith_replacementseedc                C  r;   r<   r=   )r?   r   r   r   r   r=   r=   r@   sample   r   zCompliantSeries.sampleindicesint | Sequence[int]valuesc                 C  r;   r<   r=   )r?   r   r   r=   r=   r@   scatter   rI   zCompliantSeries.scatterc                 C  r;   r<   r=   r   r=   r=   r@   shift   rI   zCompliantSeries.shiftc                 C  r;   r<   r=   r>   r=   r=   r@   skew  rI   zCompliantSeries.skew
nulls_lastc                C  r;   r<   r=   )r?   r   r   r=   r=   r@   sort  rI   zCompliantSeries.sortc                C  r;   r<   r=   r?   r   r=   r=   r@   std  rI   zCompliantSeries.stdc                 C  r;   r<   r=   r>   r=   r=   r@   sum  rI   zCompliantSeries.sumc                 C  r;   r<   r=   r   r=   r=   r@   tail  rI   zCompliantSeries.tailr   c                 C  r;   r<   r=   r>   r=   r=   r@   to_arrow  rI   zCompliantSeries.to_arrow	separator
drop_firstc                C  r;   r<   r=   )r?   r   r   r=   r=   r@   
to_dummies  r   zCompliantSeries.to_dummiesc                 C  r;   r<   r=   r>   r=   r=   r@   to_frame
  rI   zCompliantSeries.to_frame	list[Any]c                 C  r;   r<   r=   r>   r=   r=   r@   to_list  rI   zCompliantSeries.to_listpd.Series[Any]c                 C  r;   r<   r=   r>   r=   r=   r@   	to_pandas  rI   zCompliantSeries.to_pandas	pl.Seriesc                 C  r;   r<   r=   r>   r=   r=   r@   	to_polars  rI   zCompliantSeries.to_polarsmaintain_orderc                C  r;   r<   r=   )r?   r  r=   r=   r@   unique  rI   zCompliantSeries.uniquer   parallel
str | None	normalizec                C  r;   r<   r=   )r?   r   r  rD   r  r=   r=   r@   value_counts  r   zCompliantSeries.value_countsc                C  r;   r<   r=   r   r=   r=   r@   var  rI   zCompliantSeries.varmaskc                 C  r;   r<   r=   )r?   r  rN   r=   r=   r@   zip_with  rI   zCompliantSeries.zip_withc                 C  r;   r<   r=   r>   r=   r=   r@   rC     rB   zCompliantSeries.strc                 C  r;   r<   r=   r>   r=   r=   r@   dt  rB   zCompliantSeries.dtc                 C  r;   r<   r=   r>   r=   r=   r@   cat  rB   zCompliantSeries.catc                 C  r;   r<   r=   r>   r=   r=   r@   list   rB   zCompliantSeries.listc                 C  r;   r<   r=   r>   r=   r=   r@   struct"  rB   zCompliantSeries.struct)r:   r$   )r:   rC   )r:   r   )r:   r   )r:   rG   )r:   r   )rA   r   rK   rL   r:   r/   )rN   r   r:   rO   )rR   rS   r:   r   )r:   rU   )r:   rW   )r[   r   r:   r   )r^   r2   r:   r   )r:   r`   )rb   r   rc   r3   r:   r   )rb   r'   rc   r3   r:   r   )
rb   ri   rc   r3   rD   rC   rA   rj   r:   r   )rN   r   r:   r   )rN   rn   r:   r   )rD   rC   r:   r   )r:   rO   )rA   r   r:   r   )r   r   r   r   r:   r   )r   rO   r:   r   )r   r   r   r   r   r   r   r   r   rO   r   rW   r   rO   r:   r   )r   r   r   r   r   r   r:   r   )r   r   r:   r   )r   rW   r   rW   r:   r   )r   r   r   r   r   rO   r:   r   )r   rW   r:   r   )r   r   r   r   r   r%   r:   r   )r   rO   r:   rO   )r   r   r:   r   )r:   r   )r:   r   )r   r   r   r,   r:   r   )r   r+   r   rO   r:   r   )r   r   r   r   r   rj   r:   r   )r   rW   r   rW   r   rO   r:   r   )
r   rW   r   rW   r   rO   r   rW   r:   r   )r   rW   r:   r   )
r   r   r   r   r   rO   r   r   r:   r   )r   r   r   r   r:   r   )r:   r   )r   rO   r   rO   r:   r   )r   rW   r:   r   )r:   r   )r   rC   r   rO   r:   r   )r:   r   )r:   r   )r:   r   )r:   r   )r  rO   r:   r   )
r   rO   r  rO   rD   r  r  rO   r:   r   )r  r   rN   r   r:   r   )y__name__
__module____qualname____annotations__propertyrA   rD   rE   rF   rH   rJ   rM   rQ   rT   rV   rY   r]   r_   ra   classmethodrf   rg   rk   rl   rm   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rR   rX   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	  rC   r
  r  r  r  r=   r=   r=   r@   r4   ?   s  
 )r/   r'   c                   @  s   e Zd ZU ded< ded< ded< ded< d	ed
< d8ddZddd9ddZd:ddZd;ddZd<dd Zd=d"d#Z	d>d&d'Z
ed?d)d*Zed@d,d-ZedAd/d0ZedBd2d3ZedCd5d6Zd7S )Dr5   r   _native_seriesr1   r6   r7   r8   r2   r9   rO   
_broadcastr   r:   r   c                 C  s   | j |g| j| dS )N)rD   rc   )rk   rD   )r?   r   r=   r=   r@   _from_scalar-  s   zEagerSeries._from_scalarF)preserve_broadcastr[   r   r  c                C  s   dS )a  Return a new `CompliantSeries`, wrapping the native `series`.

        In cases when operations are known to not affect whether a result should
        be broadcast, we can pass `preverse_broadcast=True`.
        Set this with care - it should only be set for unary expressions which don't
        change length or order, such as `.alias` or `.fill_null`. If in doubt, don't
        set it, you probably don't need it.
        Nr=   )r?   r[   r  r=   r=   r@   r]   0  s   zEagerSeries._with_native2EagerNamespace[Any, Self, Any, Any, NativeSeriesT]c                 C  r;   r<   r=   r>   r=   r=   r@   rH   =  r   z"EagerSeries.__narwhals_namespace__EagerExpr[Any, Any]c                 C  s   |   j| S r<   )rH   _expr_from_seriesr>   r=   r=   r@   ra   A  s   zEagerSeries._to_exprrows&SizedMultiIndexSelector[NativeSeriesT]c                 C  r;   r<   r=   r?   r  r=   r=   r@   _gatherD  rI   zEagerSeries._gather_SliceIndex | rangec                 C  r;   r<   r=   r  r=   r=   r@   _gather_sliceE  rI   zEagerSeries._gather_slicerR   2MultiIndexSelector[CompliantSeries[NativeSeriesT]]c                 C  sT   t |ttfr| |S t|r| |jS t|r| |S dt| }t	|)Nz'Unreachable code, got unexpected type: )

isinstancesliceranger!  r   r  rE   r   typeAssertionError)r?   rR   msgr=   r=   r@   rT   F  s   

zEagerSeries.__getitem__/EagerSeriesStringNamespace[Self, NativeSeriesT]c                 C  r;   r<   r=   r>   r=   r=   r@   rC   S  rB   zEagerSeries.str1EagerSeriesDateTimeNamespace[Self, NativeSeriesT]c                 C  r;   r<   r=   r>   r=   r=   r@   r
  U  rB   zEagerSeries.dt,EagerSeriesCatNamespace[Self, NativeSeriesT]c                 C  r;   r<   r=   r>   r=   r=   r@   r  W  rB   zEagerSeries.cat-EagerSeriesListNamespace[Self, NativeSeriesT]c                 C  r;   r<   r=   r>   r=   r=   r@   r  Y  rB   zEagerSeries.list/EagerSeriesStructNamespace[Self, NativeSeriesT]c                 C  r;   r<   r=   r>   r=   r=   r@   r  [  rB   zEagerSeries.structN)r   r   r:   r   )r[   r   r  rO   r:   r   )r:   r  )r:   r  )r  r  r:   r   )r  r   r:   r   )rR   r"  r:   r   )r:   r)  )r:   r*  )r:   r+  )r:   r,  )r:   r-  )r  r  r  r  r  r]   rH   ra   r  r!  rT   r  rC   r
  r  r  r  r=   r=   r=   r@   r5   &  s0   
 





c                   @  s<   e Zd ZU ded< edddZedddZdddZdS )_SeriesNamespacer   _compliant_seriesr:   c                 C  s   | j S r<   r/  r>   r=   r=   r@   	compliantf  s   z_SeriesNamespace.compliantr   c                 C  s   | j jS r<   )r/  rE   r>   r=   r=   r@   rE   j  s   z_SeriesNamespace.nativer[   r   c                C  s   | j |S r<   )r1  r]   r\   r=   r=   r@   with_nativen  s   z_SeriesNamespace.with_nativeN)r:   r   )r:   r   )r[   r   r:   r   )r  r  r  r  r  r1  rE   r2  r=   r=   r=   r@   r.  _  s   
 r.  c                   @  s    e Zd ZU ded< d	ddZdS )
EagerSeriesNamespacer   r/  r[   r:   Nonec                C  s
   || _ d S r<   r0  r\   r=   r=   r@   __init__x  rZ   zEagerSeriesNamespace.__init__N)r[   r   r:   r4  )r  r  r  r  r5  r=   r=   r=   r@   r3  r  s   
 r3  c                   @     e Zd ZdS )EagerSeriesCatNamespaceNr  r  r  r=   r=   r=   r@   r7  |      r7  c                   @  r6  )EagerSeriesDateTimeNamespaceNr8  r=   r=   r=   r@   r:    r9  r:  c                   @  r6  )EagerSeriesListNamespaceNr8  r=   r=   r=   r@   r;    r9  r;  c                   @  r6  )EagerSeriesStringNamespaceNr8  r=   r=   r=   r@   r<    r9  r<  c                   @  r6  )EagerSeriesStructNamespaceNr8  r=   r=   r=   r@   r=    r9  r=  )N
__future__r   typingr   r   r   r   r   r   r	   r
   !narwhals._compliant.any_namespacer   r   r   r   r   narwhals._compliant.typingr   r   r   r   narwhals._translater   r   r   narwhals.utilsr   r   r   r   r   typesr   pandaspdpolarspltyping_extensionsr   narwhals._arrow.typingr   narwhals._compliant.dataframer   narwhals._compliant.exprr    r!   narwhals._compliant.namespacer"   r#   narwhals.dtypesr$   narwhals.typingr%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   __all__r4   r5   r.  r3  r7  r:  r;  r<  r=  r=   r=   r=   r@   <module>   s    
 h
9



















