§
    cŠtj¡  ã                  óV  — 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r{d 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
dÎd,„¦   «         Z�e
dÏd/„¦   «         Z�e
dÐd2„¦   «         Z�e
dÑd4„¦   «         Z�dÒd7„Z�e
dÓd<„¦   «         Z�e
dÔd>„¦   «         Z�e
dÕdA„¦   «         Z�e
dÖdD„¦   «         Z�e
d×dF„¦   «         Z�e
dØdH„¦   «         Z�e
dÙdI„¦   «         Z�e
dÚdK„¦   «         Z�e
dÛdN„¦   «         Z�e
dÜdR„¦   «         Z�e
dÝdT„¦   «         Z�e
dÞd\„¦   «         Z�d]d]d]dd^œdßda„Z�e
dbdcœdàdf„¦   «         Z‘e
dbdcœdádg„¦   «         Z‘e
dbdcœdâdh„¦   «         Z‘e
dãdi„¦   «         Z‘d]dcœdädk„Z‘	 dådld]d]dld^œdædp„Z’dçdq„Z“dèdt„Z”dèdu„Z•dédx„Z–dçdy„Z—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ïd•„Z¤d–d—œdðdš„Z¥d›d]dœœdñdŸ„Z¦dòd¢„Z§dód£„Z¨ G d¤„ d¥ej©        ¦  «        Z© G d¦„ d§ejª        eJ¦  «        Zªdôd©„Z«	 dådõd¯„Z¬död³„Z­	 dådd´œd÷dº„Z®e%j¯        Z¯d»e°d¼<   	 dådød¿„Z±dÀdÁœdùdÄ„Z²dÀdÁœdúdÇ„Z³dûdÈ„Z´düdÉ„ZµdýdÌ„Z¶g dÍ¢Z·dS )þé    )Ú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¦  «        dDˆ fd„¦   «         Ze	dEˆ fd„¦   «         Z
e		 dFddœdGˆ fd„¦   «         Ze		 dFdHˆ fd„¦   «         Ze		 dFdIˆ fd„¦   «         ZedJd„¦   «         ZedKd„¦   «         ZedLd!„¦   «         ZedMd$„¦   «         ZedNd'„¦   «         ZdOˆ fd*„ZdPˆ fd-„Z	 dFdd.œdQˆ fd3„Zed4d5œdRd9„¦   «         ZedSd<„¦   «         Zed=d5œdTd@„¦   «         Zd=d5œdTˆ fdA„ZdUˆ fdB„ZdUˆ fdC„Zˆ xZS )Vr   Údfr   Úlevelú&Literal['full', 'lazy', 'interchange']ÚreturnÚNonec               óx   •— |j         t          j        u sJ ‚t          ¦   «                              ||¬¦  «         d S ©N)rx   ©Ú_versionr   ÚV2ÚsuperÚ__init__©Úselfrw   rx   Ú	__class__s      €úY/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/narwhals/stable/v2/__init__.pyr‚   zDataFrame.__init__v   ó;   ø€ àŒ{�gœjÐ(Ð(Ð(Ð(Ý‰Œ×Ò˜ 5ÐÑ)Ô)Ð)Ð)Ð)ó    Únative_framer]   ÚbackendúIntoBackend[EagerAllowed]úDataFrame[Any]c               ój   •— t          ¦   «                              ||¬¦  «        }t          d|¦  «        S ©N©rŠ   rŒ   )r�   Ú
from_arrowr
   )Úclsr‰   rŠ   Úresultr…   s       €r†   r�   zDataFrame.from_arrow~   s2   ø€ õ ‘”×#Ò# L¸'Ð#ÑBÔBˆÝÐ$ fÑ-Ô-Ð-rˆ   Nr�   ÚdataúMapping[str, Any]Úschemaú2IntoSchema | Mapping[str, IntoDType | None] | Noneú IntoBackend[EagerAllowed] | Nonec               ól   •— t          ¦   «                              |||¬¦  «        }t          d|¦  «        S rŽ   )r�   Ú	from_dictr
   ©r‘   r“   r•   rŠ   r’   r…   s        €r†   r™   zDataFrame.from_dict…   s4   ø€ õ ‘”×"Ò" 4¨¸Ð"ÑAÔAˆÝÐ$ fÑ-Ô-Ð-rˆ   úSequence[Mapping[str, Any]]c               ól   •— t          ¦   «                              |||¬¦  «        }t          d|¦  «        S rŽ   )r�   Ú
from_dictsr
   rš   s        €r†   r�   zDataFrame.from_dicts�   ó4   ø€ õ ‘”×#Ò# D¨&¸'Ð#ÑBÔBˆÝÐ$ fÑ-Ô-Ð-rˆ   rq   ú!IntoSchema | Sequence[str] | Nonec               ól   •— t          ¦   «                              |||¬¦  «        }t          d|¦  «        S rŽ   ©r�   Ú
from_numpyr
   rš   s        €r†   r¢   zDataFrame.from_numpy›   rž   rˆ   útype[Series[Any]]c                ó,   — t          dt          ¦  «        S )Nr£   )r
   rC   ©r„   s    r†   Ú_serieszDataFrame._series¦   s   € åÐ'­Ñ0Ô0Ð0rˆ   útype[LazyFrame[Any]]c                ó,   — t          dt          ¦  «        S )Nr§   )r
   r   r¥   s    r†   Ú
_lazyframezDataFrame._lazyframeª   s   € åÐ*­IÑ6Ô6Ð6rˆ   Úitemú-tuple[SingleIndexSelector, SingleColSelector]c                ó   — d S ©N© ©r„   rª   s     r†   Ú__getitem__zDataFrame.__getitem__®   s   € ØWZÐWZrˆ   ú2str | tuple[MultiIndexSelector, SingleColSelector]úSeries[Any]c                ó   — d S r­   r®   r¯   s     r†   r°   zDataFrame.__getitem__±   s	   € ð �crˆ   ú˜SingleIndexSelector | MultiIndexSelector | MultiColSelector | tuple[SingleIndexSelector, MultiColSelector] | tuple[MultiIndexSelector, MultiColSelector]rW   c                ó   — d S r­   r®   r¯   s     r†   r°   zDataFrame.__getitem__¶   s	   € ð ˆsrˆ   á  SingleIndexSelector | SingleColSelector | MultiColSelector | MultiIndexSelector | tuple[SingleIndexSelector, SingleColSelector] | tuple[SingleIndexSelector, MultiColSelector] | tuple[MultiIndexSelector, SingleColSelector] | tuple[MultiIndexSelector, MultiColSelector]úSeries[Any] | Self | Anyc                óF   •— t          ¦   «                              |¦  «        S r­   )r�   r°   )r„   rª   r…   s     €r†   r°   zDataFrame.__getitem__Á   s   ø€ õ ‰wŒw×"Ò" 4Ñ(Ô(Ð(rˆ   ÚnameÚstrc                óF   •— t          ¦   «                              |¦  «        S r­   )r�   Ú
get_column)r„   r¹   r…   s     €r†   r¼   zDataFrame.get_columnÐ   s   ø€ õ ‰wŒw×!Ò! $Ñ'Ô'Ð'rˆ   )ÚsessionúIntoBackend[LazyAllowed] | Noner½   ú
Any | NoneúLazyFrame[Any]c               ód   •— t          t          ¦   «                              ||¬¦  «        ¦  «        S )N)rŠ   r½   )Ú
_stableifyr�   Úlazy)r„   rŠ   r½   r…   s      €r†   rÃ   zDataFrame.lazyÕ   s'   ø€ õ �%™'œ'Ÿ,š,¨wÀ˜,ÑHÔHÑIÔIÐIrˆ   .©Ú	as_seriesrÅ   úLiteral[True]údict[str, Series[Any]]c               ó   — d S r­   r®   ©r„   rÅ   s     r†   Úto_dictzDataFrame.to_dictÝ   s   € ØTWÐTWrˆ   úLiteral[False]údict[str, list[Any]]c               ó   — d S r­   r®   rÉ   s     r†   rÊ   zDataFrame.to_dictß   s   € ØMPÈSrˆ   TÚboolú-dict[str, Series[Any]] | dict[str, list[Any]]c               ó   — d S r­   r®   rÉ   s     r†   rÊ   zDataFrame.to_dictá   s	   € ð 9<¸rˆ   c               óH   •— t          ¦   «                              |¬¦  «        S )NrÄ   )r�   rÊ   )r„   rÅ   r…   s     €r†   rÊ   zDataFrame.to_dictå   s   ø€ õ
 ‰wŒw�Š¨ˆÑ3Ô3Ð3rˆ   c                ó^   •— t          t          ¦   «                              ¦   «         ¦  «        S r­   )rÂ   r�   Úis_duplicated©r„   r…   s    €r†   rÓ   zDataFrame.is_duplicatedì   s!   ø€ Ý�%™'œ'×/Ò/Ñ1Ô1Ñ2Ô2Ð2rˆ   c                ó^   •— t          t          ¦   «                              ¦   «         ¦  «        S r­   )rÂ   r�   Ú	is_uniquerÔ   s    €r†   rÖ   zDataFrame.is_uniqueï   s!   ø€ Ý�%™'œ'×+Ò+Ñ-Ô-Ñ.Ô.Ð.rˆ   ©rw   r   rx   ry   rz   r{   ©r‰   r]   rŠ   r‹   rz   rŒ   r­   ©r“   r”   r•   r–   rŠ   r—   rz   rŒ   )r“   r›   r•   r–   rŠ   r‹   rz   rŒ   ©r“   rq   r•   rŸ   rŠ   r‹   rz   rŒ   )rz   r£   )rz   r§   )rª   r«   rz   r   )rª   r±   rz   r²   )rª   r´   rz   rW   )rª   r¶   rz   r·   )r¹   rº   rz   r²   )rŠ   r¾   r½   r¿   rz   rÀ   )rÅ   rÆ   rz   rÇ   )rÅ   rË   rz   rÌ   )rÅ   rÎ   rz   rÏ   )rz   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€Hà€[�ÑÔð*ð *ð *ð *ð *ñ Ôð*ð ð.ð .ð .ð .ð .ñ „[ð.ð ð FJð.ð
 59ð.ð .ð .ð .ð .ð .ð .ñ „[ð.ð ð FJð.ð .ð .ð .ð .ð .ñ „[ð.ð ð 59ð.ð .ð .ð .ð .ð .ñ „[ð.ð ð1ð 1ð 1ñ „Xð1ð ð7ð 7ð 7ñ „Xð7ð ØZÐZÐZñ „XØZàðð ð ñ „Xðð ð	ð 	ð 	ñ „Xð	ð)ð )ð )ð )ð )ð )ð(ð (ð (ð (ð (ð (ð 48ðJð #ð	Jð Jð Jð Jð Jð Jð Jð Jð Ø47ÐWÐWÐWÐWÐWñ „XØWØØPÐPÐPñ „XØPØà#'ð<ð <ð <ð <ð <ñ „Xð<ð $(ð4ð 4ð 4ð 4ð 4ð 4ð 4ð 4ð3ð 3ð 3ð 3ð 3ð 3ð/ð /ð /ð /ð /ð /ð /ð /ð /ð /rˆ   r   c                  óx   ‡ — 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   rw   r   rx   ry   rz   r{   c               óx   •— |j         t          j        u sJ ‚t          ¦   «                              ||¬¦  «         d S r}   r~   rƒ   s      €r†   r‚   zLazyFrame.__init__ö   r‡   rˆ   útype[DataFrame[Any]]c                ó   — t           S r­   ©r   r¥   s    r†   Ú
_dataframezLazyFrame._dataframeû   ó   € åÐrˆ   NrŠ   ú+IntoBackend[Polars | Pandas | Arrow] | NoneÚkwargsrŒ   c                óT   •— t           t          ¦   «         j        dd|i|¤Ž¦  «        S )NrŠ   r®   )rÂ   r�   Úcollect)r„   rŠ   rë   r…   s      €r†   rí   zLazyFrame.collectÿ   s.   ø€ õ ˜/�%™'œ'œ/ÐDÐD°'ÐD¸VÐDÐDÑEÔEÐErˆ   r×   ©rz   rå   r­   )rŠ   rê   rë   r   rz   rŒ   )rÛ   rÜ   rÝ   r   r€   r   r   ÚNwLazyFramer‚   rà   rè   rí   rá   râ   s   @r†   r   r   ó   s®   ø€ € € € € ØŒz€Hà€[�ÑÔð*ð *ð *ð *ð *ñ Ôð*ð ðð ð ñ „Xðð FJðFð Fð Fð Fð Fð Fð Fð Fð 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   Úseriesr   rx   ry   rz   r{   c               óx   •— |j         t          j        u sJ ‚t          ¦   «                              ||¬¦  «         d S r}   r~   )r„   rñ   rx   r…   s      €r†   r‚   zSeries.__init__  s=   ø€ ð Œ¥'¤*Ð,Ð,Ð,Ð,Ý‰Œ×Ò˜ uÐÑ-Ô-Ð-Ð-Ð-rˆ   rå   c                ó   — t           S r­   rç   r¥   s    r†   rè   zSeries._dataframe  ré   rˆ   Nr¹   rº   Úvaluesrp   ÚdtypeúIntoDType | NonerŠ   r‹   r²   c               ón   •— t          ¦   «                              ||||¬¦  «        }t          d|¦  «        S ©Nr�   r²   r¡   ©r‘   r¹   rô   rõ   rŠ   r’   r…   s         €r†   r¢   zSeries.from_numpy  s5   ø€ õ ‘”×#Ò# D¨&°%ÀÐ#ÑIÔIˆÝ�M 6Ñ*Ô*Ð*rˆ   úIterable[Any]c               ón   •— t          ¦   «                              ||||¬¦  «        }t          d|¦  «        S rø   )r�   Úfrom_iterabler
   rù   s         €r†   rü   zSeries.from_iterable"  s5   ø€ õ ‘”×&Ò& t¨V°UÀGÐ&ÑLÔLˆÝ�M 6Ñ*Ô*Ð*rˆ   rŒ   c                ó^   •— t          t          ¦   «                              ¦   «         ¦  «        S r­   )rÂ   r�   Úto_framerÔ   s    €r†   rþ   zSeries.to_frame.  s!   ø€ Ý�%™'œ'×*Ò*Ñ,Ô,Ñ-Ô-Ð-rˆ   F©ÚsortÚparallelr¹   Ú	normalizer   rÎ   r  ú
str | Noner  c               óh   •— t          t          ¦   «                              ||||¬¦  «        ¦  «        S )Nrÿ   )rÂ   r�   Úvalue_counts)r„   r   r  r¹   r  r…   s        €r†   r  zSeries.value_counts1  s<   ø€ õ Ý‰GŒG× Ò Ø H°4À9ð !ñ ô ñ
ô 
ð 	
rˆ   Úhist©Úignore_nullsr  rm   c               óv   •— 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Ô3Ð3Ý‰wŒw× Ò ¨lÐ Ñ;Ô;Ð;rˆ   )rñ   r   rx   ry   rz   r{   rî   r­   )
r¹   rº   rô   rp   rõ   rö   rŠ   r‹   rz   r²   )
r¹   rº   rô   rú   rõ   rö   rŠ   r‹   rz   r²   )rz   rŒ   )
r   rÎ   r  rÎ   r¹   r  r  rÎ   rz   rŒ   )r  rÎ   rz   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     s}  ø€ € € € € € ØŒz€Hà€[�ÑÔð.ð .ð .ð .ð .ñ Ôð.ð ðð ð ñ „Xðð ð
 #'ð		+ð 	+ð 	+ð 	+ð 	+ð 	+ñ „[ð	+ð ð
 #'ð		+ð 	+ð 	+ð 	+ð 	+ð 	+ñ „[ð	+ð.ð .ð .ð .ð .ð .ð ØØØð
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð  �Ñ!Ô!€DÐ!Ð!Ð!Ñ!à05ð <ð <ð <ð <ð <ð <ð <ð <ð <ð <ð <ð <rˆ   rC   c                  ó,   — e Zd Zddœdd„Zdd„Zdd	„Zd
S )r>   Fr  r  rÎ   rz   rW   c               óŽ   — d}t          |t          ¦  «         |                      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  sL   € ð#ð 	õ 	�cÕ2Ñ3Ô3Ð3Ø× Ò Ý•XÔ)¨;À\ÐRÑRÔRñ
ô 
ð 	
rˆ   c                ó\   — |                       t          t          j        d¦  «        ¦  «        S )zGet the first value.Úfirst©r  r   r   ÚORDERABLE_AGGREGATIONr¥   s    r†   r  z
Expr.firstV  s#   € à× Ò ¥­(Ô*HÈ'Ñ!RÔ!RÑSÔSÐSrˆ   c                ó\   — |                       t          t          j        d¦  «        ¦  «        S )zGet the last value.Úlastr  r¥   s    r†   r  z	Expr.lastZ  s#   € à× Ò ¥­(Ô*HÈ&Ñ!QÔ!QÑRÔRÐRrˆ   N)r  rÎ   rz   rW   )rz   rW   )rÛ   rÜ   rÝ   r
  r  r  r®   rˆ   r†   r>   r>   K  sg   € € € € € Ø05ð 
ð 
ð 
ð 
ð 
ð 
ðTð Tð Tð TðSð Sð Sð Sð Sð Srˆ   r>   c                  ó   — e Zd Zej        ZdS )rB   N)rÛ   rÜ   rÝ   r   r€   r   r®   rˆ   r†   rB   rB   _  s   € € € € € ØŒz€H€H€Hrˆ   rB   ÚobjúNwDataFrame[IntoDataFrameT]rz   úDataFrame[IntoDataFrameT]c                ó   — d S r­   r®   ©r  s    r†   rÂ   rÂ   c  ó   € ØORÈsrˆ   úNwLazyFrame[IntoLazyFrameT]úLazyFrame[IntoLazyFrameT]c                ó   — d S r­   r®   r  s    r†   rÂ   rÂ   e  r  rˆ   úNwSeries[IntoSeriesT]úSeries[IntoSeriesT]c                ó   — d S r­   r®   r  s    r†   rÂ   rÂ   g  ó   € ØCFÀ3rˆ   ÚNwExprc                ó   — d S r­   r®   r  s    r†   rÂ   rÂ   i  s   € Ø%( Srˆ   úZNwDataFrame[IntoDataFrameT] | NwLazyFrame[IntoLazyFrameT] | NwSeries[IntoSeriesT] | NwExprúRDataFrame[IntoDataFrameT] | LazyFrame[IntoLazyFrameT] | Series[IntoSeriesT] | Exprc                ó8  — t          | t          ¦  «        r8t          | j                             t
          j        ¦  «        | j        ¬¦  «        S t          | t          ¦  «        r8t          | j                             t
          j        ¦  «        | j        ¬¦  «        S t          | t          ¦  «        r8t          | j                             t
          j        ¦  «        | j        ¬¦  «        S t          | t          ¦  «        rt          | j        Ž S t!          | ¦  «         d S r}   )Ú
isinstancerÞ   r   Ú_compliant_frameÚ_with_versionr   r€   Ú_levelrï   r   r  rC   Ú_compliant_seriesr&  r>   Ú_nodesr   r  s    r†   rÂ   rÂ   m  sè   € õ �#•{Ñ#Ô#ð [Ý˜Ô-×;Ò;½G¼JÑGÔGÈsÌzÐZÑZÔZÐZÝ�#•{Ñ#Ô#ð [Ý˜Ô-×;Ò;½G¼JÑGÔGÈsÌzÐZÑZÔZÐZÝ�#•xÑ Ô ð YÝ�cÔ+×9Ò9½'¼*ÑEÔEÈSÌZÐXÑXÔXÐXÝ�#•vÑÔð !Ý�S”ZÐ Ð Ý�ÑÔÐÐÐrˆ   Únative_objectrN   ÚkwdsúUnpack[OnlySeries]c                ó   — d S r­   r®   ©r1  r2  s     r†   Úfrom_nativer6  ~  s   € ØPSÐPSrˆ   úUnpack[AllowSeries]c                ó   — d S r­   r®   r5  s     r†   r6  r6  €  s   € ØQTÐQTrˆ   rG   úUnpack[ExcludeSeries]c                ó   — d S r­   r®   r5  s     r†   r6  r6  ‚  s	   € ð �rˆ   rM   úUnpack[AllowLazy]c                ó   — d S r­   r®   r5  s     r†   r6  r6  ‡  s   € ØUXÐUXrˆ   rH   c                ó   — d S r­   r®   r5  s     r†   r6  r6  ‰  ó	   € ð !$ rˆ   rL   c                ó   — d S r­   r®   r5  s     r†   r6  r6  �  ó	   € ð ˜#rˆ   c                ó   — d S r­   r®   r5  s     r†   r6  r6  ‘  r@  rˆ   rJ   c                ó   — d S r­   r®   r5  s     r†   r6  r6  •  r>  rˆ   úIntoDataFrameT | IntoSeriesTú/DataFrame[IntoDataFrameT] | Series[IntoSeriesT]c                ó   — d S r­   r®   r5  s     r†   r6  r6  ™  s	   € ð 7:°crˆ   ú-IntoDataFrameT | IntoLazyFrameT | IntoSeriesTúUnpack[AllowAny]úKDataFrame[IntoDataFrameT] | LazyFrame[IntoLazyFrameT] | Series[IntoSeriesT]c                ó   — d S r­   r®   r5  s     r†   r6  r6  �  s   € ð SVÐRUrˆ   úUnpack[PassThroughUnknown]c                ó   — d S r­   r®   r5  s     r†   r6  r6  ¡  s   € ØLOÈCrˆ   r   Úpass_throughrÎ   Ú
eager_onlyÚseries_onlyÚallow_seriesúbool | Nonec               ó   — d S r­   r®   ©r1  rL  rM  rN  rO  s        r†   r6  r6  ¤  s	   € ð ˆ#rˆ   F©rL  rM  rN  rO  úJIntoLazyFrameT | IntoDataFrameT | IntoSeriesT | IntoFrame | IntoSeries | TúOLazyFrame[IntoLazyFrameT] | DataFrame[IntoDataFrameT] | Series[IntoSeriesT] | Tc          	     ó¸   — 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)rL  rM  rN  rO  Úeager_or_interchange_onlyÚversion)r+  r   r   rC   rO   r   r€   rR  s        r†   r6  r6  ­  s}   € õX �-¥)­YÐ!7Ñ8Ô8ð Àð ØÐÝ�-¥Ñ(Ô(ð ¨kð ¸\ð ØÐåØØ!ØØØ!Ø"'Ý”
ðñ ô ð rˆ   .©rL  Únarwhals_objectrË   c               ó   — d S r­   r®   ©rZ  rL  s     r†   Ú	to_nativer]  é  ó	   € ð �Srˆ   c               ó   — d S r­   r®   r\  s     r†   r]  r]  í  r^  rˆ   c               ó   — d S r­   r®   r\  s     r†   r]  r]  ñ  s	   € ð �#rˆ   c               ó   — d S r­   r®   r\  s     r†   r]  r]  õ  r%  rˆ   ú3IntoDataFrameT | IntoLazyFrameT | IntoSeriesT | Anyc               ó.   — 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.
    rY  )Únwr]  r\  s     r†   r]  r]  ù  s   € õ& Œ<˜°lÐCÑCÔCÐCrˆ   TÚfuncúCallable[..., Any] | NoneúCallable[..., Any]c               ó:   ‡‡‡‡— 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.
    re  rg  rz   c                óH   •‡ — t          ‰ ¦  «        dˆˆˆ ˆˆfd„¦   «         }|S )NÚargsr   rë   rz   c                 ó<  •‡— ˆˆ	ˆˆfd„| D ¦   «         }ˆˆ	ˆˆfd„|                      ¦   «         D ¦   «         }ˆfd„g |¢|                     ¦   «         ¢R D ¦   «         }|                     ¦   «         dk    rd}t          |¦  «        ‚ ‰
|i |¤Ž}t	          |‰¬¦  «        S )Nc           	     ó8   •— g | ]}t          |‰‰‰‰¬ ¦  «        ‘ŒS ©rS  ©r6  )Ú.0ÚargrO  rM  rL  rN  s     €€€€r†   ú
<listcomp>zBnarwhalify.<locals>.decorator.<locals>.wrapper.<locals>.<listcomp>;  sI   ø€ ð 	ð 	ð 	ð õ ØØ!-Ø)Ø +Ø!-ðñ ô ð	ð 	ð 	rˆ   c           
     ó@   •— i | ]\  }}|t          |‰‰‰‰¬ ¦  «        “ŒS rm  rn  )ro  r¹   ÚvaluerO  rM  rL  rN  s      €€€€r†   ú
<dictcomp>zBnarwhalify.<locals>.decorator.<locals>.wrapper.<locals>.<dictcomp>F  sO   ø€ ð 	ð 	ð 	ñ  �D˜%ð •kØØ!-Ø)Ø +Ø!-ðñ ô ð	ð 	ð 	rˆ   c                óJ   •— h | ]}t          |d d¦  «        xŠ¯ ‰¦   «         ’Œ S )Ú__native_namespace__N)Úgetattr)ro  ÚvÚbs     €r†   ú	<setcomp>zAnarwhalify.<locals>.decorator.<locals>.wrapper.<locals>.<setcomp>Q  sG   ø€ ð ð ð àÝ  Ð$:¸DÑAÔAÐA�AðØ�‘”ðð ð rˆ   é   z_Found multiple backends. Make sure that all dataframe/series inputs come from the same backend.rY  )Úitemsrô   Ú__len__Ú
ValueErrorr]  )rj  rë   Úargs_nwÚ	kwargs_nwÚbackendsr  r’   ry  rO  rM  re  rL  rN  s          @€€€€€r†   Úwrapperz.narwhalify.<locals>.decorator.<locals>.wrapper9  s  øø€ ð	ð 	ð 	ð 	ð 	ð 	ð 	ð  ð	ñ 	ô 	ˆGð	ð 	ð 	ð 	ð 	ð 	ð 	ð $*§<¢<¡>¤>ð	ñ 	ô 	ˆIðð ð ð à8˜7Ð8 Y×%5Ò%5Ñ%7Ô%7Ð8Ð8ðñ ô ˆHð ×ÒÑ!Ô! AÒ%Ð%Øw�Ý  ‘o”oÐ%à�T˜7Ð0 iÐ0Ð0ˆFå˜V°,Ð?Ñ?Ô?Ð?rˆ   )rj  r   rë   r   rz   r   r   )re  r‚  rO  rM  rL  rN  s   ` €€€€r†   Ú	decoratorznarwhalify.<locals>.decorator8  sX   øø€ Ý	ˆt‰Œð#	@ð #	@ð #	@ð #	@ð #	@ð #	@ð #	@ð #	@ð #	@ñ 
Œð#	@ðJ ˆrˆ   N)re  rg  rz   rg  r®   )re  rL  rM  rN  rO  rƒ  s    ```` r†   Ú
narwhalifyr„    sP   øøøø€ ðR'ð 'ð 'ð 'ð 'ð 'ð 'ð 'ð 'ðR €|ØÐàˆ9�T‰?Œ?Ðrˆ   c                 óB   — t          t          j        ¦   «         ¦  «        S )z3Instantiate an expression representing all columns.)rÂ   rd  Úallr®   rˆ   r†   r†  r†  g  ó   € å•b”f‘h”hÑÔÐrˆ   Únamesústr | Iterable[str]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Â   rd  Úcol©rˆ  s    r†   r‹  r‹  l  s   € õ •b”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Â   rd  ÚexcluderŒ  s    r†   rŽ  rŽ  u  s   € õ •b”j %Ð(Ñ)Ô)Ð)rˆ   Úindicesúint | Sequence[int]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Â   rd  Únth)r�  s    r†   r’  r’  ~  s   € õ •b”f˜gÐ&Ñ'Ô'Ð'rˆ   c                 óB   — t          t          j        ¦   «         ¦  «        S )zReturn the number of rows.)rÂ   rd  Úlenr®   rˆ   r†   r”  r”  ‹  r‡  rˆ   rs  rl   rõ   rö   c                óF   — 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Â   rd  Úlit)rs  rõ   s     r†   r–  r–  �  s   € õ •b”f˜U EÑ*Ô*Ñ+Ô+Ð+rˆ   Úcolumnsrº   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Â   rd  Úmin©r—  s    r†   r™  r™  �  ó   € õ •b”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Â   rd  Úmaxrš  s    r†   r�  r�  ©  r›  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Â   rd  Úmeanrš  s    r†   rŸ  rŸ  µ  s   € õ •b”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Â   rd  Úmedianrš  s    r†   r¡  r¡  Á  s   € õ •b”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Â   rd  Úsumrš  s    r†   r£  r£  Ï  r›  rˆ   ÚexprsúIntoExpr | Iterable[IntoExpr]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Â   rd  Úsum_horizontal©r¤  s    r†   r§  r§  Û  ó   € õ •bÔ'¨Ð/Ñ0Ô0Ð0rˆ   r  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Â   rd  Úall_horizontal©r  r¤  s     r†   r«  r«  è  ó"   € õ •bÔ'¨ÐJ¸\ÐJÐJÑKÔ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Â   rd  Úany_horizontalr¬  s     r†   r¯  r¯  ø  r­  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Â   rd  Úmean_horizontalr¨  s    r†   r±  r±    s   € õ •bÔ(¨%Ð0Ñ1Ô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Â   rd  Úmin_horizontalr¨  s    r†   r³  r³    r©  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Â   rd  Úmax_horizontalr¨  s    r†   rµ  rµ    r©  rˆ   ÚpearsonÚarj   ry  ÚmethodúLiteral['pearson', 'spearman']c                óJ   — 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')
    )r¸  )rÂ   rd  Úcorr)r·  ry  r¸  s      r†   r»  r»  ,  s#   € õ •b”g˜a ¨6Ð2Ñ2Ô2Ñ3Ô3Ð3rˆ   r{  ©Úddofr½  Úintc               óJ   — 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Â   rd  Úcov)r·  ry  r½  s      r†   rÀ  rÀ  9  s#   € õ •b”f˜Q ¨Ð-Ñ-Ô-Ñ.Ô.Ð.rˆ   Ú ©Ú	separatorr  Ú
more_exprsrÃ  c               óH   — t          t          j        | g|¢R ||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Â   rd  Ú
concat_str)r¤  rÃ  r  rÄ  s       r†   rÆ  rÆ  E  s5   € õ& Ý
Œ�eÐY˜jÐYÐY°IÈLÐYÐYÐYñô ð rˆ   Úf_stringrj  c                ó@   — t          t          j        | g|¢R Ž ¦  «        S )zŸFormat expressions as a string.

    Arguments:
        f_string: A string that with placeholders.
        args: Expression(s) that fill the placeholders.
    )rÂ   rd  Úformat)rÇ  rj  s     r†   rÉ  rÉ  ]  s$   € õ •b”i Ð0¨4Ð0Ð0Ð0Ñ1Ô1Ð1rˆ   c                ó@   — t          t          j        | g|¢R Ž ¦  «        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Â   rd  Úcoalesce)r¤  rÄ  s     r†   rË  rË  g  s$   € õ •b”k %Ð5¨*Ð5Ð5Ð5Ñ6Ô6Ð6rˆ   c                  ó.   — e Zd Zed
d„¦   «         Zdd„Zd	S )ÚWhenÚwhenú	nw_f.Whenrz   c                ó&   —  | |j         d¬¦  «        S )Nr®   )Úchain)Ú
_predicate)r‘   rÎ  s     r†   Ú	from_whenzWhen.from_whenx  s   € àˆs�4”?¨"Ð-Ñ-Ô-Ð-rˆ   rs  ú&IntoExpr | NonNestedLiteral | _1DArrayÚThenc                ó\   — g | j         ¢| j        |f‘R }t                               |¦  «        S r­   )Ú_chainrÒ  rÕ  Ú_from_chain)r„   rs  Ú	new_chains      r†   Úthenz	When.then|  s1   € Ø<�d”kÐ< D¤O°UÐ#;Ð<Ð<ˆ	Ý×Ò 	Ñ*Ô*Ð*rˆ   N)rÎ  rÏ  rz   rÍ  )rs  rÔ  rz   rÕ  )rÛ   rÜ   rÝ   rß   rÓ  rÚ  r®   rˆ   r†   rÍ  rÍ  w  sF   € € € € € Øð.ð .ð .ñ „[ð.ð+ð +ð +ð +ð +ð +rˆ   rÍ  c                  ó(   ‡ — e Zd Zd
d„Zdˆ fd	„Zˆ xZS )rÕ  Ú
predicatesr¥  rz   rÍ  c                ó$   — t          |d| j        iŽS )NrÑ  )rÍ  r×  )r„   rÜ  s     r†   rÎ  z	Then.when‚  s   € Ý�ZÐ3 t¤{Ð3Ð3Ð3rˆ   Úotherwise_valueúIntoExpr | NonNestedLiteralr>   c                ó`   •— t          t          ¦   «                              |¦  «        ¦  «        S r­   )rÂ   r�   Ú	otherwise)r„   rÞ  r…   s     €r†   rá  zThen.otherwise…  s#   ø€ Ý�%™'œ'×+Ò+¨OÑ<Ô<Ñ=Ô=Ð=rˆ   ©rÜ  r¥  rz   rÍ  )rÞ  rß  rz   r>   )rÛ   rÜ   rÝ   rÎ  rá  rá   râ   s   @r†   rÕ  rÕ  �  sQ   ø€ € € € € ð4ð 4ð 4ð 4ð>ð >ð >ð >ð >ð >ð >ð >ð >ð >rˆ   rÕ  rÜ  c                 óN   — t                                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Ô1Ð1rˆ   r¹   rô   rŠ   r‹   r²   c               óB   — 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ÑLÔLÑMÔMÐMrˆ   r‰   r]   rŒ   c               óH   — 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 l¸GÐDÑDÔDÑEÔEÐErˆ   r�   r“   r”   r•   r–   r—   c               óJ   — 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 T¨6¸7ÐCÑCÔCÑDÔDÐDrˆ   r   r�   rq   rŸ   c               óJ   — 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 d¨F¸GÐDÑDÔDÑEÔEÐErˆ   ú,)rÃ  Úsourcerë   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©rì  rŠ   rÃ  rë   s       r†   rï  rï    s2   € õ. ÝŒ�fÐM g¸ÐMÐMÀfÐMÐMñô ð rˆ   úIntoBackend[Backend]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ó  *  s2   € õ, ÝŒ�fÐM g¸ÐMÐMÀfÐMÐ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¸ÐJÀ6ÐJÐJÑKÔ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¸ÐJÀ6ÐJÐJÑKÔKÐKrˆ   úIntoExpr | Sequence[IntoExpr]Únamed_exprsc                 ó>   — 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)r¤  rú  s     r†   rü  rü  €  s!   € õ •d”k 5Ð8¨KÐ8Ð8Ñ9Ô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<   r†  r«  r¯  rË  r‹  r@   rÆ  r»  rÀ  rD   rE   rE   r   rŽ  rÉ  r�   r™   r�   r6  r¢   r   rP   r   r”  r–  r�  rµ  r   r   r   r   r   rŸ  r±  r¡  r™  r³  r„  ræ  r’  rï  rõ  ró  rø  rF   rF   rA   rü  r£  r§  r]  rQ   rÎ  )r  r  rz   r  )r  r  rz   r   )r  r"  rz   r#  )r  r&  rz   r>   )r  r(  rz   r)  )r1  rN   r2  r3  rz   rN   )r1  rN   r2  r7  rz   rN   )r1  rG   r2  r9  rz   rG   )r1  rM   r2  r;  rz   rM   )r1  rH   r2  r9  rz   r  )r1  rL   r2  r3  rz   r#  )r1  rL   r2  r7  rz   r#  )r1  rJ   r2  r;  rz   r   )r1  rC  r2  r7  rz   rD  )r1  rF  r2  rG  rz   rH  )r1  rr   r2  rJ  rz   rr   )r1  r   rL  rÎ   rM  rÎ   rN  rÎ   rO  rP  rz   r   )r1  rT  rL  rÎ   rM  rÎ   rN  rÎ   rO  rP  rz   rU  )rZ  r  rL  rË   rz   rH   )rZ  r   rL  rË   rz   rJ   )rZ  r#  rL  rË   rz   rL   )rZ  r   rL  rÎ   rz   r   )rZ  rH  rL  rÎ   rz   rb  r­   )re  rf  rL  rÎ   rM  rÎ   rN  rÎ   rO  rP  rz   rg  )rz   r>   )rˆ  r‰  rz   r>   )r�  r�  rz   r>   )rs  rl   rõ   rö   rz   r>   )r—  rº   rz   r>   )r¤  r¥  rz   r>   )r¤  r¥  r  rÎ   rz   r>   )r¶  )r·  rj   ry  rj   r¸  r¹  rz   r>   )r·  rj   ry  rj   r½  r¾  rz   r>   )
r¤  r¥  rÄ  rj   rÃ  rº   r  rÎ   rz   r>   )rÇ  rº   rj  rj   rz   r>   )r¤  r¥  rÄ  rj   rz   r>   râ  )
r¹   rº   rô   r   rõ   rö   rŠ   r‹   rz   r²   rØ   rÙ   rÚ   )
rì  rº   rŠ   r‹   rÃ  rº   rë   r   rz   rŒ   )
rì  rº   rŠ   rñ  rÃ  rº   rë   r   rz   rÀ   )rì  rº   rŠ   r‹   rë   r   rz   rŒ   )rì  rº   rŠ   rñ  rë   r   rz   rÀ   )r¤  rù  rú  rj   rz   r>   )¸Ú
__future__r   Ú	functoolsr   Útypingr   r   r   r	   r
   r   Únarwhalsrd  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Â   r6  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ü  Ú__all__r®   rˆ   r†   ú<module>r     s  ðØ "Ð "Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ð Ð Ø EÐ EÐ EÐ EÐ EÐ EÐ EÐ EÐ EÐ EÐ EÐ EÐ EÐ EÐ EÐ Eà Ð Ð Ð Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ø .Ð .Ð .Ð .Ð .Ð .Ø ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ø 9Ð 9Ð 9Ð 9Ð 9Ð 9Ð 9Ð 9ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð RÐ QÐ QÐ QÐ QÐ QÐ QÐ Qðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð> 8Ð 7Ð 7Ð 7Ð 7Ð 7Ø (Ð (Ð (Ð (Ð (Ð (Ø FÐ FÐ FÐ FÐ FÐ FÐ FÐ FÐ FÐ FØ .Ð .Ð .Ð .Ð .Ð .Ø .Ð .Ð .Ð .Ð .Ð .Ø >Ð >Ð >Ð >Ð >Ð >Ð >Ð >Ð >Ð >ð	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð UÐ TÐ TÐ TÐ TÐ TÐ TÐ TÐ TÐ Tàð &ØEÐEÐEÐEÐEÐEÐEÐEÐEÐEÐEÐEà9Ð9Ð9Ð9Ð9Ð9Ð9Ð9Ð9Ð9ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð HÐGÐGÐGÐGÐGÐGÐGð
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 	ˆ�˜SÐ!Ñ!Ô!€AØˆ	�#‰Œ€AØˆ�‰Œ€Að}/ð }/ð }/ð }/ð }/�˜NÔ+ñ }/ô }/ð }/ð@Fð Fð Fð Fð F�˜NÔ+ñ Fô Fð Fð$C<ð C<ð C<ð C<ð C<ˆX�kÔ"ñ C<ô C<ð C<ðLSð Sð Sð Sð Sˆ6ñ Sô Sð Sð(ð ð ð ð ˆXñ ô ð ð 
Ø RÐ RÐ Rñ 
„Ø RØ	Ø RÐ RÐ Rñ 
„Ø RØ	Ø FÐ FÐ Fñ 
„Ø FØ	Ø (Ð (Ð (ñ 
„Ø (ðð ð ð ð" 
Ø SÐ SÐ Sñ 
„Ø SØ	Ø TÐ TÐ Tñ 
„Ø TØ	ðð ð ñ 
„ðð 
Ø XÐ XÐ Xñ 
„Ø XØ	ð$ð $ð $ñ 
„ð$ð 
ðð ð ñ 
„ðð 
ðð ð ñ 
„ðð 
ð$ð $ð $ñ 
„ð$ð 
ð:ð :ð :ñ 
„ð:ð 
ðVð Vð Vñ 
„ðVð 
Ø OÐ OÐ Oñ 
„Ø Oà	ðð ð ñ 
„ðð  ØØØ $ð9ð 9ð 9ð 9ð 9ð 9ðx 
àRUðð ð ð ð ñ 
„ðð 
àRUðð ð ð ð ñ 
„ðð 
àLOðð ð ð ð ñ 
„ðð 
Ø FÐ FÐ Fñ 
„Ø Fð ðDð Dð Dð Dð Dð Dð. '+ðUð ØØØ $ðUð Uð Uð Uð Uð Uðp ð  ð  ð  ð
&ð &ð &ð &ð*ð *ð *ð *ð
(ð 
(ð 
(ð 
(ð ð  ð  ð  ð

,ð 
,ð 
,ð 
,ð 
,ð	(ð 	(ð 	(ð 	(ð	(ð 	(ð 	(ð 	(ð	)ð 	)ð 	)ð 	)ð+ð +ð +ð +ð	(ð 	(ð 	(ð 	(ð
1ð 
1ð 
1ð 
1ðLð Lð Lð Lð Lð Lð Lð Lð 2ð 2ð 2ð 2ð
1ð 
1ð 
1ð 
1ð
1ð 
1ð 
1ð 
1ð HQð
4ð 
4ð 
4ð 
4ð 
4ð 23ð 	/ð 	/ð 	/ð 	/ð 	/ð 	/ð Øð	ð ð ð ð ð ð02ð 2ð 2ð 2ð7ð 7ð 7ð 7ð +ð +ð +ð +ð +ˆ4Œ9ñ +ô +ð +ð>ð >ð >ð >ð >ˆ4Œ9�dñ >ô >ð >ð2ð 2ð 2ð 2ð. #ðNð Nð Nð Nð Nð4Fð Fð Fð Fð* BFð Eð 15ð	 Eð  Eð  Eð  Eð  Eð  EðF Ô(€
Ð (Ð (Ð (Ñ (ð
 15ðFð Fð Fð Fð FðD ð	ð ð ð ð ð ð: EHðð ð ð ð ð ð6Lð Lð Lð Lð*#Lð #Lð #Lð #LðL:ð :ð :ð :ðYð Yð Y€€€rˆ   