
    g$                       U 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rqd d
lZd dlmZ d dlmZ ej                   dk\  rd dlmZ n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  G d de      Z G d de      Z G d de      Z G d de      Z  G d de      Z! G d d e      Z" e	d!e d"#      Z# G d$ d%eee#         Z$ G d& d'eee#         Z%e
d(e&d)f   Z'd*e(d+<   	 e
d,   Z)d*e(d-<   	 e
d.   Z*d*e(d/<   	 e
d0   Z+d*e(d1<   	 e
d2   Z,d*e(d3<   	  e	d4d/5      Z-	  e	d6d-5      Z.	  e	d7d15      Z/	  e	d8d95      Z0	  e	d:d35      Z1	 ed;   Z2d*e(d<<    G d= d>      Z3g d?Z4y
)@    )annotations)TYPE_CHECKING)Any)Generic)Literal)Protocol)Sequence)TypeVar)UnionN)DType)Implementation)   
   )	TypeAlias)Self)dtypes)	DataFrame)	LazyFrame)Expr)Seriesc                  &    e Zd Zedd       ZddZy)NativeFramec                     y N selfs    D/var/www/openai/venv/lib/python3.12/site-packages/narwhals/typing.pycolumnszNativeFrame.columns#   s    "%    c                     y r   r   r   argskwargss      r   joinzNativeFrame.join&   s    #r    Nreturnr   r#   r   r$   r   r'   r   )__name__
__module____qualname__propertyr   r%   r   r    r   r   r   "   s    	% 
%=r    r   c                      e Zd ZddZy)NativeSeriesc                     y r   r   r   s    r   __len__zNativeSeries.__len__)   s    #r    N)r'   int)r)   r*   r+   r0   r   r    r   r.   r.   (   s    %r    r.   c                      e Zd ZddZy)DataFrameLikec                     y r   r   r"   s      r   __dataframe__zDataFrameLike.__dataframe__,   s    3r    Nr(   )r)   r*   r+   r5   r   r    r   r3   r3   +   s    Fr    r3   c                  .    e Zd Zedd       ZddZddZy)CompliantSeriesc                     y r   r   r   s    r   namezCompliantSeries.name0   s    r    c                     y r   r   r   s    r   __narwhals_series__z#CompliantSeries.__narwhals_series__2   s    cr    c                     y r   r   r   r9   s     r   aliaszCompliantSeries.alias3       r    N)r'   str)r'   r7   r9   r@   r'   r   )r)   r*   r+   r,   r9   r;   r>   r   r    r   r7   r7   /   s     9+r    r7   c                      e Zd ZddZddZy)CompliantDataFramec                     y r   r   r   s    r   __narwhals_dataframe__z)CompliantDataFrame.__narwhals_dataframe__7       Cr    c                     y r   r   r   s    r   __narwhals_namespace__z)CompliantDataFrame.__narwhals_namespace__8       Sr    N)r'   rC   r&   )r)   r*   r+   rE   rH   r   r    r   rC   rC   6       ?0r    rC   c                      e Zd ZddZddZy)CompliantLazyFramec                     y r   r   r   s    r   __narwhals_lazyframe__z)CompliantLazyFrame.__narwhals_lazyframe__<   rF   r    c                     y r   r   r   s    r   rH   z)CompliantLazyFrame.__narwhals_namespace__=   rI   r    N)r'   rL   r&   )r)   r*   r+   rN   rH   r   r    r   rL   rL   ;   rJ   r    rL   CompliantSeriesT_coT)bound	covariantc                      e Zd ZU ded<   ded<   ded<   ded<   ded	<   d
ed<   ded<   ddZddZd dZd!dZd"dZd#dZ	d$dZ
d$dZd$dZd$dZd$dZd$dZd$dZd$dZd$dZy)%CompliantExprr   _implementationztuple[int, ...]_backend_versionzlist[str] | None_output_names_root_namesr1   _depthr@   _function_namezdict[str, Any]_kwargsc                     y r   r   )r   dfs     r   __call__zCompliantExpr.__call__N   s    #r    c                     y r   r   r   s    r   __narwhals_expr__zCompliantExpr.__narwhals_expr__O   s    r    c                     y r   r   r   s    r   rH   z$CompliantExpr.__narwhals_namespace__P   s    QTr    c                     y r   r   r   s    r   is_nullzCompliantExpr.is_nullQ   s    sr    c                     y r   r   r=   s     r   r>   zCompliantExpr.aliasR   r?   r    c                     y r   r   )r   dtypes     r   castzCompliantExpr.castS       #r    c                     y r   r   r   others     r   __and__zCompliantExpr.__and__T       3r    c                     y r   r   rj   s     r   __or__zCompliantExpr.__or__U   rh   r    c                     y r   r   rj   s     r   __add__zCompliantExpr.__add__V   rm   r    c                     y r   r   rj   s     r   __sub__zCompliantExpr.__sub__W   rm   r    c                     y r   r   rj   s     r   __mul__zCompliantExpr.__mul__X   rm   r    c                     y r   r   rj   s     r   __floordiv__zCompliantExpr.__floordiv__Y   s    r    c                     y r   r   rj   s     r   __truediv__zCompliantExpr.__truediv__Z   s    sr    c                     y r   r   rj   s     r   __mod__zCompliantExpr.__mod__[   rm   r    c                     y r   r   rj   s     r   __pow__zCompliantExpr.__pow__\   rm   r    N)r]   r   r'   zSequence[CompliantSeriesT_co])r'   None)r'   z'CompliantNamespace[CompliantSeriesT_co])r'   r   rA   )rf   r   r'   r   )rk   r   r'   r   )r)   r*   r+   __annotations__r^   r`   rH   rc   r>   rg   rl   ro   rq   rs   ru   rw   ry   r{   r}   r   r    r   rT   rT   E   sX    ##%%##!!KE,T"+-.-...32..r    rT   c                  (    e Zd ZddZ	 	 	 	 	 	 ddZy)CompliantNamespacec                     y r   r   )r   column_namess     r   colzCompliantNamespace.col`   s    Sr    c                     y r   r   )r   valuerf   s      r   litzCompliantNamespace.lita   s    -0r    N)r   r@   r'   "CompliantExpr[CompliantSeriesT_co])r   r   rf   zDType | Noner'   r   )r)   r*   r+   r   r   r   r    r   r   r   _   s"    P11!-1	+1r    r   r   Series[Any]r   IntoExpr)r   DataFrame[Any]r3   IntoDataFrame)r   r   LazyFrame[Any]r3   	IntoFrame)r   r   Frame)r   r.   
IntoSeries
IntoFrameT)rQ   IntoDataFrameTFrameT
DataFrameTr   IntoSeriesT)
bkbmbgbtbbytes	kilobytes	megabytes	gigabytes	terabytesSizeUnitc                     e Zd ZU ded<   ded<   ded<   ded<   d	ed
<   ded<   ded<   ded<   ded<   ded<   ded<   ded<   ded<   ded<   ded<   ded <   d!ed"<   d#ed$<   d%ed&<   d'ed(<   d)ed*<   d+ed,<   d-ed.<   d/ed0<   d1ed2<   d3ed4<   y5)6DTypesztype[dtypes.Decimal]Decimalztype[dtypes.Int128]Int128ztype[dtypes.Int64]Int64ztype[dtypes.Int32]Int32ztype[dtypes.Int16]Int16ztype[dtypes.Int8]Int8ztype[dtypes.UInt128]UInt128ztype[dtypes.UInt64]UInt64ztype[dtypes.UInt32]UInt32ztype[dtypes.UInt16]UInt16ztype[dtypes.UInt8]UInt8ztype[dtypes.Float64]Float64ztype[dtypes.Float32]Float32ztype[dtypes.String]Stringztype[dtypes.Boolean]Booleanztype[dtypes.Object]Objectztype[dtypes.Categorical]Categoricalztype[dtypes.Enum]Enumztype[dtypes.Datetime]Datetimeztype[dtypes.Duration]Durationztype[dtypes.Date]Dateztype[dtypes.Field]Fieldztype[dtypes.Struct]Structztype[dtypes.List]Listztype[dtypes.Array]Arrayztype[dtypes.Unknown]UnknownN)r)   r*   r+   r   r   r    r   r   r      s    !!
!!!!!!!!))
####

!!r    r   )rC   rL   r7   r   r   r   r   r   r   r   r   r   r   )5
__future__r   typingr   r   r   r   r   r	   r
   r   sysnarwhals.dtypesr   narwhals.utilsr   version_infor   typing_extensionsr   narwhalsr   narwhals.dataframer   r   narwhals.exprr   narwhals.seriesr   r   r.   r3   r7   rC   rL   rP   rT   r   r@   r   r   r   r   r   r   r   r   r   r   r   r   r   __all__r   r    r   <module>r      s   "         %-
7"$/&,,"&
>h >&x &G G,h ,1 1
1 1
 D 
/Hg&9: /417+>#? 1 FC67) 7 !!QRy R
 F	9  ;<y < ;<
I < \5
 )A 
	) \)9:
 m<8 	) " ":r    