Ë
    7Ò^j¡  ã                  ó  — 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
 d dlZd dlmZmZ d dlmZ d dlmZmZ d dlmZ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"m#Z# d d
l$m%Z&m'Z( d dl)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZF d dlGmHZH d dlImJZK d dlLmMZMmNZNmOZO d dlPmQZR d dlSmTZU d dlVmWZWmXZXmYZY d dlZm[Z[m\Z\m]Z]m^Z^m_Z_m`Z`maZambZb d dlcmdZdmeZemfZf errd dlgmhZhmiZimjZjmkZk d dllmmZmmnZnmoZo d dlpmqZqmrZrmsZsmtZtmuZumvZvmwZw d dlxmyZymzZzm{Z{m|Z|m}Z}m~Z~mZ d dl$m€Z€m�Z� d dl‚mƒZƒm„Z„m…Z…m†Z†m‡Z‡mˆZˆm‰Z‰mŠZŠm‹Z‹  ede¬«      ZŒ emd«      Z� ed«      ZŽ G d„ de&e\   «      Z% G d „ d!e(e^   «      Z' G d"„ d#eUe`   «      ZT G d$„ d%eK«      ZJ G d&„ d'eR«      ZQe
dsd(„«       Z�e
dtd)„«       Z�e
dud*„«       Z�e
dvd+„«       Z�	 	 	 	 dwd,„Z�e
dxd-„«       Z�e
dyd.„«       Z�e
	 	 	 	 	 	 dzd/„«       Z�e
d{d0„«       Z�e
	 	 	 	 	 	 d|d1„«       Z�e
	 	 	 	 	 	 d}d2„«       Z�e
	 	 	 	 	 	 d~d3„«       Z�e
	 	 	 	 	 	 dd4„«       Z�e
	 	 	 	 	 	 d€d5„«       Z�e
	 	 	 	 	 	 d�d6„«       Z�e
d‚d7„«       Z�e
	 	 	 	 	 	 	 	 	 	 	 	 dƒd8„«       Z�d9d9d9dd:œ	 	 	 	 	 	 	 	 	 	 	 d„d;„Z�e
d<d=œ	 	 	 	 	 d…d>„«       Z‘e
d<d=œ	 	 	 	 	 d†d?„«       Z‘e
d<d=œ	 	 	 	 	 d‡d@„«       Z‘e
dˆdA„«       Z‘d9d=œ	 	 	 	 	 d‰dB„Z‘	 dŠdCd9d9dCd:œ	 	 	 	 	 	 	 	 	 	 	 d‹dD„Z’dŒdE„Z“d�dF„Z”d�dG„Z•dŽdH„Z–dŒdI„Z—dŠd�dJ„Z˜d�dK„Z™d�dL„Zšd�dM„Z›d�dN„Zœd�dO„Z�d‘dP„Zžd’dQ„ZŸd’dR„Z d‘dS„Z¡d‘dT„Z¢d‘dU„Z£	 d“	 	 	 	 	 	 	 d”dV„Z¤dWdXœd•dY„Z¥dZd9d[œ	 	 	 	 	 	 	 	 	 d–d\„Z¦d—d]„Z§d˜d^„Z¨ G d_„ d`e�jR                  «      Z© G da„ dbe�jT                  eJ«      Zªd™dc„Z«	 dŠ	 	 	 	 	 	 	 	 	 dšdd„Z¬	 	 	 	 	 	 d›de„Z­	 dŠddfœ	 	 	 	 	 	 	 dœdg„Z®e%�j^                  Z¯dhe°di<   	 dŠ	 	 	 	 	 	 	 d�dj„Z±dkdlœ	 	 	 	 	 	 	 	 	 dždm„Z²dkdlœ	 	 	 	 	 	 	 	 	 dŸdn„Z³	 	 	 	 	 	 	 	 d do„Z´	 	 	 	 	 	 	 	 d¡dp„Zµd¢dq„Z¶g dr¢Z·y)£é    )Úannotations©Úwraps)ÚTYPE_CHECKINGÚAnyÚFinalÚLiteralÚcastÚoverloadN)Ú
exceptionsÚ	functions)Úissue_warning)ÚExprKindÚExprNode)ÚTypeVarÚassert_never)ÚImplementationÚVersionÚgenerate_temporary_column_nameÚinherit_docÚis_ordered_categoricalÚmaybe_align_indexÚmaybe_convert_dtypesÚmaybe_get_indexÚmaybe_reset_indexÚmaybe_set_indexÚnot_implemented)Ú	DataFrameÚ	LazyFrame)ÚArrayÚBinaryÚBooleanÚCategoricalÚDateÚDatetimeÚDecimalÚDurationÚEnumÚFieldÚFloat16ÚFloat32ÚFloat64ÚInt8ÚInt16ÚInt32ÚInt64ÚInt128ÚListÚObjectÚStringÚStructÚTimeÚUInt8ÚUInt16ÚUInt32ÚUInt64ÚUInt128ÚUnknown)ÚNarwhalsUnstableWarning)ÚExpr)Ú_new_series_implÚconcatÚshow_versions)ÚSchema)ÚSeries)ÚdependenciesÚdtypesÚ	selectors)Ú
DataFrameTÚIntoDataFrameTÚ	IntoFrameÚIntoLazyFrameTÚ
IntoSeriesÚIntoSeriesTÚ
LazyFrameTÚSeriesT)Ú_from_native_implÚget_native_namespaceÚto_py_scalar)ÚCallableÚIterableÚMappingÚSequence)Ú	ParamSpecÚSelfÚUnpack)ÚAllowAnyÚ	AllowLazyÚAllowSeriesÚExcludeSeriesÚIntoArrowTableÚ
OnlySeriesÚPassThroughUnknown)ÚArrowÚBackendÚEagerAllowedÚIntoBackendÚLazyAllowedÚPandasÚPolars)ÚMultiColSelectorÚMultiIndexSelector)	Ú	IntoDTypeÚIntoExprÚ
IntoSchemaÚNonNestedLiteralÚPythonLiteralÚSingleColSelectorÚSingleIndexSelectorÚ_1DArrayÚ_2DArrayÚT)ÚdefaultÚPÚRc                  ó  ‡ — e Zd Zej                  Z ee«      dˆ fd„«       Ze		 	 	 	 	 	 dˆ fd„«       Z
e		 dddœ	 	 	 	 	 	 	 dˆ fd„«       Ze		 d	 	 	 	 	 	 	 dˆ fd„«       Ze		 d	 	 	 	 	 	 	 dˆ fd„«       Zed d„«       Zed!d	„«       Zed"d
„«       Ze	 	 	 	 d#d„«       Ze	 	 	 	 d$d„«       Z	 	 	 	 d%ˆ fd„Zd&ˆ fd„Z	 dddœ	 	 	 	 	 d'ˆ fd„Zeddœd(d„«       Zed)d„«       Zeddœ	 	 	 d*d„«       Zddœ	 	 	 d*ˆ fd„Zd+ˆ fd„Zd+ˆ fd„Zˆ xZS ),r   c               ód   •— |j                   t        j                  u sJ ‚t        ‰| �  ||¬«       y ©N)Úlevel©Ú_versionr   ÚV2ÚsuperÚ__init__©ÚselfÚdfry   Ú	__class__s      €úf/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/narwhals/stable/v2/__init__.pyr~   zDataFrame.__init__v   ó+   ø€ à�{‰{œgŸj™jÑ(Ð(Ð(Ü‰Ñ˜ 5ÐÕ)ó    c               ó>   •— t         ‰| �  ||¬«      }t        d|«      S ©N©ÚbackendúDataFrame[Any])r}   Ú
from_arrowr
   )ÚclsÚnative_framer‰   Úresultr‚   s       €rƒ   r‹   zDataFrame.from_arrow~   s'   ø€ ô ‘Ñ# L¸'Ð#ÓBˆÜÐ$ fÓ-Ð-r…   Nrˆ   c               ó@   •— t         ‰| �  |||¬«      }t        d|«      S r‡   )r}   Ú	from_dictr
   ©rŒ   ÚdataÚschemar‰   rŽ   r‚   s        €rƒ   r�   zDataFrame.from_dict…   s)   ø€ ô ‘Ñ" 4¨¸Ð"ÓAˆÜÐ$ fÓ-Ð-r…   c               ó@   •— t         ‰| �  |||¬«      }t        d|«      S r‡   )r}   Ú
from_dictsr
   r‘   s        €rƒ   r•   zDataFrame.from_dicts�   ó)   ø€ ô ‘Ñ# D¨&¸'Ð#ÓBˆÜÐ$ fÓ-Ð-r…   c               ó@   •— t         ‰| �  |||¬«      }t        d|«      S r‡   ©r}   Ú
from_numpyr
   r‘   s        €rƒ   r™   zDataFrame.from_numpy›   r–   r…   c                ó"   — t        dt        «      S )Nútype[Series[Any]])r
   rC   ©r€   s    rƒ   Ú_serieszDataFrame._series¦   s   € äÐ'¬Ó0Ð0r…   c                ó"   — t        dt        «      S )Nútype[LazyFrame[Any]])r
   r   rœ   s    rƒ   Ú
_lazyframezDataFrame._lazyframeª   s   € äÐ*¬IÓ6Ð6r…   c                 ó   — y ©N© ©r€   Úitems     rƒ   Ú__getitem__zDataFrame.__getitem__®   s   € ØWZr…   c                 ó   — y r¢   r£   r¤   s     rƒ   r¦   zDataFrame.__getitem__±   s   € ð r…   c                 ó   — y r¢   r£   r¤   s     rƒ   r¦   zDataFrame.__getitem__¶   s   € ð r…   c                ó"   •— t         ‰| �  |«      S r¢   )r}   r¦   )r€   r¥   r‚   s     €rƒ   r¦   zDataFrame.__getitem__Á   s   ø€ ô ‰wÑ" 4Ó(Ð(r…   c                ó"   •— t         ‰| �  |«      S r¢   )r}   Ú
get_column)r€   Únamer‚   s     €rƒ   r«   zDataFrame.get_columnÐ   s   ø€ ô ‰wÑ! $Ó'Ð'r…   )Úsessionc               ó8   •— t        t        ‰| �	  ||¬«      «      S )N)r‰   r­   )Ú
_stableifyr}   Úlazy)r€   r‰   r­   r‚   s      €rƒ   r°   zDataFrame.lazyÕ   s   ø€ ô œ%™'™,¨wÀ˜,ÓHÓIÐIr…   .©Ú	as_seriesc                ó   — y r¢   r£   ©r€   r²   s     rƒ   Úto_dictzDataFrame.to_dictÝ   s   € ØTWr…   c                ó   — y r¢   r£   r´   s     rƒ   rµ   zDataFrame.to_dictß   s   € ØMPr…   Tc                ó   — y r¢   r£   r´   s     rƒ   rµ   zDataFrame.to_dictá   s   € ð 9<r…   c               ó$   •— t         ‰| �  |¬«      S )Nr±   )r}   rµ   )r€   r²   r‚   s     €rƒ   rµ   zDataFrame.to_dictå   s   ø€ ô
 ‰w‰¨ˆÓ3Ð3r…   c                ó2   •— t        t        ‰| �	  «       «      S r¢   )r¯   r}   Úis_duplicated©r€   r‚   s    €rƒ   rº   zDataFrame.is_duplicatedì   s   ø€ Üœ%™'Ñ/Ó1Ó2Ð2r…   c                ó2   •— t        t        ‰| �	  «       «      S r¢   )r¯   r}   Ú	is_uniquer»   s    €rƒ   r½   zDataFrame.is_uniqueï   s   ø€ Üœ%™'Ñ+Ó-Ó.Ð.r…   ©r�   r   ry   ú&Literal['full', 'lazy', 'interchange']ÚreturnÚNone©r�   r]   r‰   úIntoBackend[EagerAllowed]rÀ   rŠ   r¢   ©r’   zMapping[str, Any]r“   ú2IntoSchema | Mapping[str, IntoDType | None] | Noner‰   z IntoBackend[EagerAllowed] | NonerÀ   rŠ   )r’   zSequence[Mapping[str, Any]]r“   rÅ   r‰   rÃ   rÀ   rŠ   ©r’   rq   r“   z!IntoSchema | Sequence[str] | Noner‰   rÃ   rÀ   rŠ   )rÀ   r›   )rÀ   rŸ   )r¥   z-tuple[SingleIndexSelector, SingleColSelector]rÀ   r   )r¥   z2str | tuple[MultiIndexSelector, SingleColSelector]rÀ   úSeries[Any])r¥   z˜SingleIndexSelector | MultiIndexSelector | MultiColSelector | tuple[SingleIndexSelector, MultiColSelector] | tuple[MultiIndexSelector, MultiColSelector]rÀ   rW   )r¥   a  SingleIndexSelector | SingleColSelector | MultiColSelector | MultiIndexSelector | tuple[SingleIndexSelector, SingleColSelector] | tuple[SingleIndexSelector, MultiColSelector] | tuple[MultiIndexSelector, SingleColSelector] | tuple[MultiIndexSelector, MultiColSelector]rÀ   zSeries[Any] | Self | Any)r¬   ÚstrrÀ   rÇ   )r‰   zIntoBackend[LazyAllowed] | Noner­   z
Any | NonerÀ   úLazyFrame[Any])r²   zLiteral[True]rÀ   zdict[str, Series[Any]])r²   úLiteral[False]rÀ   zdict[str, list[Any]])r²   ÚboolrÀ   z-dict[str, Series[Any]] | dict[str, list[Any]])rÀ   rÇ   )Ú__name__Ú
__module__Ú__qualname__r   r|   r{   r   ÚNwDataFramer~   Úclassmethodr‹   r�   r•   r™   Úpropertyr�   r    r   r¦   r«   r°   rµ   rº   r½   Ú__classcell__©r‚   s   @rƒ   r   r   s   s`  ø„ Ø�z‰z€Há�Óô*ó ð*ð ð.Ø)ð.Ø7Pð.à	ô.ó ð.ð ð FJð.ð
 59ñ.àð.ð Cð.ð
 2ð.ð 
ô.ó ð.ð ð FJð.à)ð.ð Cð.ð
 +ð.ð 
ô.ó ð.ð ð 59ð.àð.ð 2ð.ð
 +ð.ð 
ô.ó ð.ð ò1ó ð1ð ò7ó ð7ð ÚZó ØZàðØFðà	òó ðð ð	ð:ð	ð 
ò	ó ð	ð)ð:ð)ð 
"õ)õ(ð 48ðJð #ñ	Jà0ðJð ð	Jð
 
õJð Ø47ÔWó ØWØÚPó ØPØà#'ñ<Ø ð<à	6ò<ó ð<ð $(ñ4Ø ð4à	6õ4õ3÷/ñ /r…   r   c                  óz   ‡ — e Zd Zej                  Z ee«      dˆ fd„«       Ze	dd„«       Z
	 d	 	 	 	 	 dˆ fd„Zˆ xZS )r   c               ód   •— |j                   t        j                  u sJ ‚t        ‰| �  ||¬«       y rx   rz   r   s      €rƒ   r~   zLazyFrame.__init__ö   r„   r…   c                ó   — t         S r¢   ©r   rœ   s    rƒ   Ú
_dataframezLazyFrame._dataframeû   ó   € äÐr…   c                ó8   •— t        t        ‰| �  dd|i|¤Ž«      S )Nr‰   r£   )r¯   r}   Úcollect)r€   r‰   Úkwargsr‚   s      €rƒ   rÛ   zLazyFrame.collectÿ   s!   ø€ ô œ%™'™/ÑD°'ÐD¸VÑDÓEÐEr…   r¾   ©rÀ   ztype[DataFrame[Any]]r¢   )r‰   z+IntoBackend[Polars | Pandas | Arrow] | NonerÜ   r   rÀ   rŠ   )rÌ   rÍ   rÎ   r   r|   r{   r   ÚNwLazyFramer~   rÑ   rØ   rÛ   rÒ   rÓ   s   @rƒ   r   r   ó   se   ø„ Ø�z‰z€Há�Óô*ó ð*ð òó ðð FJðFØBðFØUXðFà	÷Fñ Fr…   r   c                  ó&  ‡ — e Zd ZU ej                  Z ee«      	 	 	 	 	 	 dˆ fd„«       Ze	dd„«       Z
e	 d	 	 	 	 	 	 	 	 	 dˆ fd„«       Ze	 d	 	 	 	 	 	 	 	 	 dˆ fd„«       Zdˆ fd„Zddddd	œ	 	 	 	 	 	 	 	 	 dˆ fd
„Z e«       Zded<   ddœdˆ fd„Zˆ xZS )rC   r   c               ód   •— |j                   t        j                  u sJ ‚t        ‰| �  ||¬«       y rx   rz   )r€   Úseriesry   r‚   s      €rƒ   r~   zSeries.__init__  s-   ø€ ð �‰¤'§*¡*Ñ,Ð,Ð,Ü‰Ñ˜ uÐÕ-r…   c                ó   — t         S r¢   r×   rœ   s    rƒ   rØ   zSeries._dataframe  rÙ   r…   Nc               óB   •— t         ‰| �  ||||¬«      }t        d|«      S ©Nrˆ   rÇ   r˜   ©rŒ   r¬   ÚvaluesÚdtyper‰   rŽ   r‚   s         €rƒ   r™   zSeries.from_numpy  s*   ø€ ô ‘Ñ# D¨&°%ÀÐ#ÓIˆÜ�M 6Ó*Ð*r…   c               óB   •— t         ‰| �  ||||¬«      }t        d|«      S rä   )r}   Úfrom_iterabler
   rå   s         €rƒ   ré   zSeries.from_iterable"  s*   ø€ ô ‘Ñ& t¨V°UÀGÐ&ÓLˆÜ�M 6Ó*Ð*r…   c                ó2   •— t        t        ‰| �	  «       «      S r¢   )r¯   r}   Úto_framer»   s    €rƒ   rë   zSeries.to_frame.  s   ø€ Üœ%™'Ñ*Ó,Ó-Ð-r…   F©ÚsortÚparallelr¬   Ú	normalizec               ó<   •— t        t        ‰| �	  ||||¬«      «      S )Nrì   )r¯   r}   Úvalue_counts)r€   rí   rî   r¬   rï   r‚   s        €rƒ   rñ   zSeries.value_counts1  s-   ø€ ô Ü‰GÑ Ø H°4À9ð !ó ó
ð 	
r…   Úhist©Úignore_nullsc               óH   •— d}t        |t        «       t        ‰| �  |¬«      S )Nz_`Series.any_value` is being called from the stable API although considered an unstable feature.ró   )r   r=   r}   Ú	any_value)r€   rô   Úmsgr‚   s      €rƒ   rö   zSeries.any_valueB  s-   ø€ ð#ð 	ô 	�cÔ2Ô3Ü‰wÑ ¨lÐ Ó;Ð;r…   )rá   r   ry   r¿   rÀ   rÁ   rÝ   r¢   )
r¬   rÈ   ræ   rp   rç   úIntoDType | Noner‰   rÃ   rÀ   rÇ   )
r¬   rÈ   ræ   zIterable[Any]rç   rø   r‰   rÃ   rÀ   rÇ   )rÀ   rŠ   )
rí   rË   rî   rË   r¬   z
str | Nonerï   rË   rÀ   rŠ   )rô   rË   rÀ   rm   )rÌ   rÍ   rÎ   r   r|   r{   r   ÚNwSeriesr~   rÑ   rØ   rÐ   r™   ré   rë   rñ   r   rò   Ú__annotations__rö   rÒ   rÓ   s   @rƒ   rC   rC     sG  ø… Ø�z‰z€Há�Óð.Øð.Ø%Kð.à	ô.ó ð.ð òó ðð ð
 #'ð		+àð	+ð ð	+ð  ð		+ð +ð	+ð 
ô	+ó ð	+ð ð
 #'ð		+àð	+ð ð	+ð  ð		+ð +ð	+ð 
ô	+ó ð	+õ.ð ØØØñ
ð ð
ð ð	
ð
 ð
ð ð
ð 
õ
ñ  Ó!€Dˆ#Ó!à05÷ <ó <r…   rC   c                  ó*   — e Zd Zddœdd„Zdd„Zdd„Zy)	r>   Fró   c               ó|   — d}t        |t        «       | j                  t        t        j
                  d|¬«      «      S )Nz]`Expr.any_value` is being called from the stable API although considered an unstable feature.rö   ró   )r   r=   Ú_append_noder   r   ÚAGGREGATION)r€   rô   r÷   s      rƒ   rö   zExpr.any_valueL  s>   € ð#ð 	ô 	�cÔ2Ô3Ø× Ñ Ü”X×)Ñ)¨;À\ÔRó
ð 	
r…   c                óT   — | j                  t        t        j                  d«      «      S )zGet the first value.Úfirst©rý   r   r   ÚORDERABLE_AGGREGATIONrœ   s    rƒ   r   z
Expr.firstV  s    € à× Ñ ¤¬(×*HÑ*HÈ'Ó!RÓSÐSr…   c                óT   — | j                  t        t        j                  d«      «      S )zGet the last value.Úlastr  rœ   s    rƒ   r  z	Expr.lastZ  s    € à× Ñ ¤¬(×*HÑ*HÈ&Ó!QÓRÐRr…   N)rô   rË   rÀ   rW   )rÀ   rW   )rÌ   rÍ   rÎ   rö   r   r  r£   r…   rƒ   r>   r>   K  s   „ Ø05õ 
óTôSr…   r>   c                  ó$   — e Zd Zej                  Zy)rB   N)rÌ   rÍ   rÎ   r   r|   r{   r£   r…   rƒ   rB   rB   _  s   „ Ø�z‰z�Hr…   rB   c                 ó   — y r¢   r£   ©Úobjs    rƒ   r¯   r¯   c  ó   € ØORr…   c                 ó   — y r¢   r£   r  s    rƒ   r¯   r¯   e  r	  r…   c                 ó   — y r¢   r£   r  s    rƒ   r¯   r¯   g  ó   € ØCFr…   c                 ó   — y r¢   r£   r  s    rƒ   r¯   r¯   i  s   € Ø%(r…   c                ó2  — t        | t        «      r>t        | j                  j	                  t
        j                  «      | j                  ¬«      S t        | t        «      r>t        | j                  j	                  t
        j                  «      | j                  ¬«      S t        | t        «      r>t        | j                  j	                  t
        j                  «      | j                  ¬«      S t        | t        «      rt        | j                  Ž S t!        | «       y rx   )Ú
isinstancerÏ   r   Ú_compliant_frameÚ_with_versionr   r|   Ú_levelrÞ   r   rù   rC   Ú_compliant_seriesÚNwExprr>   Ú_nodesr   r  s    rƒ   r¯   r¯   m  sµ   € ô �#”{Ô#Ü˜×-Ñ-×;Ñ;¼G¿J¹JÓGÈsÏzÉzÔZÐZÜ�#”{Ô#Ü˜×-Ñ-×;Ñ;¼G¿J¹JÓGÈsÏzÉzÔZÐZÜ�#”xÔ Ü�c×+Ñ+×9Ñ9¼'¿*¹*ÓEÈSÏZÉZÔXÐXÜ�#”vÔÜ�S—Z‘ZÐ Ð Ü�Õr…   c                 ó   — y r¢   r£   ©Únative_objectÚkwdss     rƒ   Úfrom_nativer  ~  s   € ØPSr…   c                 ó   — y r¢   r£   r  s     rƒ   r  r  €  s   € ØQTr…   c                 ó   — y r¢   r£   r  s     rƒ   r  r  ‚  s   € ð r…   c                 ó   — y r¢   r£   r  s     rƒ   r  r  ‡  s   € ØUXr…   c                 ó   — y r¢   r£   r  s     rƒ   r  r  ‰  ó   € ð !$r…   c                 ó   — y r¢   r£   r  s     rƒ   r  r  �  ó   € ð r…   c                 ó   — y r¢   r£   r  s     rƒ   r  r  ‘  r!  r…   c                 ó   — y r¢   r£   r  s     rƒ   r  r  •  r  r…   c                 ó   — y r¢   r£   r  s     rƒ   r  r  ™  s   € ð 7:r…   c                 ó   — y r¢   r£   r  s     rƒ   r  r  �  s	   € ð SVr…   c                 ó   — y r¢   r£   r  s     rƒ   r  r  ¡  s   € ØLOr…   c                ó   — y r¢   r£   ©r  Úpass_throughÚ
eager_onlyÚseries_onlyÚallow_seriess        rƒ   r  r  ¤  s   € ð r…   F©r)  r*  r+  r,  c          	     ó¢   — t        | t        t        f«      r|s| S t        | t        «      r|s|r| S t	        | ||||dt
        j                  ¬«      S )a�  Convert `native_object` to Narwhals Dataframe, Lazyframe, or Series.

    Arguments:
        native_object: Raw object from user.
            Depending on the other arguments, input object can be

            - a Dataframe / Lazyframe / Series supported by Narwhals (pandas, Polars, PyArrow, ...)
            - an object which implements `__narwhals_dataframe__`, `__narwhals_lazyframe__`,
              or `__narwhals_series__`
        pass_through: Determine what happens if the object can't be converted to Narwhals

            - `False` (default): raise an error
            - `True`: pass object through as-is
        eager_only: Whether to only allow eager objects

            - `False` (default): don't require `native_object` to be eager
            - `True`: only convert to Narwhals if `native_object` is eager
        series_only: Whether to only allow Series

            - `False` (default): don't require `native_object` to be a Series
            - `True`: only convert to Narwhals if `native_object` is a Series
        allow_series: Whether to allow Series (default is only Dataframe / Lazyframe)

            - `False` or `None` (default): don't convert to Narwhals if `native_object` is a Series
            - `True`: allow `native_object` to be a Series

    Returns:
        DataFrame, LazyFrame, Series, or original object, depending
            on which combination of parameters was passed.
    F)r)  r*  r+  r,  Úeager_or_interchange_onlyÚversion)r  r   r   rC   rO   r   r|   r(  s        rƒ   r  r  ­  sV   € ôX �-¤)¬YÐ!7Ô8ÁØÐÜ�-¤Ô(©k¹\ØÐäØØ!ØØØ!Ø"'Ü—
‘
ôð r…   .©r)  c                ó   — y r¢   r£   ©Únarwhals_objectr)  s     rƒ   Ú	to_nativer5  é  ó   € ð r…   c                ó   — y r¢   r£   r3  s     rƒ   r5  r5  í  r6  r…   c                ó   — y r¢   r£   r3  s     rƒ   r5  r5  ñ  s   € ð r…   c                ó   — y r¢   r£   r3  s     rƒ   r5  r5  õ  r  r…   c               ó0   — t        j                  | |¬«      S )a]  Convert Narwhals object to native one.

    Arguments:
        narwhals_object: Narwhals object.
        pass_through: Determine what happens if `narwhals_object` isn't a Narwhals class

            - `False` (default): raise an error
            - `True`: pass object through as-is

    Returns:
        Object of class that user started with.
    r1  )Únwr5  r3  s     rƒ   r5  r5  ù  s   € ô& �<‰<˜°lÔCÐCr…   Tc               ó4   ‡‡‡‡— dˆˆˆˆfd„}| €|S  || «      S )aþ  Decorate function so it becomes dataframe-agnostic.

    This will try to convert any dataframe/series-like object into the Narwhals
    respective DataFrame/Series, while leaving the other parameters as they are.
    Similarly, if the output of the function is a Narwhals DataFrame or Series, it will be
    converted back to the original dataframe/series type, while if the output is another
    type it will be left as is.
    By setting `pass_through=False`, then every input and every output will be required to be a
    dataframe/series-like object.

    Arguments:
        func: Function to wrap in a `from_native`-`to_native` block.
        pass_through: Determine what happens if the object can't be converted to Narwhals

            - `False`: raise an error
            - `True` (default): pass object through as-is
        eager_only: Whether to only allow eager objects

            - `False` (default): don't require `native_object` to be eager
            - `True`: only convert to Narwhals if `native_object` is eager
        series_only: Whether to only allow Series

            - `False` (default): don't require `native_object` to be a Series
            - `True`: only convert to Narwhals if `native_object` is a Series
        allow_series: Whether to allow Series (default is only Dataframe / Lazyframe)

            - `False` or `None`: don't convert to Narwhals if `native_object` is a Series
            - `True` (default): allow `native_object` to be a Series

    Returns:
        Decorated function.
    c                ó:   •‡ — t        ‰ «      dˆˆˆ ˆˆfd„«       }|S )Nc                 ó–  •— | D �cg c]  }t        |‰‰‰‰¬«      ‘Œ }}|j                  «       D ��ci c]  \  }}|t        |‰‰‰‰¬«      “Œ }}}g |¢|j                  «       ¢­D �ch c]  }t        |dd «      x}r |«       ’Œ }	}|	j	                  «       dkD  rd}
t        |
«      ‚ ‰|i |¤Ž}t        |‰¬«      S c c}w c c}}w c c}w )Nr-  Ú__native_namespace__é   z_Found multiple backends. Make sure that all dataframe/series inputs come from the same backend.r1  )r  Úitemsræ   ÚgetattrÚ__len__Ú
ValueErrorr5  )ÚargsrÜ   ÚargÚargs_nwr¬   ÚvalueÚ	kwargs_nwÚvÚbÚbackendsr÷   rŽ   r,  r*  Úfuncr)  r+  s               €€€€€rƒ   Úwrapperz.narwhalify.<locals>.decorator.<locals>.wrapper9  s  ø€ ð  ö	ð ô ØØ!-Ø)Ø +Ø!-öð	ˆGð 	ð& $*§<¡<£>÷	ñ  �D˜%ð ”kØØ!-Ø)Ø +Ø!-ôñ ð	ˆIñ 	ð 9˜7Ð8 Y×%5Ñ%5Ó%7Ñ8öàÜ  Ð$:¸DÓAÐA�AÐAñ •ðˆHð ð ×ÑÓ! AÒ%Øw�Ü  “oÐ%á˜7Ð0 iÑ0ˆFä˜V°,Ô?Ð?ùòE	ùó	ùòs   †B;²C Á'C)rE  r   rÜ   r   rÀ   r   r   )rM  rN  r,  r*  r)  r+  s   ` €€€€rƒ   Ú	decoratorznarwhalify.<locals>.decorator8  s)   ù€ Ü	ˆt‹÷#	@ð #	@ó 
ð#	@ðJ ˆr…   )rM  úCallable[..., Any]rÀ   rP  r£   )rM  r)  r*  r+  r,  rO  s    ```` rƒ   Ú
narwhalifyrQ    s&   û€ ÷R'ð 'ðR €|ØÐá�T‹?Ðr…   c                 ó<   — t        t        j                  «       «      S )z3Instantiate an expression representing all columns.)r¯   r;  Úallr£   r…   rƒ   rS  rS  g  ó   € ä”b—f‘f“hÓÐr…   c                 ó8   — t        t        j                  | Ž «      S )zŽCreates an expression that references one or more columns by their name(s).

    Arguments:
        names: Name(s) of the columns to use.
    )r¯   r;  Úcol©Únamess    rƒ   rV  rV  l  s   € ô ”b—f‘f˜e�nÓ%Ð%r…   c                 ó8   — t        t        j                  | Ž «      S )z„Creates an expression that excludes columns by their name(s).

    Arguments:
        names: Name(s) of the columns to exclude.
    )r¯   r;  ÚexcluderW  s    rƒ   rZ  rZ  u  s   € ô ”b—j‘j %Ð(Ó)Ð)r…   c                 ó8   — t        t        j                  | Ž «      S )a!  Creates an expression that references one or more columns by their index(es).

    Notes:
        `nth` is not supported for Polars version<1.0.0. Please use
        [`narwhals.col`][] instead.

    Arguments:
        indices: One or more indices representing the columns to retrieve.
    )r¯   r;  Únth)Úindicess    rƒ   r\  r\  ~  s   € ô ”b—f‘f˜gÐ&Ó'Ð'r…   c                 ó<   — t        t        j                  «       «      S )zReturn the number of rows.)r¯   r;  Úlenr£   r…   rƒ   r_  r_  ‹  rT  r…   c                ó@   — t        t        j                  | |«      «      S )aÂ  Return an expression representing a literal value.

    Arguments:
        value: The value to use as literal. Can be a scalar value, list, tuple, or dict.
            Lists and tuples are converted to `List` dtype, dicts to `Struct` dtype.
        dtype: The data type of the literal value. If not provided, the data type will
            be inferred by the native library. For empty lists/dicts, dtype must be
            specified explicitly.
    )r¯   r;  Úlit)rH  rç   s     rƒ   ra  ra  �  s   € ô ”b—f‘f˜U EÓ*Ó+Ð+r…   c                 ó8   — t        t        j                  | Ž «      S )z»Return the minimum value.

    Note:
       Syntactic sugar for ``nw.col(columns).min()``.

    Arguments:
        columns: Name(s) of the columns to use in the aggregation function.
    )r¯   r;  Úmin©Úcolumnss    rƒ   rc  rc  �  ó   € ô ”b—f‘f˜gÐ&Ó'Ð'r…   c                 ó8   — t        t        j                  | Ž «      S )z»Return the maximum value.

    Note:
       Syntactic sugar for ``nw.col(columns).max()``.

    Arguments:
        columns: Name(s) of the columns to use in the aggregation function.
    )r¯   r;  Úmaxrd  s    rƒ   rh  rh  ©  rf  r…   c                 ó8   — t        t        j                  | Ž «      S )zµGet the mean value.

    Note:
        Syntactic sugar for ``nw.col(columns).mean()``

    Arguments:
        columns: Name(s) of the columns to use in the aggregation function
    )r¯   r;  Úmeanrd  s    rƒ   rj  rj  µ  s   € ô ”b—g‘g˜wÐ'Ó(Ð(r…   c                 ó8   — t        t        j                  | Ž «      S )aL  Get the median value.

    Notes:
        - Syntactic sugar for ``nw.col(columns).median()``
        - Results might slightly differ across backends due to differences in the
            underlying algorithms used to compute the median.

    Arguments:
        columns: Name(s) of the columns to use in the aggregation function
    )r¯   r;  Úmedianrd  s    rƒ   rl  rl  Á  s   € ô ”b—i‘i Ð)Ó*Ð*r…   c                 ó8   — t        t        j                  | Ž «      S )z°Sum all values.

    Note:
        Syntactic sugar for ``nw.col(columns).sum()``

    Arguments:
        columns: Name(s) of the columns to use in the aggregation function
    )r¯   r;  Úsumrd  s    rƒ   rn  rn  Ï  rf  r…   c                 ó8   — t        t        j                  | Ž «      S )a
  Sum all values horizontally across columns.

    Warning:
        Unlike Polars, we support horizontal sum over numeric columns only.

    Arguments:
        exprs: Name(s) of the columns to use in the aggregation function. Accepts
            expression input.
    )r¯   r;  Úsum_horizontal©Úexprss    rƒ   rp  rp  Û  ó   € ô ”b×'Ñ'¨Ð/Ó0Ð0r…   c                ó>   — t        t        j                  |d| iŽ«      S )aþ  Compute the bitwise AND horizontally across columns.

    Arguments:
        exprs: Name(s) of the columns to use in the aggregation function. Accepts
            expression input.
        ignore_nulls: Whether to ignore nulls:

            - If `True`, null values are ignored. If there are no elements, the result
              is `True`.
            - If `False`, Kleene logic is followed. Note that this is not allowed for
              pandas with classical NumPy dtypes when null values are present.
    rô   )r¯   r;  Úall_horizontal©rô   rr  s     rƒ   ru  ru  è  ó   € ô ”b×'Ñ'¨ÐJ¸\ÑJÓKÐKr…   c                ó>   — t        t        j                  |d| iŽ«      S )aþ  Compute the bitwise OR horizontally across columns.

    Arguments:
        exprs: Name(s) of the columns to use in the aggregation function. Accepts
            expression input.
        ignore_nulls: Whether to ignore nulls:

            - If `True`, null values are ignored. If there are no elements, the result
              is `False`.
            - If `False`, Kleene logic is followed. Note that this is not allowed for
              pandas with classical NumPy dtypes when null values are present.
    rô   )r¯   r;  Úany_horizontalrv  s     rƒ   ry  ry  ø  rw  r…   c                 ó8   — t        t        j                  | Ž «      S )zÀCompute the mean of all values horizontally across columns.

    Arguments:
        exprs: Name(s) of the columns to use in the aggregation function. Accepts
            expression input.
    )r¯   r;  Úmean_horizontalrq  s    rƒ   r{  r{    s   € ô ”b×(Ñ(¨%Ð0Ó1Ð1r…   c                 ó8   — t        t        j                  | Ž «      S )a  Get the minimum value horizontally across columns.

    Notes:
        We support `min_horizontal` over numeric columns only.

    Arguments:
        exprs: Name(s) of the columns to use in the aggregation function. Accepts
            expression input.
    )r¯   r;  Úmin_horizontalrq  s    rƒ   r}  r}    rs  r…   c                 ó8   — t        t        j                  | Ž «      S )a  Get the maximum value horizontally across columns.

    Notes:
        We support `max_horizontal` over numeric columns only.

    Arguments:
        exprs: Name(s) of the columns to use in the aggregation function. Accepts
            expression input.
    )r¯   r;  Úmax_horizontalrq  s    rƒ   r  r    rs  r…   c                óD   — t        t        j                  | ||¬«      «      S )zãCompute the Pearson's or Spearman rank correlation between two columns.

    Arguments:
        a: Column name or Expression
        b: Column name or Expression
        method: Correlation method ('pearson' or 'spearman')
    )Úmethod)r¯   r;  Úcorr)ÚarK  r�  s      rƒ   r‚  r‚  ,  s   € ô ”b—g‘g˜a ¨6Ô2Ó3Ð3r…   r@  ©Úddofc               óD   — t        t        j                  | ||¬«      «      S )a2  Compute the covariance between two columns.

    Arguments:
        a: Column name or Expression
        b: Column name or Expression
        ddof: "Delta Degrees of Freedom": the divisor used in the calculation is N - ddof,
            where N represents the number of elements. By default ddof is 1.
    r„  )r¯   r;  Úcov)rƒ  rK  r…  s      rƒ   r‡  r‡  9  s   € ô ”b—f‘f˜Q ¨Ô-Ó.Ð.r…   Ú ©Ú	separatorrô   c               óH   — t        t        j                  | g|¢­||dœŽ«      S )aæ  Horizontally concatenate columns into a single string column.

    Arguments:
        exprs: Columns to concatenate into a single string column. Accepts expression
            input. Strings are parsed as column names, other non-expression inputs are
            parsed as literals. Non-`String` columns are cast to `String`.
        *more_exprs: Additional columns to concatenate into a single string column,
            specified as positional arguments.
        separator: String that will be used to separate the values of each column.
        ignore_nulls: Ignore null values (default is `False`).
            If set to `False`, null values will be propagated and if the row contains any
            null values, the output is null.
    r‰  )r¯   r;  Ú
concat_str)rr  rŠ  rô   Ú
more_exprss       rƒ   rŒ  rŒ  E  s)   € ô& Ü
�‰�eÐY˜jÑY°IÈLÒYóð r…   c                ó@   — t        t        j                  | g|¢­Ž «      S )zŸFormat expressions as a string.

    Arguments:
        f_string: A string that with placeholders.
        args: Expression(s) that fill the placeholders.
    )r¯   r;  Úformat)Úf_stringrE  s     rƒ   r�  r�  ]  s   € ô ”b—i‘i Ð0¨4Ò0Ó1Ð1r…   c                ó@   — t        t        j                  | g|¢­Ž «      S )aú  Folds the columns from left to right, keeping the first non-null value.

    Arguments:
        exprs: Columns to coalesce, must be a str, nw.Expr, or nw.Series
            where strings are parsed as column names and both nw.Expr/nw.Series
            are passed through as-is. Scalar values must be wrapped in `nw.lit`.

        *more_exprs: Additional columns to coalesce, specified as positional arguments.

    Raises:
        TypeError: If any of the inputs are not a str, nw.Expr, or nw.Series.
    )r¯   r;  Úcoalesce)rr  r�  s     rƒ   r’  r’  g  s   € ô ”b—k‘k %Ð5¨*Ò5Ó6Ð6r…   c                  ó&   — e Zd Zedd„«       Zdd„Zy)ÚWhenc                ó*   —  | |j                   d¬«      S )Nr£   )Úchain)Ú
_predicate)rŒ   Úwhens     rƒ   Ú	from_whenzWhen.from_whenx  s   € á�4—?‘?¨"Ô-Ð-r…   c                óf   — g | j                   ¢| j                  |f‘­}t        j                  |«      S r¢   )Ú_chainr—  ÚThenÚ_from_chain)r€   rH  Ú	new_chains      rƒ   Úthenz	When.then|  s/   € Ø<�d—k‘kÐ< D§O¡O°UÐ#;Ñ<ˆ	Ü×Ñ 	Ó*Ð*r…   N)r˜  z	nw_f.WhenrÀ   r”  )rH  z&IntoExpr | NonNestedLiteral | _1DArrayrÀ   rœ  )rÌ   rÍ   rÎ   rÐ   r™  rŸ  r£   r…   rƒ   r”  r”  w  s   „ Øò.ó ð.ô+r…   r”  c                  ó(   ‡ — e Zd Zdd„Zdˆ fd„Zˆ xZS )rœ  c                ó,   — t        |d| j                  iŽS )Nr–  )r”  r›  )r€   Ú
predicatess     rƒ   r˜  z	Then.when‚  s   € Ü�ZÐ3 t§{¡{Ñ3Ð3r…   c                ó4   •— t        t        ‰| �	  |«      «      S r¢   )r¯   r}   Ú	otherwise)r€   Úotherwise_valuer‚   s     €rƒ   r¤  zThen.otherwise…  s   ø€ Üœ%™'Ñ+¨OÓ<Ó=Ð=r…   ©r¢  úIntoExpr | Iterable[IntoExpr]rÀ   r”  )r¥  zIntoExpr | NonNestedLiteralrÀ   r>   )rÌ   rÍ   rÎ   r˜  r¤  rÒ   rÓ   s   @rƒ   rœ  rœ  �  s   ø„ ó4÷>ñ >r…   rœ  c                 óL   — t         j                  t        j                  | Ž «      S )aî  Start a `when-then-otherwise` expression.

    Expression similar to an `if-else` statement in Python. Always initiated by a
    `nw.when(<condition>).then(<value if condition>)`, and optionally followed by
    chained `.when(<condition>).then(<value>)` calls.
    An `.otherwise(<value if condition is false>)` can be appended at the end.
    If not appended, and the condition is not `True`, `None` will be returned.

    Arguments:
        predicates: Condition(s) that must be met in order to apply the subsequent
            statement. Accepts one or more boolean expressions, which are implicitly
            combined with `&`. String input is parsed as a column name.

    Returns:
        A "When" object, which `.then` can be called on.
    )r”  r™  Únw_fr˜  )r¢  s    rƒ   r˜  r˜  ‰  s   € ô" �>‰>œ$Ÿ)™) ZÐ0Ó1Ð1r…   c               ó2   — t        t        | |||¬«      «      S )aÁ  Instantiate Narwhals Series from iterable (e.g. list or array).

    Arguments:
        name: Name of resulting Series.
        values: Values of make Series from.
        dtype: (Narwhals) dtype. If not provided, the native library
            may auto-infer it from `values`.
        backend: specifies which eager backend instantiate to.

            `backend` can be specified in various ways

            - As `Implementation.<BACKEND>` with `BACKEND` being `PANDAS`, `PYARROW`,
                `POLARS`, `MODIN` or `CUDF`.
            - As a string: `"pandas"`, `"pyarrow"`, `"polars"`, `"modin"` or `"cudf"`.
            - Directly as a module `pandas`, `pyarrow`, `polars`, `modin` or `cudf`.
    rˆ   )r¯   r?   )r¬   ræ   rç   r‰   s       rƒ   Ú
new_seriesr«  �  s   € ô. Ô& t¨V°UÀGÔLÓMÐMr…   c               óB   — t        t        j                  | |¬«      «      S )aL  Construct a DataFrame from an object which supports the PyCapsule Interface.

    Arguments:
        native_frame: Object which implements `__arrow_c_stream__`.
        backend: specifies which eager backend instantiate to.

            `backend` can be specified in various ways

            - As `Implementation.<BACKEND>` with `BACKEND` being `PANDAS`, `PYARROW`,
                `POLARS`, `MODIN` or `CUDF`.
            - As a string: `"pandas"`, `"pyarrow"`, `"polars"`, `"modin"` or `"cudf"`.
            - Directly as a module `pandas`, `pyarrow`, `polars`, `modin` or `cudf`.
    rˆ   )r¯   r©  r‹   )r�   r‰   s     rƒ   r‹   r‹   ·  s   € ô  ”d—o‘o l¸GÔDÓEÐEr…   rˆ   c               óD   — t        t        j                  | ||¬«      «      S )aˆ  Instantiate DataFrame from dictionary.

    Indexes (if present, for pandas-like backends) are aligned following
    the [left-hand-rule](../concepts/pandas_index.md/).

    Notes:
        For pandas-like dataframes, conversion to schema is applied after dataframe
        creation.

    Arguments:
        data: Dictionary to create DataFrame from.
        schema: The DataFrame schema as Schema, dict of {name: type}, or a
            iterable of (name, type) tuples.
            If not specified, the schema will be inferred by the native library.
            If any `dtype` is `None`, the data type for that column will be
            inferred by the native library.
        backend: specifies which eager backend instantiate to. Only
            necessary if inputs are not Narwhals Series.

            `backend` can be specified in various ways

            - As `Implementation.<BACKEND>` with `BACKEND` being `PANDAS`, `PYARROW`,
                `POLARS`, `MODIN` or `CUDF`.
            - As a string: `"pandas"`, `"pyarrow"`, `"polars"`, `"modin"` or `"cudf"`.
            - Directly as a module `pandas`, `pyarrow`, `polars`, `modin` or `cudf`.
    rˆ   )r¯   r©  r�   ©r’   r“   r‰   s      rƒ   r�   r�   Ê  s   € ô@ ”d—n‘n T¨6¸7ÔCÓDÐDr…   r   r•   c               óD   — t        t        j                  | ||¬«      «      S )a^  Construct a DataFrame from a NumPy ndarray.

    Notes:
        Only row orientation is currently supported.

        For pandas-like dataframes, conversion to schema is applied after dataframe
        creation.

    Arguments:
        data: Two-dimensional data represented as a NumPy ndarray.
        schema: The DataFrame schema as Schema, dict of {name: type}, an iterable
            of (name, type) tuples, or a sequence of str.
        backend: specifies which eager backend instantiate to.

            `backend` can be specified in various ways

            - As `Implementation.<BACKEND>` with `BACKEND` being `PANDAS`, `PYARROW`,
                `POLARS`, `MODIN` or `CUDF`.
            - As a string: `"pandas"`, `"pyarrow"`, `"polars"`, `"modin"` or `"cudf"`.
            - Directly as a module `pandas`, `pyarrow`, `polars`, `modin` or `cudf`.
    rˆ   )r¯   r©  r™   r®  s      rƒ   r™   r™   ð  s   € ô6 ”d—o‘o d¨F¸GÔDÓEÐEr…   ú,)rŠ  c               óF   — t        t        j                  | f||dœ|¤Ž«      S )a  Read a CSV file into a DataFrame.

    Arguments:
        source: Path to a file.
        backend: The eager backend for DataFrame creation.
            `backend` can be specified in various ways

            - As `Implementation.<BACKEND>` with `BACKEND` being `PANDAS`, `PYARROW`,
                `POLARS`, `MODIN` or `CUDF`.
            - As a string: `"pandas"`, `"pyarrow"`, `"polars"`, `"modin"` or `"cudf"`.
            - Directly as a module `pandas`, `pyarrow`, `polars`, `modin` or `cudf`.
        separator: Single byte character to use as separator in the file.
        kwargs: Extra keyword arguments which are passed to the native CSV reader.
            For example, you could use
            `nw.read_csv('file.csv', backend='pandas', engine='pyarrow')`.
    ©r‰   rŠ  )r¯   r©  Úread_csv©Úsourcer‰   rŠ  rÜ   s       rƒ   r³  r³    s)   € ô. Ü�‰�fÐM g¸ÑMÀfÑMóð r…   c               óF   — t        t        j                  | f||dœ|¤Ž«      S )aœ  Lazily read from a CSV file.

    For the libraries that do not support lazy dataframes, the function reads
    a csv file eagerly and then converts the resulting dataframe to a lazyframe.

    Arguments:
        source: Path to a file.
        backend: The eager backend for DataFrame creation.
            `backend` can be specified in various ways

            - As `Implementation.<BACKEND>` with `BACKEND` being `PANDAS`, `PYARROW`,
                `POLARS`, `MODIN` or `CUDF`.
            - As a string: `"pandas"`, `"pyarrow"`, `"polars"`, `"modin"` or `"cudf"`.
            - Directly as a module `pandas`, `pyarrow`, `polars`, `modin` or `cudf`.
        separator: Single byte character to use as separator in the file.
        kwargs: Extra keyword arguments which are passed to the native CSV reader.
            For example, you could use
            `nw.scan_csv('file.csv', backend=pd, engine='pyarrow')`.
    r²  )r¯   r©  Úscan_csvr´  s       rƒ   r·  r·  *  s)   € ô, Ü�‰�fÐM g¸ÑMÀfÑMóð r…   c               óD   — t        t        j                  | fd|i|¤Ž«      S )aÌ  Read into a DataFrame from a parquet file.

    Arguments:
        source: Path to a file.
        backend: The eager backend for DataFrame creation.
            `backend` can be specified in various ways

            - As `Implementation.<BACKEND>` with `BACKEND` being `PANDAS`, `PYARROW`,
                `POLARS`, `MODIN` or `CUDF`.
            - As a string: `"pandas"`, `"pyarrow"`, `"polars"`, `"modin"` or `"cudf"`.
            - Directly as a module `pandas`, `pyarrow`, `polars`, `modin` or `cudf`.
        kwargs: Extra keyword arguments which are passed to the native parquet reader.
            For example, you could use
            `nw.read_parquet('file.parquet', backend=pd, engine='pyarrow')`.
    r‰   )r¯   r©  Úread_parquet©rµ  r‰   rÜ   s      rƒ   r¹  r¹  E  s$   € ô$ ”d×'Ñ'¨ÑJ¸ÐJÀ6ÑJÓKÐKr…   c               óD   — t        t        j                  | fd|i|¤Ž«      S )aý  Lazily read from a parquet file.

    For the libraries that do not support lazy dataframes, the function reads
    a parquet file eagerly and then converts the resulting dataframe to a lazyframe.

    Note:
        Spark like backends require a session object to be passed in `kwargs`.

        For instance:

        ```py
        import narwhals as nw
        from sqlframe.duckdb import DuckDBSession

        nw.scan_parquet(source, backend="sqlframe", session=DuckDBSession())
        ```

    Arguments:
        source: Path to a file.
        backend: The eager backend for DataFrame creation.
            `backend` can be specified in various ways

            - As `Implementation.<BACKEND>` with `BACKEND` being `PANDAS`, `PYARROW`,
                `POLARS`, `MODIN`, `CUDF`, `PYSPARK` or `SQLFRAME`.
            - As a string: `"pandas"`, `"pyarrow"`, `"polars"`, `"modin"`, `"cudf"`,
                `"pyspark"` or `"sqlframe"`.
            - Directly as a module `pandas`, `pyarrow`, `polars`, `modin`, `cudf`,
                `pyspark.sql` or `sqlframe`.
        kwargs: Extra keyword arguments which are passed to the native parquet reader.
            For example, you could use
            `nw.scan_parquet('file.parquet', backend=pd, engine='pyarrow')`.
    r‰   )r¯   r©  Úscan_parquetrº  s      rƒ   r¼  r¼  Z  s%   € ôF ”d×'Ñ'¨ÑJ¸ÐJÀ6ÑJÓKÐKr…   c                 ó>   — t        t        j                  | i |¤Ž«      S )aÖ  Collect columns into a struct column.

    Arguments:
        *exprs: Column(s) to collect into a struct column, specified as
            positional arguments. Accepts only expression input. Strings are parsed
            as column names, other non-expression inputs are not allowed.
        **named_exprs: Additional columns to collect into the struct column,
            specified as keyword arguments. The columns will be renamed to the
            keyword used.
    )r¯   r©  Ústruct)rr  Únamed_exprss     rƒ   r¾  r¾  €  s   € ô ”d—k‘k 5Ð8¨KÑ8Ó9Ð9r…   )Xr    r!   r"   r#   r   r$   r%   r&   r'   r(   r>   r)   r*   r+   r,   r   r-   r.   r/   r0   r1   r   r2   r3   rB   rC   r4   r5   r6   r7   r8   r9   r:   r;   r<   rS  ru  ry  r’  rV  r@   rŒ  r‚  r‡  rD   rE   rE   r   rZ  r�  r‹   r�   r•   r  r™   r   rP   r   r_  ra  rh  r  r   r   r   r   r   rj  r{  rl  rc  r}  rQ  r«  r\  r³  r¹  r·  r¼  rF   rF   rA   r¾  rn  rp  r5  rQ   r˜  )r  zNwDataFrame[IntoDataFrameT]rÀ   úDataFrame[IntoDataFrameT])r  zNwLazyFrame[IntoLazyFrameT]rÀ   úLazyFrame[IntoLazyFrameT])r  zNwSeries[IntoSeriesT]rÀ   úSeries[IntoSeriesT])r  r  rÀ   r>   )r  zZNwDataFrame[IntoDataFrameT] | NwLazyFrame[IntoLazyFrameT] | NwSeries[IntoSeriesT] | NwExprrÀ   zRDataFrame[IntoDataFrameT] | LazyFrame[IntoLazyFrameT] | Series[IntoSeriesT] | Expr)r  rN   r  úUnpack[OnlySeries]rÀ   rN   )r  rN   r  úUnpack[AllowSeries]rÀ   rN   )r  rG   r  úUnpack[ExcludeSeries]rÀ   rG   )r  rM   r  úUnpack[AllowLazy]rÀ   rM   )r  rH   r  rÅ  rÀ   rÀ  )r  rL   r  rÃ  rÀ   rÂ  )r  rL   r  rÄ  rÀ   rÂ  )r  rJ   r  rÆ  rÀ   rÁ  )r  zIntoDataFrameT | IntoSeriesTr  rÄ  rÀ   z/DataFrame[IntoDataFrameT] | Series[IntoSeriesT])r  z-IntoDataFrameT | IntoLazyFrameT | IntoSeriesTr  zUnpack[AllowAny]rÀ   úKDataFrame[IntoDataFrameT] | LazyFrame[IntoLazyFrameT] | Series[IntoSeriesT])r  rr   r  zUnpack[PassThroughUnknown]rÀ   rr   )r  r   r)  rË   r*  rË   r+  rË   r,  úbool | NonerÀ   r   )r  zJIntoLazyFrameT | IntoDataFrameT | IntoSeriesT | IntoFrame | IntoSeries | Tr)  rË   r*  rË   r+  rË   r,  rÈ  rÀ   zOLazyFrame[IntoLazyFrameT] | DataFrame[IntoDataFrameT] | Series[IntoSeriesT] | T)r4  rÀ  r)  rÊ   rÀ   rH   )r4  rÁ  r)  rÊ   rÀ   rJ   )r4  rÂ  r)  rÊ   rÀ   rL   )r4  r   r)  rË   rÀ   r   )r4  rÇ  r)  rË   rÀ   z3IntoDataFrameT | IntoLazyFrameT | IntoSeriesT | Anyr¢   )rM  zCallable[..., Any] | Noner)  rË   r*  rË   r+  rË   r,  rÈ  rÀ   rP  )rÀ   r>   )rX  zstr | Iterable[str]rÀ   r>   )r]  zint | Sequence[int]rÀ   r>   )rH  rl   rç   rø   rÀ   r>   )re  rÈ   rÀ   r>   )rr  r§  rÀ   r>   )rr  r§  rô   rË   rÀ   r>   )Úpearson)rƒ  rj   rK  rj   r�  zLiteral['pearson', 'spearman']rÀ   r>   )rƒ  rj   rK  rj   r…  ÚintrÀ   r>   )
rr  r§  r�  rj   rŠ  rÈ   rô   rË   rÀ   r>   )r�  rÈ   rE  rj   rÀ   r>   )rr  r§  r�  rj   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‰   úIntoBackend[Backend]rŠ  rÈ   rÜ   r   rÀ   rÉ   )rµ  rÈ   r‰   rÃ   rÜ   r   rÀ   rŠ   )rµ  rÈ   r‰   rË  rÜ   r   rÀ   rÉ   )rr  zIntoExpr | Sequence[IntoExpr]r¿  rj   rÀ   r>   )¸Ú
__future__r   Ú	functoolsr   Útypingr   r   r   r	   r
   r   Únarwhalsr;  r   r   r©  Únarwhals._exceptionsr   Únarwhals._expression_parsingr   r   Únarwhals._typing_compatr   r   Únarwhals._utilsr   r   r   r   r   r   r   r   r   r   r   Únarwhals.dataframer   rÏ   r   rÞ   Únarwhals.dtypesr    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   Únarwhals.exceptionsr=   Únarwhals.exprr>   r  Únarwhals.functionsr?   r@   rA   Únarwhals.schemarB   ÚNwSchemaÚnarwhals.seriesrC   rù   Únarwhals.stable.v2rD   rE   rF   Únarwhals.stable.v2.typingrG   rH   rI   rJ   rK   rL   rM   rN   Únarwhals.translaterO   rP   rQ   Úcollections.abcrR   rS   rT   rU   Útyping_extensionsrV   rW   rX   Únarwhals._translaterY   rZ   r[   r\   r]   r^   r_   Únarwhals._typingr`   ra   rb   rc   rd   re   rf   rg   rh   Únarwhals.typingri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rt   ru   r¯   r  r5  rQ  rS  rV  rZ  r\  r_  ra  rc  rh  rj  rl  rn  rp  ru  ry  r{  r}  r  r‚  r‡  rŒ  r�  r’  r”  rœ  r˜  r«  r‹   r�   r•   rú   r™   r³  r·  r¹  r¼  r¾  Ú__all__r£   r…   rƒ   ú<module>rå     s‡  ðÞ "å ß E× Eã ß 2Ý .ß ;ß 9÷÷ ÷ ñ ÷ R÷÷ ÷ ÷ ÷ ÷ ÷ õ õ> 8Ý (ß FÑ FÝ .Ý .ß >Ñ >÷	÷ 	ó 	÷ UÑ TáßEÓEç9Ñ9÷÷ ñ ÷÷ ñ ÷ H÷
÷ 
õ 
ñ 	�˜SÔ!€AÙ�#‹€AÙ�‹€Aô}/�˜NÑ+ô }/ô@F�˜NÑ+ô Fô$C<ˆX�kÑ"ô C<ôLSˆ6ô Sô(ˆXô ð 
Ú Ró 
Ø RØ	Ú Ró 
Ø RØ	Ú Fó 
Ø FØ	Ú (ó 
Ø (ðð
ðð
 Xóð" 
Ú Só 
Ø SØ	Ú Tó 
Ø TØ	ðØðØ'<ðàòó 
ðð 
Ú Xó 
Ø XØ	ð$Ø!ð$Ø+@ð$àò$ó 
ð$ð 
ðØðØ(:ðàòó 
ðð 
ðØðØ(;ðàòó 
ðð 
ð$Ø!ð$Ø+<ð$àò$ó 
ð$ð 
ð:Ø/ð:Ø9Lð:à4ò:ó 
ð:ð 
ðVØ@ðVØJZðVàPòVó 
ðVð 
Ú Oó 
Ø Oà	ðØðð ðð ð	ð
 ðð ðð 	òó 
ðð  ØØØ $ñ9ðð9ð ð9ð ð9ð ð9ð ð9ð Uó9ðx 
àRUñØ.ðØAOðàòó 
ðð 
àRUñØ.ðØAOðàòó 
ðð 
àLOñØ(ðØ;Iðàòó 
ðð 
Ú Fó 
Ø Fð ñDððDð
 ðDð 9óDð. '+ðUð ØØØ $ñUØ
#ðUð ðUð ð	Uð
 ðUð ðUð óUóp ó
&ó*ó
(ó ô

,ó	(ó	(ó	)ó+ó	(ó
1óLó Ló 2ó
1ó
1ð HQð
4Øð
4Øð
4Ø&Dð
4à	ó
4ð 23õ 	/ð Øñ	Ø(ðàðð ðð ð	ð
 
óó02ó7ô +ˆ4�9Š9ô +ô>ˆ4�9Š9�dô >ó2ð. #ðNØ
ðNàðNð ðNð
 'ðNð óNð4FØ ðFØ.GðFàóFð* BFð Eð 15ñ	 EØ
ð Eà>ð Eð .ð	 Eð
 ó EðF ×(Ò(€
ˆEÓ (ð
 15ðFØ
ðFà-ðFð 'ð	Fð
 óFðD ñ	Øðð 'ðð ð	ð
 ðð óð: EHñØðØ1ðØ>AðØSVðàóð6LØðLØ6ðLØBEðLàóLð*#LØð#LØ1ð#LØ=@ð#Làó#LóL:òY�r…   