
    -Ph^D                    \   U d dl mZ d dlmZ d dlmZmZmZmZm	Z	m
Z
mZmZmZmZ d dlmZmZmZmZmZmZmZmZ d dlmZmZmZmZmZmZ d dlm Z  d dl!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+ erd dl,m-Z- d d	l.m/Z/ d d
l0Z1d d
l2Z3d d
l4Z5d dl6m7Z7m8Z8 d dl9m:Z: d dl;m<Z<m=Z= d dl>m?Z? d dl@mAZA d dlmBZB d dl!mCZCmDZD d dlEmFZF d dlGmHZH d dlImJZJ d dlKmLZL d dlMmNZNmOZOmPZPmQZQmRZRmSZSmTZTmUZUmVZVmWZWmXZXmYZYmZZZm[Z[ eZ\de]d<   g dZ^ ed          Z_dZ`de]d<    G d ded         ed e	eaef         f         ed!         e#e         ee         ee         ee
eeeef         
  
        Zb G d" d#e#e         ee         ee         e
eeef                   Zc G d$ d%ebeeed&f         eceed&f         e
eeef                   Zdd
S )'    )annotations)chain)
TYPE_CHECKINGAnyIteratorLiteralMappingProtocolSequenceSizedTypeVaroverload)CompliantDataFrameAnyCompliantExprT_contraCompliantLazyFrameAnyCompliantSeriesT
EagerExprTEagerSeriesTNativeExprTNativeFrameT)ArrowConvertibleDictConvertible
FromNativeNumpyConvertible
ToNarwhalsToNarwhalsT_co)
deprecated)
Version_StoresNativecheck_columns_existis_compliant_seriesis_index_selectoris_rangeis_sequence_likeis_sized_multi_index_selectoris_slice_indexis_slice_none)BytesIO)PathN)Self	TypeAlias)LazyExpr)CompliantGroupByDataFrameGroupBy)EagerNamespace)WindowInputs)IntoArrowTable)Implementation_FullContext)	DataFrame)DType)ColumnNotFoundError)Schema)AsofJoinStrategyJoinStrategyLazyUniqueKeepStrategyMultiColSelectorMultiIndexSelectorPivotAggSingleIndexSelectorSizedMultiIndexSelectorSizedMultiNameSelectorSizeUnitUniqueKeepStrategy_2DArray_SliceIndex
_SliceNamer+   
Incomplete)CompliantDataFrameCompliantLazyFrameEagerDataFrameT2dict[str, CompliantSeriesT] | dict[str, list[Any]]_ToDictc                     e Zd ZU ded<   ded<   ded<   ded<   ddZddZedd            Zedd            Zedd            Z	edd            Z
ddZdd!Zdd$Zdd'Zdd)Zedd*            Zedd,            Zedd.            Zedd0            Zdd1Zdd6Zdd7Zdd;Zdd>ZddBZddCZddFZddJZddMZddRZddSZ ddXZ!ddZZ"dd^Z#dd_Z$ddfZ%ddkZ&ddmZ'dduZ(ddxZ)ddzZ*dd|Z+ddZ,ddZ-ddZ.ddZ/ddZ0ddZ1ddZ2e3dd            Z4e3dd            Z4ddZ4ddddZ5ddZ6ddZ7ddZ8e3dd            Z9e3dd            Z9ddZ9ddZ:ddZ;ddZ<dS )rG   r   _native_framer2   _implementationtuple[int, ...]_backend_versionr   _versionreturnr*   c                    d S N selfs    ]/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/narwhals/_compliant/dataframe.py__narwhals_dataframe__z)CompliantDataFrame.__narwhals_dataframe__m             r   c                    d S rU   rV   rW   s    rY   __narwhals_namespace__z)CompliantDataFrame.__narwhals_namespace__n   r[   r\   datar1   contextr3   c                  d S rU   rV   clsr_   r`   s      rY   
from_arrowzCompliantDataFrame.from_arrowo   s    TWTWr\   Mapping[str, Any]schema#Mapping[str, DType] | Schema | Nonec                  d S rU   rV   rc   r_   r`   rf   s       rY   	from_dictzCompliantDataFrame.from_dictq   	     sr\   c                  d S rU   rV   rb   s      rY   from_nativezCompliantDataFrame.from_nativez       SVSVr\   rC   3Mapping[str, DType] | Schema | Sequence[str] | Nonec                  d S rU   rV   ri   s       rY   
from_numpyzCompliantDataFrame.from_numpy|   rk   r\   dtypecopybool | Nonec                   d S rU   rV   )rX   rr   rs   s      rY   	__array__zCompliantDataFrame.__array__   r[   r\   itemetuple[SingleIndexSelector | MultiIndexSelector[CompliantSeriesT], MultiColSelector[CompliantSeriesT]]c                    d S rU   rV   )rX   rw   s     rY   __getitem__zCompliantDataFrame.__getitem__   	     sr\   column_namesstrc                    dS z)`select` where all args are column names.NrV   rX   r|   s     rY   simple_selectz CompliantDataFrame.simple_select       r\   exprsr   c                     | j         | S )k`select` where all args are aggregations or literals.

        (so, no broadcasting is necessary).
        )selectrX   r   s     rY   	aggregatezCompliantDataFrame.aggregate   s     t{E""r\   versionc                    d S rU   rV   rX   r   s     rY   _with_versionz CompliantDataFrame._with_version   r[   r\   c                    | j         S rU   rN   rW   s    rY   nativezCompliantDataFrame.native       !!r\   Sequence[str]c                    d S rU   rV   rW   s    rY   columnszCompliantDataFrame.columns       (+r\   Mapping[str, DType]c                    d S rU   rV   rW   s    rY   rf   zCompliantDataFrame.schema       -0Sr\   tuple[int, int]c                    d S rU   rV   rW   s    rY   shapezCompliantDataFrame.shape   r   r\   c                    d S rU   rV   rW   s    rY   clonezCompliantDataFrame.clone   r[   r\   backendImplementation | Nonekwargsr   c                    d S rU   rV   rX   r   r   s      rY   collectzCompliantDataFrame.collect        #r\   c                    d S rU   rV   rW   s    rY   collect_schemaz!CompliantDataFrame.collect_schema   r[   r\   r   strictboolc                   d S rU   rV   rX   r   r   s      rY   dropzCompliantDataFrame.drop   r[   r\   subsetSequence[str] | Nonec                    d S rU   rV   rX   r   s     rY   
drop_nullszCompliantDataFrame.drop_nulls   r[   r\   unitrA   int | floatc                    d S rU   rV   )rX   r   s     rY   estimated_sizez!CompliantDataFrame.estimated_size   r[   r\   c                    d S rU   rV   rX   r   s     rY   explodezCompliantDataFrame.explode   r[   r\   	predicate"CompliantExprT_contra | Incompletec                    d S rU   rV   rX   r   s     rY   filterzCompliantDataFrame.filter   r[   r\   nintoffsetc                    d S rU   rV   rX   r   r   s      rY   gather_everyzCompliantDataFrame.gather_every   r[   r\   namer   c                    d S rU   rV   rX   r   s     rY   
get_columnzCompliantDataFrame.get_column   r[   r\   keys/Sequence[str] | Sequence[CompliantExprT_contra]drop_null_keysDataFrameGroupBy[Self, Any]c                   d S rU   rV   rX   r   r   s      rY   group_byzCompliantDataFrame.group_by   s	    
 '*cr\   c                    d S rU   rV   rX   r   s     rY   headzCompliantDataFrame.head   r[   r\   row
int | Nonecolumnint | str | Nonec                    d S rU   rV   )rX   r   r   s      rY   rw   zCompliantDataFrame.item   r[   r\   Iterator[CompliantSeriesT]c                    d S rU   rV   rW   s    rY   iter_columnszCompliantDataFrame.iter_columns   r[   r\   namedbuffer_size7Iterator[tuple[Any, ...]] | Iterator[Mapping[str, Any]]c                   d S rU   rV   )rX   r   r   s      rY   	iter_rowszCompliantDataFrame.iter_rows       BE#r\   c                    d S rU   rV   rW   s    rY   	is_uniquezCompliantDataFrame.is_unique   r[   r\   otherhowr9   left_onright_onsuffixc                   d S rU   rV   rX   r   r   r   r   r   s         rY   joinzCompliantDataFrame.join   rk   r\   by_leftby_rightstrategyr8   c                   d S rU   rV   rX   r   r   r   r   r   r   r   s           rY   	join_asofzCompliantDataFrame.join_asof   	     sr\   r   c                   d S rU   rV   )rX   r   s     rY   lazyzCompliantDataFrame.lazy   r[   r\   onindexvaluesaggregate_functionPivotAgg | Nonesort_columns	separatorc                   d S rU   rV   )rX   r   r   r   r   r   r   s          rY   pivotzCompliantDataFrame.pivot   s	     sr\   mappingMapping[str, str]c                    d S rU   rV   rX   r   s     rY   renamezCompliantDataFrame.rename   r[   r\   tuple[Any, ...]c                    d S rU   rV   )rX   r   s     rY   r   zCompliantDataFrame.row   r[   r\   7Sequence[tuple[Any, ...]] | Sequence[Mapping[str, Any]]c                   d S rU   rV   )rX   r   s     rY   rowszCompliantDataFrame.rows   r   r\   fractionfloat | Nonewith_replacementseedc                   d S rU   rV   )rX   r   r  r  r  s        rY   samplezCompliantDataFrame.sample   s	     sr\   c                    d S rU   rV   r   s     rY   r   zCompliantDataFrame.select   r[   r\   by
descendingbool | Sequence[bool]
nulls_lastc                   d S rU   rV   rX   r  r  r  s       rY   sortzCompliantDataFrame.sort       sr\   c                    d S rU   rV   r   s     rY   tailzCompliantDataFrame.tail   r[   r\   pa.Tablec                    d S rU   rV   rW   s    rY   to_arrowzCompliantDataFrame.to_arrow   r[   r\   pd.DataFramec                    d S rU   rV   rW   s    rY   	to_pandaszCompliantDataFrame.to_pandas   r[   r\   pl.DataFramec                    d S rU   rV   rW   s    rY   	to_polarszCompliantDataFrame.to_polars   r[   r\   	as_seriesLiteral[True]dict[str, CompliantSeriesT]c                   d S rU   rV   rX   r  s     rY   to_dictzCompliantDataFrame.to_dict   rn   r\   Literal[False]dict[str, list[Any]]c                   d S rU   rV   r"  s     rY   r#  zCompliantDataFrame.to_dict   s    MPSr\   rK   c                   d S rU   rV   r"  s     rY   r#  zCompliantDataFrame.to_dict   s    =@Sr\   N)maintain_orderkeeprB   r(  c                   d S rU   rV   )rX   r   r)  r(  s       rY   uniquezCompliantDataFrame.unique   r{   r\   variable_name
value_namec                    d S rU   rV   rX   r   r   r,  r-  s        rY   unpivotzCompliantDataFrame.unpivot  r{   r\   c                    d S rU   rV   r   s     rY   with_columnszCompliantDataFrame.with_columns  r[   r\   c                    d S rU   rV   r   s     rY   with_row_indexz!CompliantDataFrame.with_row_index	  r[   r\   fileNonec                    d S rU   rV   rX   r5  s     rY   	write_csvzCompliantDataFrame.write_csv
  s    ,/Cr\   str | Path | BytesIOc                    d S rU   rV   r8  s     rY   r9  zCompliantDataFrame.write_csv  s    =@Sr\   str | Path | BytesIO | None
str | Nonec                    d S rU   rV   r8  s     rY   r9  zCompliantDataFrame.write_csv  r[   r\   c                    d S rU   rV   r8  s     rY   write_parquetz CompliantDataFrame.write_parquet  r[   r\   	list[str]c                b      fd|D             }t          t          j        |                    S )Nc              3  B   K   | ]}|                               V  d S rU   _evaluate_aliases.0exprrX   s     rY   	<genexpr>z7CompliantDataFrame._evaluate_aliases.<locals>.<genexpr>  1      ==td$$T**======r\   listr   from_iterablerX   r   its   `  rY   rE  z$CompliantDataFrame._evaluate_aliases  5    ====u===E'++,,,r\   ColumnNotFoundError | Nonec                .    t          || j                  S N)	availabler    r   r   s     rY   _check_columns_existz'CompliantDataFrame._check_columns_exist      "6T\BBBBr\   rS   r*   rS   r   )r_   r1   r`   r3   rS   r*   )r_   re   r`   r3   rf   rg   rS   r*   r_   r   r`   r3   rS   r*   )r_   rC   r`   r3   rf   ro   rS   r*   )rr   r   rs   rt   rS   rC   )rw   rx   rS   r*   r|   r}   rS   r*   r   r   rS   r*   r   r   rS   r*   rS   r   rS   r   rS   r   )rS   r   r   r   r   r   rS   r   r   r   r   r   rS   r*   r   r   rS   r*   )r   rA   rS   r   r   r   rS   r*   r   r   rS   r*   r   r   r   r   rS   r*   )r   r}   rS   r   )r   r   r   r   rS   r   r   r   rS   r*   )r   r   r   r   rS   r   )rS   r   )r   r   r   r   rS   r   )rS   r   )r   r*   r   r9   r   r   r   r   r   r}   rS   r*   r   r*   r   r}   r   r}   r   r   r   r   r   r8   r   r}   rS   r*   )r   r   rS   r   )r   r   r   r   r   r   r   r   r   r   r   r}   rS   r*   r   r   rS   r*   )r   r   rS   r   )r   r   rS   r  )
r   r   r  r  r  r   r  r   rS   r*   r  r}   r  r  r  r   rS   r*   )rS   r  )rS   r  )rS   r  )r  r  rS   r   )r  r$  rS   r%  )r  r   rS   rK   )r   r   r)  rB   r(  rt   rS   r*   
r   r   r   r   r,  r}   r-  r}   rS   r*   r   r}   rS   r*   )r5  r6  rS   r}   )r5  r:  rS   r6  )r5  r<  rS   r=  r   r   rS   rA  r   r   rS   rQ  )=__name__
__module____qualname____annotations__rZ   r^   classmethodrd   rj   rm   rq   rv   rz   r   r   r   propertyr   r   rf   r   r   r   r   r   r   r   r   r   r   r   r   r   rw   r   r   r   r   r   r   r   r   r   r  r	  r   r  r  r  r  r  r   r#  r+  r0  r2  r4  r9  r@  rE  rV  rV   r\   rY   rG   rG   ^   sU          ####%%%%11110000WWW [W   [ VVV [V   [ KJJJ      # # # # ;:::" " " X" +++ X+000 X0+++ X+    $ $ $ $ 9888HHHHCCCC@@@@::::PPPP<<<<<<<<* * * * ('''IIII====F F F F 1000   
 
 
 
 TSSS	 	 	 	 >===5555F F F F    A@@@    (''''''',,,,,,,,VVV XVPPP XPA A A A '+         GFFF4444/// X/@@@ X@MMMMDDDD- - - -C C C C C Cr\   rG   )rC   rC   z_ToDict[CompliantSeriesT])r  r1   c                     e Zd ZU ded<   ded<   ded<   ded<   dkdZdldZedmd            ZdndZdodZ	dpdZ
edqd            Zedrd            Zedsd            Zdtd Zdud%Zdsd&Zdvd*Zdwd-Zdxd.Zdyd1Z ed2          dzd6            Zd{d;Zd|d<Zd}dCZd~dHZddKZdodLZddQZ edR          d|dS            ZddVZ dd[Z!dod\Z"dd^Z#dd`Z$ddeZ%ddgZ&ddiZ'djS )rH   r   rN   r2   rO   rP   rQ   r   rR   rS   r*   c                    d S rU   rV   rW   s    rY   __narwhals_lazyframe__z)CompliantLazyFrame.__narwhals_lazyframe__$  r[   r\   r   c                    d S rU   rV   rW   s    rY   r^   z)CompliantLazyFrame.__narwhals_namespace__%  r[   r\   r_   r`   r3   c                  d S rU   rV   rb   s      rY   rm   zCompliantLazyFrame.from_native'  rn   r\   r|   r}   c                    dS r   rV   r   s     rY   r   z CompliantLazyFrame.simple_select*  r   r\   r   r   c                    dS )r   NrV   r   s     rY   r   zCompliantLazyFrame.aggregate.  s	    
 	r\   r   c                    d S rU   rV   r   s     rY   r   z CompliantLazyFrame._with_version5  r[   r\   c                    | j         S rU   r   rW   s    rY   r   zCompliantLazyFrame.native7  r   r\   r   c                    d S rU   rV   rW   s    rY   r   zCompliantLazyFrame.columns;  r   r\   r   c                    d S rU   rV   rW   s    rY   rf   zCompliantLazyFrame.schema=  r   r\   Iterator[Any]c                    d S rU   rV   rW   s    rY   _iter_columnsz CompliantLazyFrame._iter_columns?  r[   r\   r   r   r   r   c                    d S rU   rV   r   s      rY   r   zCompliantLazyFrame.collect@  r   r\   c                    d S rU   rV   rW   s    rY   r   z!CompliantLazyFrame.collect_schemaC  r[   r\   r   r   r   c                   d S rU   rV   r   s      rY   r   zCompliantLazyFrame.dropD  r[   r\   r   r   c                    d S rU   rV   r   s     rY   r   zCompliantLazyFrame.drop_nullsE  r[   r\   c                    d S rU   rV   r   s     rY   r   zCompliantLazyFrame.explodeF  r[   r\   r   r   c                    d S rU   rV   r   s     rY   r   zCompliantLazyFrame.filterG  r[   r\   zO`LazyFrame.gather_every` is deprecated and will be removed in a future version.r   r   r   c                    d S rU   rV   r   s      rY   r   zCompliantLazyFrame.gather_everyH  s	     :=r\   r   r   r   -CompliantGroupBy[Self, CompliantExprT_contra]c                   d S rU   rV   r   s      rY   r   zCompliantLazyFrame.group_byL  s	    
 9<r\   c                    d S rU   rV   r   s     rY   r   zCompliantLazyFrame.headR  r[   r\   r   r   1Literal['left', 'inner', 'cross', 'anti', 'semi']r   r   r   c                   d S rU   rV   r   s         rY   r   zCompliantLazyFrame.joinS  rk   r\   r   r   r   r8   c                   d S rU   rV   r   s           rY   r   zCompliantLazyFrame.join_asof\  r   r\   r   r   c                    d S rU   rV   r   s     rY   r   zCompliantLazyFrame.renameg  r[   r\   c                    d S rU   rV   r   s     rY   r   zCompliantLazyFrame.selecth  r[   r\   r  r  r  r  c                   d S rU   rV   r  s       rY   r  zCompliantLazyFrame.sorti  r  r\   zG`LazyFrame.tail` is deprecated and will be removed in a future version.c                    d S rU   rV   r   s     rY   r  zCompliantLazyFrame.taill  s    $'Cr\   r)  r:   c                   d S rU   rV   )rX   r   r)  s      rY   r+  zCompliantLazyFrame.uniquen  r  r\   r   r   r,  r-  c                    d S rU   rV   r/  s        rY   r0  zCompliantLazyFrame.unpivotq  r{   r\   c                    d S rU   rV   r   s     rY   r2  zCompliantLazyFrame.with_columnsx  r[   r\   r   c                    d S rU   rV   r   s     rY   r4  z!CompliantLazyFrame.with_row_indexy  r[   r\   rH  c               R     ||           }t          |          dk    sJ |d         S N   r   lenrX   rH  results      rY   _evaluate_exprz!CompliantLazyFrame._evaluate_exprz  s0    d6{{aayr\   window_inputsWindowInputs[NativeExprT]LazyExpr[Self, NativeExprT]r   c               h    |                     | |          }t          |          dk    sJ |d         S r  )window_functionr  )rX   rH  r  r  s       rY   _evaluate_window_exprz(CompliantLazyFrame._evaluate_window_expr  s:     %%dM::6{{aayr\   rA  c                b      fd|D             }t          t          j        |                    S )Nc              3  B   K   | ]}|                               V  d S rU   rD  rF  s     rY   rI  z7CompliantLazyFrame._evaluate_aliases.<locals>.<genexpr>  rJ  r\   rK  rN  s   `  rY   rE  z$CompliantLazyFrame._evaluate_aliases  rP  r\   rQ  c                .    t          || j                  S rS  rU  r   s     rY   rV  z'CompliantLazyFrame._check_columns_exist  rW  r\   NrX  rY  rZ  r[  r\  r]  r^  r_  r`  )rS   r  ra  rb  rc  rd  re  rf  )r   r   r   r   rS   r  rg  )r   r*   r   r  r   r   r   r   r   r}   rS   r*   rh  ri  rj  )r   r   r)  r:   rS   r*   rk  rl  )rH  r   rS   r   )r  r  rH  r  rS   r   rm  rn  )(ro  rp  rq  rr  rw  r^   rs  rm   r   r   r   rt  r   r   rf   r  r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r+  r0  r2  r4  r  r  rE  rV  rV   r\   rY   rH   rH     s          ####%%%%11110000VVV [V       ;:::" " " X" +++ X+000 X01111$ $ $ $ 9888HHHHCCCC::::PPPPZY  =<<  =< < < < ('''   
 
 
 
 >===@@@@    ZYZZ''' [Z'       GFFF4444   
   - - - -C C C C C Cr\   rH   c                      e Zd Zd'dZd(dZd)d	Zd*dZd+dZd,dZe	d-d            Z
d.dZd/dZd0dZd1dZd2d Zd3d"Zd4d%Zd&S )5rI   rS   <EagerNamespace[Self, EagerSeriesT, EagerExprT, NativeFrameT]c                    d S rU   rV   rW   s    rY   r^   z%EagerDataFrame.__narwhals_namespace__  s    GJsr\   DataFrame[NativeFrameT]c                :    | j                             | d          S )Nfull)level)rR   	dataframerW   s    rY   to_narwhalszEagerDataFrame.to_narwhals  s    }&&t6&:::r\   rH  r   r   c               R     ||           }t          |          dk    sJ |d         S )z6Evaluate `expr` and ensure it has a **single** output.r  r   r  r  s      rY   r  zEagerDataFrame._evaluate_expr  s0    )-d6{{aayr\   r   Sequence[EagerSeriesT]c                ^     t          t          j         fd|D                                 S )Nc              3  B   K   | ]}                     |          V  d S rU   )_evaluate_into_exprrF  s     rY   rI  z6EagerDataFrame._evaluate_into_exprs.<locals>.<genexpr>  s1      'Y'Y4(@(@(F(F'Y'Y'Y'Y'Y'Yr\   rK  r   s   ` rY   _evaluate_into_exprsz#EagerDataFrame._evaluate_into_exprs  s2    E''Y'Y'Y'YSX'Y'Y'YYYZZZr\   c                   |                     |           } ||           }t          |          d |D             x}k    rd| d| }t          |          |S )a  Return list of raw columns.

        For eager backends we alias operations at each step.

        As a safety precaution, here we can check that the expected result names match those
        we were expecting from the various `evaluate_output_names` / `alias_output_names` calls.

        Note that for PySpark / DuckDB, we are less free to liberally set aliases whenever we want.
        c                    g | ]	}|j         
S rV   )r   )rG  ss     rY   
<listcomp>z6EagerDataFrame._evaluate_into_expr.<locals>.<listcomp>  s    666!qv666r\   z"Safety assertion failed, expected z, got )rE  rL  AssertionError)rX   rH  aliasesr  result_aliasesmsgs         rY   r  z"EagerDataFrame._evaluate_into_expr  sx     ((..d==66v6666N
 
 WwVVnVVC %%%r\   r   r   c                   dS )z@Extract native Series, broadcasting to `len(self)` if necessary.NrV   )rX   r   s     rY   _extract_comparandz!EagerDataFrame._extract_comparand  r   r\   r_   rC   r   r   rA  c               h    t          |p#d t          | j        d                   D                       S )Nc              3      K   | ]	}d | V  
dS )column_NrV   )rG  xs     rY   rI  z5EagerDataFrame._numpy_column_names.<locals>.<genexpr>  s(      LL!!LLLLLLr\   r  )rL  ranger   )r_   r   s     rY   _numpy_column_namesz"EagerDataFrame._numpy_column_names  s4     GLLLuTZ]7K7KLLLMMMr\   r  SizedMultiIndexSelector[Any]r*   c                    d S rU   rV   rX   r  s     rY   _gatherzEagerDataFrame._gather  r[   r\   _SliceIndex | rangec                    d S rU   rV   r  s     rY   _gather_slicezEagerDataFrame._gather_slice  r[   r\   c                    d S rU   rV   r   s     rY   _select_multi_indexz"EagerDataFrame._select_multi_index  r[   r\   SizedMultiNameSelector[Any]c                    d S rU   rV   r   s     rY   _select_multi_namez!EagerDataFrame._select_multi_name  r[   r\   c                    d S rU   rV   r   s     rY   _select_slice_indexz"EagerDataFrame._select_slice_index  r[   r\   rE   c                    d S rU   rV   r   s     rY   _select_slice_namez!EagerDataFrame._select_slice_name  r[   r\   rw   ]tuple[SingleIndexSelector | MultiIndexSelector[EagerSeriesT], MultiColSelector[EagerSeriesT]]c                   |\  }}| }t          |          sZt          |t                    r't          |          dk    r|                                S t          |          rtt          |          st          |          r|                    |          }nt          |          r| 
                    |j                  }n|
                    |          }nt          |t                    r|                    |          }npt          |          r|                     |j                  }nFt          |          r|                     |          }n!dt!          |           }t#          |          t          |          st          |t$                    r|                    |g          }nt          |t          t(          f          r|                    |          }npt          |          r|                    |j                  }nFt-          |          r|                    |          }n!dt!          |           }t#          |          |S )Nr   z'Unreachable code, got unexpected type: )r'   
isinstancer   r  r   r"   r&   r#   r  r!   r  r   slicer  r  r$   typer  r   r  r  r  r%   )rX   rw   r  r   	compliantr  s         rY   rz   zEagerDataFrame.__getitem__  sD    g	W%% 	*'5)) *c'lla.?.? ''))) )) *!'** Ghw.?.? G ) = =g F FII(11 G $ 8 8 H HII ) = =g F FIIGU++ *%88AA		$W-- * 33GNCC		!'** * 33G<<		OWOO$S)))T"" 	*$$$ 
*%--tf55		D5%.11 *%33D99		$T** *%--dk::		.t44 *%--d33		LT

LL$S)))r\   N)rS   r  )rS   r  )rH  r   rS   r   )r   r   rS   r  )rH  r   rS   r  )r   r   rS   r   )r_   rC   r   r   rS   rA  )r  r  rS   r*   )r  r  rS   r*   )r   r  rS   r*   )r   r  rS   r*   )r   r  rS   r*   )r   rE   rS   r*   )rw   r  rS   r*   )ro  rp  rq  r^   r  r  r  r  r  staticmethodr  r  r  r  r  r  r  rz   rV   r\   rY   rI   rI     s       
K K K K; ; ; ;   [ [ [ [   &    N N N \N
 GFFFCCCCUUUUSSSSLLLLBBBB* * * * * *r\   rI   r  )e
__future__r   	itertoolsr   typingr   r   r   r   r	   r
   r   r   r   r   narwhals._compliant.typingr   r   r   r   r   r   r   r   narwhals._translater   r   r   r   r   r   narwhals._typing_compatr   narwhals._utilsr   r   r    r!   r"   r#   r$   r%   r&   r'   ior(   pathlibr)   pandaspdpolarsplpyarrowpatyping_extensionsr*   r+   narwhals._compliant.exprr,   narwhals._compliant.group_byr-   r.   narwhals._compliant.namespacer/   narwhals._compliant.windowr0   r1   r2   r3   narwhals.dataframer4   narwhals.dtypesr5   narwhals.exceptionsr6   narwhals.schemar7   narwhals.typingr8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rr  __all__rJ   rL   r}   rG   rH   rI   rV   r\   rY   <module>r     sH   " " " " " " "                             	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	                / . . . . .                         $ 11111111111111OOOOOOOO<<<<<<777777222222<<<<<<<<,,,,,,%%%%%%777777&&&&&&                               "  J
H
H
HGCLLI I I I IxC xC xC xC xC+,/c1BBC12,|~	4lNRSxC xC xCvuC uC uC uC uC,|~"L.@A	uC uC uCpc c c c c|Z?XXYz<1JJK\:|34c c c c cr\   