Ë
    ±.óh“Š ã                  ó€  — d dl mZ d dlZd dlZd dlZd dlZd dlmZm	Z	m
Z
 d dlmZ d dlmZ d dlmZ d dlmZmZmZmZmZ d dlmc mZ d dlmZ d d	lm Z  d d
l!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- d dl.m/Z/  ej`                  e1«      5  d dl2m3Z3m4Z4 ddd«       ejj                  dk\  rd dl6m7Z7 n e8d«      Z7erd dlm9Z9 d dlm:Z:m;Z; d dl<m=Z=m>Z>m?Z? g d¢Z@edLd„«       ZAedMd„«       ZAdNd„ZAddœ	 	 	 	 	 	 	 dOd„ZBdPd„ZCddœ	 	 	 	 	 	 	 	 	 	 	 dQd„ZD	 	 	 	 	 	 dRd „ZE G d!„ de/«      ZFdd"œdSd#„ZGdTd$„ZHdTd%„ZIdUdd&œdVd'„ZJ	 dUdd&œ	 	 	 	 	 dVd(„ZKdTd)„ZLdTd*„ZM	 	 	 	 dWd+„ZNdd,œ	 	 	 	 	 dXd-„ZOdd,œdYd.„ZP e"«       dTd/„«       ZQ e"«       dZd[d0„«       ZR e"«       dZdd1œd\d2„«       ZS e"«       dTd3„«       ZT e"«       dTd4„«       ZUdTd5„ZVd]d6„ZWdTd7„ZX	 	 d^	 	 	 	 	 d_d8„ZdTd9„ZdUd`d:„ZY	 dZ	 	 	 dad;„ZZdbd<„Z[	 	 	 	 	 	 dcd=„Z\ddœddd>„Z]dTd?„Z^dTd@„Z_dTdA„Z`dTdB„ZaddœdddC„ZbdedD„ZcdTdE„ZddTdF„ZedfdG„ZfddHœdgdI„ZgdTdJ„ZhdTdK„Ziy# 1 sw Y   ŒžxY w)hé    )ÚannotationsN)Ú
CollectionÚMappingÚSequence)ÚDecimal)Úreduce)Úor_)ÚTYPE_CHECKINGÚAnyÚLiteralÚNoReturnÚoverload)Ú	functions)Ú_parse_inputs_as_iterable)Úunstable)Ú	is_columnÚ	re_escape)ÚBinaryÚBooleanÚCategoricalÚDateÚStringÚTimeÚis_polars_dtype)ÚExpr)ÚPyExprÚ
PySelector)é   é
   )ÚNoneType)ÚIterable)Ú	DataFrameÚ	LazyFrame)ÚPolarsDataTypeÚPythonDataTypeÚTimeUnit)%ÚSelectorÚallÚalphaÚalphanumericÚarrayÚbinaryÚbooleanÚby_dtypeÚby_indexÚby_nameÚcategoricalÚcontainsÚdateÚdatetimeÚdecimalÚdigitÚdurationÚ	ends_withÚenumÚexcludeÚexpand_selectorÚfirstÚfloatÚintegerÚis_selectorÚlastÚlistÚmatchesÚnestedÚnumericÚsigned_integerÚstarts_withÚstringÚstructÚtemporalÚtimeÚunsigned_integerr'   c                 ó   — y ©N© ©Úobjs    úN/var/www/html/ai-service/venv/lib/python3.12/site-packages/polars/selectors.pyr?   r?   ]   s   € Ø14ó    c                 ó   — y rM   rN   rO   s    rQ   r?   r?   a   s   € Ø-0rR   c                ó"   — t        | t        «      S )a  
    Indicate whether the given object/expression is a selector.

    Examples
    --------
    >>> from polars.selectors import is_selector
    >>> import polars.selectors as cs
    >>> is_selector(pl.col("colx"))
    False
    >>> is_selector(cs.first() | cs.last())
    True
    )Ú
isinstancer'   rO   s    rQ   r?   r?   e   s   € ô cœ8Ó$Ð$rR   T©Ústrictc               ó  — t        | t        «      rddlm}  || ¬«      } |rt	        |«      s.n|j
                  j                  d¬«      sd|›d}t        |«      ‚t        | j                  |«      j                  «       «      S )ax  
    Expand selector to column names, with respect to a specific frame or target schema.

    .. versionadded:: 0.20.30
        The `strict` parameter was added.

    Parameters
    ----------
    target
        A Polars DataFrame, LazyFrame or Schema.
    selector
        An arbitrary polars selector (or compound selector).
    strict
        Setting False additionally allows for a broader range of column selection
        expressions (such as bare columns or use of `.exclude()`) to be expanded,
        not just the dedicated selectors.

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "colx": ["a", "b", "c"],
    ...         "coly": [123, 456, 789],
    ...         "colz": [2.0, 5.5, 8.0],
    ...     }
    ... )

    Expand selector with respect to an existing `DataFrame`:

    >>> cs.expand_selector(df, cs.numeric())
    ('coly', 'colz')
    >>> cs.expand_selector(df, cs.first() | cs.last())
    ('colx', 'colz')

    This also works with `LazyFrame`:

    >>> cs.expand_selector(df.lazy(), ~(cs.first() | cs.last()))
    ('coly',)

    Expand selector with respect to a standalone `Schema` dict:

    >>> schema = {
    ...     "id": pl.Int64,
    ...     "desc": pl.String,
    ...     "count": pl.UInt32,
    ...     "value": pl.Float64,
    ... }
    >>> cs.expand_selector(schema, cs.string() | cs.float())
    ('desc', 'value')

    Allow for non-strict selection expressions (such as those
    including use of an `.exclude()` constraint) to be expanded:

    >>> cs.expand_selector(schema, cs.numeric().exclude("id"), strict=False)
    ('count', 'value')
    r   )r"   )ÚschemaF)Úallow_aliasingzexpected a selector; found ú	 instead.)rU   r   Úpolars.dataframer"   r?   ÚmetaÚis_column_selectionÚ	TypeErrorÚtupleÚselectÚcollect_schema)ÚtargetÚselectorrW   r"   Úmsgs        rQ   r;   r;   w   su   € ô~ &œ'Ô"Ý.á &Ô)ˆñ ô 	HÕà]‰]×.Ñ.¸eÐ.ÔDà+¨H¨<°yÐAˆÜ˜‹nÐä—‘˜xÓ(×7Ñ7Ó9Ó:Ð:rR   c                ó¢   — t        |«      }g }|D ]<  }t        |«      rt        | |«      }|j                  |«       Œ,|j	                  |«       Œ> |S )as  
    Internal function that expands any selectors to column names in the given input.

    Non-selector values are left as-is.

    Examples
    --------
    >>> from polars.selectors import _expand_selectors
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "colw": ["a", "b"],
    ...         "colx": ["x", "y"],
    ...         "coly": [123, 456],
    ...         "colz": [2.0, 5.5],
    ...     }
    ... )
    >>> _expand_selectors(df, ["colx", cs.numeric()])
    ['colx', 'coly', 'colz']
    >>> _expand_selectors(df, cs.string(), cs.float())
    ['colw', 'colx', 'colz']
    )r   r?   r;   ÚextendÚappend)ÚframeÚitemsÚ
items_iterÚexpandedÚitemÚselector_colss         rQ   Ú_expand_selectorsro   È   sU   € ô. +¨5Ó1€Jà#%€HØò "ˆÜtÔÜ+¨E°4Ó8ˆMØO‰O˜MÕ*àO‰O˜DÕ!ð"ð €OrR   F)Ú
tuple_keysc               ó   — i }|xs i j                  «       D ]t  \  }}|r t        |«      rt        | |¬«      ||<   ||   }|rFt        |«      r;t        | |¬«      }|r|||<   ŒJ|j                  t        j                  ||«      «       Œp|||<   Œv |S )zCExpand dict key/value selectors into their underlying column names.)rd   )rj   r?   r;   ÚupdateÚdictÚfromkeys)	ÚdfÚdÚexpand_keysÚexpand_valuesrp   rl   ÚkeyÚvalueÚcolss	            rQ   Ú_expand_selector_dictsr|   ë   s“   € ð €HØ’w˜B—o‘oÓ'ò "‰
ˆˆUÙœ[¨Ô/Ü+¨B¸Ô?ˆHS‰MØ˜S‘MˆEÙœ; sÔ+Ü" 2°Ô4ˆDÙØ!&˜’à—‘¤§¡¨d°EÓ :Õ;à!ˆHSŠMð"ð €OrR   c                óX  — g g g }}}g }g t        | t        «      rt        | t        «      s| n| g¢|¢­D ]×  }t        |«      r|j	                  |«       Œ t        |«      r|j	                  |«       Œ=t        |t        «      rF|j                  d«      r#|j                  d«      r|j	                  |«       Œ|j	                  |«       Œ“t        |«      r*|j	                  |j                  j                  «       «       ŒÈd|›d}t        |«      ‚ g }|r|j	                  t        |ddiŽ«       |r|j	                  t        |Ž «       |rC|j	                  t        t        |«      dkD  rdj!                  d	„ |D «       «      n|d
   «      «       |r|j#                  |«       t%        t&        |«      S )zLCreate a combined selector from cols, names, dtypes, and/or other selectors.ú^ú$z:expected one or more `str`, `DataType` or selector; found r[   Úrequire_allFé   ú|c              3  ó(   K  — | ]
  }d |› d–— Œ y­w)ú(ú)NrN   )Ú.0Úrxs     rQ   ú	<genexpr>z'_combine_as_selector.<locals>.<genexpr>0  s   è ø€ Ò5 r˜1˜R˜D œÑ5ùs   ‚r   )rU   r   Ústrr?   rh   r   Ú
startswithÚendswithr   r]   Úoutput_namer_   r0   r.   rB   ÚlenÚjoinrg   r   r	   )	rj   Ú
more_itemsÚnamesÚregexesÚdtypesÚ	selectorsrm   re   Úselecteds	            rQ   Ú_combine_as_selectorr•     sƒ  € ð    RFˆ7€EØ)+€Iðô ˜%¤Ô,´ZÀÄsÔ5Kñ àð	ð 
ñò !ˆô tÔØ×Ñ˜TÕ"Ü˜TÔ"ØM‰M˜$ÕÜ˜œcÔ"Ø‰˜sÔ#¨¯©°cÔ(:Ø—‘˜tÕ$à—‘˜TÕ"ÜtŒ_ØL‰L˜Ÿ™×.Ñ.Ó0Õ1àNÈtÈhÐV_Ð`ˆCÜ˜C“.Ð ð+!ð. €HÙØ‰œ Ð:°EÑ:Ô;ÙØ‰œ &Ð)Ô*ÙØ‰Üäw“< !Ò#ð —‘Ñ5¨WÔ5Ô5à˜Q‘Zóô	
ñ Ø‰˜	Ô"ä”#xÓ Ð rR   c                  ó‚  — e Zd ZU dZdZded<   ed!d„«       Zd"d„Zd#d„Z	d$d„Z
d%d	„Ze	 	 	 	 d&d
„«       Zed'd„«       Zd(d„Zd)d„Zd)d„Zed*d„«       Zed)d„«       Zd+d„Zd)d„Zed*d„«       Zed)d„«       Zd+d„Zd)d„Zed*d„«       Zed)d„«       Zd+d„Zd,d„Zed*d„«       Zed)d„«       Zd+d„Zd)d„Z	 	 	 	 	 	 d-d„Zd.d „Zy)/r'   z&Base column selector expression/proxy.Nr   Ú_pyselectorc                óV   —  | «       }||_         t        j                  |«      |_        |S rM   )r—   r   Únew_selectorÚ_pyexpr)ÚclsÚ
pyselectorÚslfs      rQ   Ú_from_pyselectorzSelector._from_pyselectorA  s'   € á‹eˆØ$ˆŒÜ×)Ñ)¨*Ó5ˆŒØˆ
rR   c                ó6   — | j                   j                  «       S rM   )rš   Ú__getstate__©Úselfs    rQ   r    zSelector.__getstate__H  s   € Ø|‰|×(Ñ(Ó*Ð*rR   c                óÔ   — t        j                  d«      j                  | _        | j                  j                  |«       | j                  j                  «       j                  | _        y )Nr   )ÚFÚlitrš   Ú__setstate__r]   Úas_selectorr—   )r¢   Ústates     rQ   r¦   zSelector.__setstate__K  sD   € Ü—u‘u˜Q“x×'Ñ'ˆŒØ‰×!Ñ! %Ô(ØŸ9™9×0Ñ0Ó2×>Ñ>ˆÕrR   c                óR   — t        t        j                  | j                  «      «      S rM   )r‰   r   Ú_from_pyexprrš   r¡   s    rQ   Ú__repr__zSelector.__repr__P  s   € Ü”4×$Ñ$ T§\¡\Ó2Ó3Ð3rR   c                ó6   — | j                   j                  «       S rM   )r—   Úhashr¡   s    rQ   Ú__hash__zSelector.__hash__S  s   € ð ×Ñ×$Ñ$Ó&Ð&rR   c                ó´  — g }g }|D ]ò  }t        |«      rX|t        j                  u r|t        «       gz  }Œ1t	        |t        j                  «      r+|j
                  dk(  r|t        |j                  d¬«      gz  }Œv|t        j                  u r|t        «       gz  }Œ—|t        j                  u r|t        «       gz  }Œ¸|t        j                  u r|t        «       gz  }ŒÙ|t        j                  u r|t        «       gz  }Œú|t        j                  u r|t!        «       gz  }Œ|t        j"                  u r|t%        «       gz  }Œ>|t        j&                  u r|t)        «       gz  }Œ`||gz  }Œht	        |t*        «      r|t,        u r|t/        «       gz  }Œ‘|t0        j2                  u r|t3        «       gz  }Œ³|t4        u r|t7        «       gz  }ŒË|t8        u r|t        j:                  «       gz  }Œí|t<        u r|t        j>                  «       gz  }Œ|t@        u r|tA        «       gz  }Œ'|tB        u r|t        jD                  «       gz  }ŒI|tF        jH                  u r|t        jJ                  «       gz  }Œu|tF        j                  u r|t        «       gz  }Œ—|tF        jL                  u r|t        «       gz  }Œ¹|tF        jN                  u r|tO        «       gz  }ŒÛ|tP        u r|t)        «       gz  }Œó|t0        j                  u s|tR        u r|t        «       gz  }Œt+        tT        «      t*        u rtT        ndt+        tT        «      jV                  ›}t+        tT        «      t*        u rdn	dtT        ›d}d|› d|› }tY        |«      d ‚t+        tT        «      t*        u rtT        ndt+        tT        «      jV                  ›}t+        tT        «      t*        u rdn	dtT        ›d}d|› d|› }tY        |«      d ‚ | j[                  t]        j^                  |«      «      }ta        |«      d	k(  r|S |d	   }	|d
d  D ]  }
|	|
z  }	Œ	 ta        |«      d	k(  r|	S ||	z  S )NÚ*)Ú	time_unitÚ	time_zonezof type Ú z	 (given: r…   zcannot parse input z into Polars selectorr   r   )1r   ÚpldtÚDatetimer4   rU   r²   r±   ÚDurationr7   r   r1   ÚEnumr9   ÚListrA   ÚArrayr+   ÚStructrH   r   r5   ÚtypeÚintr>   Úbuiltinsr=   Úboolr-   r‰   r   Úbytesr   Úobjectr    ÚNullÚ
pydatetimerJ   r   Ú	timedeltar3   Ú	PyDecimalr`   ÚinputÚ__name__r_   rž   r   r.   r   )r›   r’   r“   Úconcrete_dtypesÚdtÚ
input_typeÚinput_detailre   Údtype_selectorrd   Úss              rQ   Ú	_by_dtypezSelector._by_dtypeX  sÒ  € ð ˆ	ØˆØó B	/ˆBÜ˜rÕ"ØœŸ™Ñ&Ø¤(£* Ñ-‘IÜ ¤D§M¡MÔ2°r·|±|ÀsÒ7JØ¤(°R·\±\ÈSÔ"QÐ!RÑR‘IØœ4Ÿ=™=Ñ(Ø¤(£* Ñ-‘IØœ4×+Ñ+Ñ+Ø¤+£- Ñ0‘IØœ4Ÿ9™9‘_Ø¤$£& Ñ)‘IØœ4Ÿ9™9‘_Ø¤$£& Ñ)‘IØœ4Ÿ:™:Ñ%Ø¤%£' Ñ*’IØœ4Ÿ;™;Ñ&Ø¤&£( Ñ+’IØœ4Ÿ<™<Ñ'Ø¤'£) Ñ,’Ià#¨ tÑ+’OÜ˜B¤Õ%Øœ‘9Ø¤'£) Ñ,’IØœ8Ÿ>™>Ñ)Ø¤%£' Ñ*’IØœ4‘ZØ¤'£) Ñ,’IØœ3‘YØ#¬¯©« Ñ6’OØœ5‘[Ø#¬¯©« Ñ6’OØœ6‘\Ø¤&£( Ñ+’IØœ8‘^Ø#¬¯	©	« }Ñ4’OØœ:Ÿ?™?Ñ*Ø#¬¯	©	« }Ñ4’OØœ:×.Ñ.Ñ.Ø¤(£* Ñ-’IØœ:×/Ñ/Ñ/Ø¤(£* Ñ-’IØœ:Ÿ?™?Ñ*Ø¤$£& Ñ)’IØœ9‘_Ø¤'£) Ñ,’IØœ8Ÿ=™=Ñ(¨B´%©KØ¤$£& Ñ)’Iô  ¤›;¬$Ñ.õ à'¬¬U«×(<Ñ(<Ð'?Ð@ð ô
 *.¬e«¼Ñ)<¡2ÀIÌeÈYÐVWÐBXLØ/°
¨|Ð;PÐQ]ÐP^Ð_CÜ# C›.¨dÐ2ô œE“{¤dÑ*õ à#¤D¬£K×$8Ñ$8Ð#;Ð<ð ô
 &*¬%£[´DÑ%8™rÀ	Ì%ÈÐRSÐ>TØ+¨J¨<Ð7LÈ\ÈNÐ[Ü “n¨$Ð.ðEB	/ðH ×-Ñ-¬j×.AÑ.AÀ/Ó.RÓSˆäˆy‹>˜QÒØ!Ð!à˜Q‘<ˆØ˜1˜2ò 	$ˆAØ !‘|‰Hð	$äˆÓ 1Ò$ØˆOà! HÑ,Ð,rR   c               óL   — | j                  t        j                  ||«      «      S rM   )rž   r   r0   )r›   r   rW   s      rQ   Ú_by_namezSelector._by_name¯  s    € à×#Ñ#¤J×$6Ñ$6°u¸fÓ$EÓFÐFrR   c                ó   — t        «       | z
  S )zInvert the selector.)r(   )r›   s    rQ   Ú
__invert__zSelector.__invert__³  s   € ä‹us‰{ÐrR   c                ó°   — t        |«      r-| j                  «       j                  |j                  «       «      S | j                  «       j                  |«      S rM   )r?   Úas_exprÚ__add__©r¢   Úothers     rQ   rÔ   zSelector.__add__·  s>   € ÜuÔØ—<‘<“>×)Ñ)¨%¯-©-«/Ó:Ð:à—<‘<“>×)Ñ)¨%Ó0Ð0rR   c                óp   — t        |«      rd}t        |«      ‚| j                  «       j                  |«      S )Nz=unsupported operand type(s) for op: ('Selector' + 'Selector'))r?   r_   rÓ   Ú__radd__©r¢   rÖ   re   s      rQ   rØ   zSelector.__radd__½  s0   € ÜuÔØQˆCÜ˜C“.Ð à—<‘<“>×*Ñ*¨5Ó1Ð1rR   c                 ó   — y rM   rN   rÕ   s     rQ   Ú__and__zSelector.__and__Ä  ó   € Ø47rR   c                 ó   — y rM   rN   rÕ   s     rQ   rÛ   zSelector.__and__Ç  ó   € Ø+.rR   c                ó0  — t        |«      r%|j                  j                  «       }t        |«      }t	        |«      r=t
        j                  t        j                  | j                  |j                  «      «      S | j                  «       j                  |«      S rM   )r   r]   rŒ   r0   r?   r'   rž   r   Ú	intersectr—   rÓ   rÛ   )r¢   rÖ   Úcolnames      rQ   rÛ   zSelector.__and__Ê  sv   € ÜUÔØ—j‘j×,Ñ,Ó.ˆGÜ˜GÓ$ˆEÜuÔÜ×,Ñ,Ü×$Ñ$ T×%5Ñ%5°u×7HÑ7HÓIóð ð —<‘<“>×)Ñ)¨%Ó0Ð0rR   c                ó@   — | j                  «       j                  |«      S rM   )rÓ   Ú__rand__rÕ   s     rQ   rã   zSelector.__rand__Õ  s   € Ø|‰|‹~×&Ñ& uÓ-Ð-rR   c                 ó   — y rM   rN   rÕ   s     rQ   Ú__or__zSelector.__or__Ø  s   € Ø36rR   c                 ó   — y rM   rN   rÕ   s     rQ   rå   zSelector.__or__Û  s   € Ø*-rR   c                ó,  — t        |«      r#t        |j                  j                  «       «      }t	        |«      r=t
        j                  t        j                  | j                  |j                  «      «      S | j                  «       j                  |«      S rM   )r   r0   r]   rŒ   r?   r'   rž   r   Úunionr—   rÓ   rå   rÕ   s     rQ   rå   zSelector.__or__Þ  sq   € ÜUÔÜ˜EŸJ™J×2Ñ2Ó4Ó5ˆEÜuÔÜ×,Ñ,Ü× Ñ  ×!1Ñ!1°5×3DÑ3DÓEóð ð —<‘<“>×(Ñ(¨Ó/Ð/rR   c                óœ   — t        |«      r#t        |j                  j                  «       «      }| j	                  «       j                  |«      S rM   )r   r0   r]   rŒ   rÓ   Ú__ror__rÕ   s     rQ   rê   zSelector.__ror__è  s8   € ÜUÔÜ˜EŸJ™J×2Ñ2Ó4Ó5ˆEØ|‰|‹~×%Ñ% eÓ,Ð,rR   c                 ó   — y rM   rN   rÕ   s     rQ   Ú__sub__zSelector.__sub__í  rÜ   rR   c                 ó   — y rM   rN   rÕ   s     rQ   rì   zSelector.__sub__ð  rÞ   rR   c                óÐ   — t        |«      r=t        j                  t        j                  | j
                  |j
                  «      «      S | j                  «       j                  |«      S rM   )r?   r'   rž   r   Ú
differencer—   rÓ   rì   rÕ   s     rQ   rì   zSelector.__sub__ó  sR   € ÜuÔÜ×,Ñ,Ü×%Ñ% d×&6Ñ&6¸×8IÑ8IÓJóð ð —<‘<“>×)Ñ)¨%Ó0Ð0rR   c                ó   — d}t        |«      ‚)Nz9unsupported operand type(s) for op: ('Expr' - 'Selector'))r_   rÙ   s      rQ   Ú__rsub__zSelector.__rsub__û  s   € ØIˆÜ˜‹nÐrR   c                 ó   — y rM   rN   rÕ   s     rQ   Ú__xor__zSelector.__xor__ÿ  rÜ   rR   c                 ó   — y rM   rN   rÕ   s     rQ   ró   zSelector.__xor__  rÞ   rR   c                ó,  — t        |«      r#t        |j                  j                  «       «      }t	        |«      r=t
        j                  t        j                  | j                  |j                  «      «      S | j                  «       j                  |«      S rM   )r   r0   r]   rŒ   r?   r'   rž   r   Úexclusive_orr—   rÓ   ró   rÕ   s     rQ   ró   zSelector.__xor__  sq   € ÜUÔÜ˜EŸJ™J×2Ñ2Ó4Ó5ˆEÜuÔÜ×,Ñ,Ü×'Ñ'¨×(8Ñ(8¸%×:KÑ:KÓLóð ð —<‘<“>×)Ñ)¨%Ó0Ð0rR   c                óœ   — t        |«      r#t        |j                  j                  «       «      }| j	                  «       j                  |«      S rM   )r   r0   r]   rŒ   rÓ   Ú__rxor__rÕ   s     rQ   rø   zSelector.__rxor__  s8   € ÜUÔÜ˜EŸJ™J×2Ñ2Ó4Ó5ˆEØ|‰|‹~×&Ñ& uÓ-Ð-rR   c                óh  — g }g }g t        |t        «      rt        |t        «      s|n|g¢|¢­D ]Q  }t        |t        «      r|j                  |«       Œ%t	        |«      r|j                  |«       ŒBd|›d}t        |«      ‚ |r|rd}t        |«      ‚|r| t        |«      z
  S | t        |d¬«      z
  S )aV  
        Exclude columns from a multi-column expression.

        Only works after a wildcard or regex column selection, and you cannot provide
        both string column names *and* dtypes (you may prefer to use selectors instead).

        Parameters
        ----------
        columns
            The name or datatype of the column(s) to exclude. Accepts regular expression
            input. Regular expressions should start with `^` and end with `$`.
        *more_columns
            Additional names or datatypes of columns to exclude, specified as positional
            arguments.
        zMinvalid input for `exclude`

Expected one or more `str` or `DataType`; found r[   zDcannot exclude by both column name and dtype; use a selector insteadF©r€   )rU   r   r‰   rh   r   r_   r.   r0   )r¢   ÚcolumnsÚmore_columnsÚexclude_colsÚexclude_dtypesrm   re   s          rQ   r:   zSelector.exclude  sÝ   € ð( ,.ˆØ8:ˆð
ô ˜g¤zÔ2¼:ÀgÌsÔ;Sñ àYð	
ð ñ
ò 	%ˆDô ˜$¤Ô$Ø×#Ñ# DÕ)Ü  Ô&Ø×%Ñ% dÕ+ðKØKOÈ(ÐR[ð]ð ô   “nÐ$ð#	%ñ& ™NØXˆCÜ˜C“.Ð ÙØœ( >Ó2Ñ2Ð2àœ' ,¸EÔBÑBÐBrR   c                ó@   — t        j                  | j                  «      S )u‹  
        Materialize the `selector` as a normal expression.

        This ensures that the operators `|`, `&`, `~` and `-`
        are applied on the data and not on the selector sets.

        Examples
        --------
        >>> import polars.selectors as cs
        >>> df = pl.DataFrame(
        ...     {
        ...         "colx": ["aa", "bb", "cc"],
        ...         "coly": [True, False, True],
        ...         "colz": [1, 2, 3],
        ...     }
        ... )

        Inverting the boolean selector will choose the non-boolean columns:

        >>> df.select(~cs.boolean())
        shape: (3, 2)
        â”Œâ”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”
        â”‚ colx â”† colz â”‚
        â”‚ ---  â”† ---  â”‚
        â”‚ str  â”† i64  â”‚
        â•žâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•¡
        â”‚ aa   â”† 1    â”‚
        â”‚ bb   â”† 2    â”‚
        â”‚ cc   â”† 3    â”‚
        â””â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”˜

        To invert the *values* in the selected boolean columns, we need to
        materialize the selector as a standard expression instead:

        >>> df.select(~cs.boolean().as_expr())
        shape: (3, 1)
        â”Œâ”€â”€â”€â”€â”€â”€â”€â”
        â”‚ coly  â”‚
        â”‚ ---   â”‚
        â”‚ bool  â”‚
        â•žâ•â•â•â•â•â•â•â•¡
        â”‚ false â”‚
        â”‚ true  â”‚
        â”‚ false â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”˜
        )r   rª   rš   r¡   s    rQ   rÓ   zSelector.as_exprE  s   € ô^ × Ñ  §¡Ó.Ð.rR   )rœ   r   Úreturnr'   )r   r¿   )r¨   r¿   r   ÚNone)r   r‰   )r   r¼   )r’   z.builtins.list[PythonDataType | PolarsDataType]r   r'   )r   zbuiltins.list[str]rW   r¾   r   r'   ©r   r'   )rÖ   r   r   r   )rÖ   r'   r   r'   )rÖ   r   r   úSelector | Expr)rÖ   r   r   r   )rû   zCstr | PolarsDataType | Collection[str] | Collection[PolarsDataType]rü   zstr | PolarsDataTyper   r'   )r   r   )rÆ   Ú
__module__Ú__qualname__Ú__doc__r—   Ú__annotations__Úclassmethodrž   r    r¦   r«   r®   rÍ   rÏ   rÑ   rÔ   rØ   r   rÛ   rã   rå   rê   rì   rñ   ró   rø   r:   rÓ   rN   rR   rQ   r'   r'   ;  sP  … Ù0ð #€KÓ"àòó ðó+ó?ó
4ó'ð
 ðT-ØCðT-à	òT-ó ðT-ðl òGó ðGóó1ó2ð Ú7ó Ø7àÚ.ó Ø.ó	1ó.ð Ú6ó Ø6àÚ-ó Ø-ó0ó-ð
 Ú7ó Ø7àÚ.ó Ø.ó1óð Ú7ó Ø7àÚ.ó Ø.ó1ó.ð
/CàTð/Cð ,ð/Cð 
ó	/Côb//rR   )Úescapec               ó  ‡— t        | t        «      r‰rt        | «      n| }nfg }| D ]E  }t        |t        «      r"t        |t        «      s|j	                  |«       Œ5|j                  |«       ŒG dj                  ˆfd„|D «       «      }d|› dS )zIReturn escaped regex, potentially representing multiple string fragments.r‚   c              3  ó<   •K  — | ]  }‰rt        |«      n|–— Œ y ­wrM   )r   )r†   Úxr	  s     €rQ   rˆ   z_re_string.<locals>.<genexpr>‚  s   øè ø€ ÒG¸!¡v”y ”|°1Ó4ÑGùs   ƒr„   r…   )rU   r‰   r   r   rg   rh   rŽ   )rG   r	  r‡   ÚstringsÚsts    `   rQ   Ú
_re_stringr  w  s~   ø€ ä&œ#ÔÙ"(ŒYvÔ¨f‰à&(ˆØò 	#ˆBÜ˜"œjÔ)´*¸RÄÔ2EØ—‘˜rÕ"à—‘˜rÕ"ð		#ð
 X‰XÓG¸wÔGÓGˆØˆrˆd!ˆ9ÐrR   c                 óP   — t         j                  t        j                  «       «      S )uR  
    Select no columns.

    This is useful for composition with other selectors.

    See Also
    --------
    all : Select all columns in the current scope.

    Examples
    --------
    >>> import polars.selectors as cs
    >>> pl.DataFrame({"a": 1, "b": 2}).select(cs.empty())
    shape: (0, 0)
    â”Œâ”
    â•žâ•¡
    â””â”˜
    )r'   rž   r   ÚemptyrN   rR   rQ   r  r  †  s   € ô& ×$Ñ$¤Z×%5Ñ%5Ó%7Ó8Ð8rR   c                 óP   — t         j                  t        j                  «       «      S )uz  
    Select all columns.

    See Also
    --------
    first : Select the first column in the current scope.
    last : Select the last column in the current scope.

    Examples
    --------
    >>> from datetime import date
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "dt": [date(1999, 12, 31), date(2024, 1, 1)],
    ...         "value": [1_234_500, 5_000_555],
    ...     },
    ...     schema_overrides={"value": pl.Int32},
    ... )

    Select all columns, casting them to string:

    >>> df.select(cs.all().cast(pl.String))
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ dt         â”† value   â”‚
    â”‚ ---        â”† ---     â”‚
    â”‚ str        â”† str     â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•¡
    â”‚ 1999-12-31 â”† 1234500 â”‚
    â”‚ 2024-01-01 â”† 5000555 â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Select all columns *except* for those matching the given dtypes:

    >>> df.select(cs.all() - cs.numeric())
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ dt         â”‚
    â”‚ ---        â”‚
    â”‚ date       â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ 1999-12-31 â”‚
    â”‚ 2024-01-01 â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
    )r'   rž   r   r(   rN   rR   rQ   r(   r(   œ  s   € ô^ ×$Ñ$¤Z§^¡^Ó%5Ó6Ð6rR   )Úignore_spacesc               óv   — | rdnd}|rdnd}t         j                  t        j                  d|› |› d«      «      S )uW  
    Select all columns with alphabetic names (eg: only letters).

    Parameters
    ----------
    ascii_only
        Indicate whether to consider only ASCII alphabetic characters, or the full
        Unicode range of valid letters (accented, idiographic, etc).
    ignore_spaces
        Indicate whether to ignore the presence of spaces in column names; if so,
        only the other (non-space) characters are considered.

    Notes
    -----
    Matching column names cannot contain *any* non-alphabetic characters. Note
    that the definition of "alphabetic" consists of all valid Unicode alphabetic
    characters (`\p{Alphabetic}`) by default; this can be changed by setting
    `ascii_only=True`.

    Examples
    --------
    >>> import polars as pl
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "no1": [100, 200, 300],
    ...         "cafÃ©": ["espresso", "latte", "mocha"],
    ...         "t or f": [True, False, None],
    ...         "hmm": ["aaa", "bbb", "ccc"],
    ...         "éƒ½å¸‚": ["æ±äº¬", "å¤§é˜ª", "äº¬éƒ½"],
    ...     }
    ... )

    Select columns with alphabetic names; note that accented
    characters and kanji are recognised as alphabetic here:

    >>> df.select(cs.alpha())
    shape: (3, 3)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”
    â”‚ cafÃ©     â”† hmm â”† éƒ½å¸‚ â”‚
    â”‚ ---      â”† --- â”† ---  â”‚
    â”‚ str      â”† str â”† str  â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•ªâ•â•â•â•â•â•â•¡
    â”‚ espresso â”† aaa â”† æ±äº¬ â”‚
    â”‚ latte    â”† bbb â”† å¤§é˜ª â”‚
    â”‚ mocha    â”† ccc â”† äº¬éƒ½ â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”˜

    Constrain the definition of "alphabetic" to ASCII characters only:

    >>> df.select(cs.alpha(ascii_only=True))
    shape: (3, 1)
    â”Œâ”€â”€â”€â”€â”€â”
    â”‚ hmm â”‚
    â”‚ --- â”‚
    â”‚ str â”‚
    â•žâ•â•â•â•â•â•¡
    â”‚ aaa â”‚
    â”‚ bbb â”‚
    â”‚ ccc â”‚
    â””â”€â”€â”€â”€â”€â”˜

    >>> df.select(cs.alpha(ascii_only=True, ignore_spaces=True))
    shape: (3, 2)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ t or f â”† hmm â”‚
    â”‚ ---    â”† --- â”‚
    â”‚ bool   â”† str â”‚
    â•žâ•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ true   â”† aaa â”‚
    â”‚ false  â”† bbb â”‚
    â”‚ null   â”† ccc â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜

    Select all columns *except* for those with alphabetic names:

    >>> df.select(~cs.alpha())
    shape: (3, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ no1 â”† t or f â”‚
    â”‚ --- â”† ---    â”‚
    â”‚ i64 â”† bool   â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•¡
    â”‚ 100 â”† true   â”‚
    â”‚ 200 â”† false  â”‚
    â”‚ 300 â”† null   â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    >>> df.select(~cs.alpha(ignore_spaces=True))
    shape: (3, 1)
    â”Œâ”€â”€â”€â”€â”€â”
    â”‚ no1 â”‚
    â”‚ --- â”‚
    â”‚ i64 â”‚
    â•žâ•â•â•â•â•â•¡
    â”‚ 100 â”‚
    â”‚ 200 â”‚
    â”‚ 300 â”‚
    â””â”€â”€â”€â”€â”€â”˜
    úa-zA-Zú\p{Alphabetic}ú r³   ú^[ú]+$©r'   rž   r   rB   )Ú
ascii_onlyr  Úre_alphaÚre_spaces       rQ   r)   r)   Î  sB   € ñL '‰yÐ,=€HÙ#‰s¨€HÜ×$Ñ$¤Z×%7Ñ%7¸"¸X¸JÀxÀjÐPSÐ8TÓ%UÓVÐVrR   c          	     ó†   — | rdnd}| rdnd}|rdnd}t         j                  t        j                  d|› |› |› d«      «      S )	uF  
    Select all columns with alphanumeric names (eg: only letters and the digits 0-9).

    Parameters
    ----------
    ascii_only
        Indicate whether to consider only ASCII alphabetic characters, or the full
        Unicode range of valid letters (accented, idiographic, etc).
    ignore_spaces
        Indicate whether to ignore the presence of spaces in column names; if so,
        only the other (non-space) characters are considered.

    Notes
    -----
    Matching column names cannot contain *any* non-alphabetic or integer characters.
    Note that the definition of "alphabetic" consists of all valid Unicode alphabetic
    characters (`\p{Alphabetic}`) and digit characters (`\d`) by default; this
    can be changed by setting `ascii_only=True`.

    Examples
    --------
    >>> import polars as pl
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "1st_col": [100, 200, 300],
    ...         "flagged": [True, False, True],
    ...         "00prefix": ["01:aa", "02:bb", "03:cc"],
    ...         "last col": ["x", "y", "z"],
    ...     }
    ... )

    Select columns with alphanumeric names:

    >>> df.select(cs.alphanumeric())
    shape: (3, 2)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ flagged â”† 00prefix â”‚
    â”‚ ---     â”† ---      â”‚
    â”‚ bool    â”† str      â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ true    â”† 01:aa    â”‚
    â”‚ false   â”† 02:bb    â”‚
    â”‚ true    â”† 03:cc    â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    >>> df.select(cs.alphanumeric(ignore_spaces=True))
    shape: (3, 3)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ flagged â”† 00prefix â”† last col â”‚
    â”‚ ---     â”† ---      â”† ---      â”‚
    â”‚ bool    â”† str      â”† str      â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ true    â”† 01:aa    â”† x        â”‚
    â”‚ false   â”† 02:bb    â”† y        â”‚
    â”‚ true    â”† 03:cc    â”† z        â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Select all columns *except* for those with alphanumeric names:

    >>> df.select(~cs.alphanumeric())
    shape: (3, 2)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ 1st_col â”† last col â”‚
    â”‚ ---     â”† ---      â”‚
    â”‚ i64     â”† str      â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ 100     â”† x        â”‚
    â”‚ 200     â”† y        â”‚
    â”‚ 300     â”† z        â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    >>> df.select(~cs.alphanumeric(ignore_spaces=True))
    shape: (3, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ 1st_col â”‚
    â”‚ ---     â”‚
    â”‚ i64     â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•¡
    â”‚ 100     â”‚
    â”‚ 200     â”‚
    â”‚ 300     â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
    r  r  z0-9ú\dr  r³   r  r  r  )r  r  r  Úre_digitr  s        rQ   r*   r*   9  sS   € ñt '‰yÐ,=€HÙ"‰u¨€HÙ#‰s¨€HÜ×$Ñ$Ü×Ñ˜R ˜z¨(¨°H°:¸SÐAÓBóð rR   c                 ó"   — t        t        g«      S )u¶  
    Select all binary columns.

    See Also
    --------
    by_dtype : Select all columns matching the given dtype(s).
    string : Select all string columns (optionally including categoricals).

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame({"a": [b"hello"], "b": ["world"], "c": [b"!"], "d": [":)"]})
    >>> df
    shape: (1, 4)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ a        â”† b     â”† c      â”† d   â”‚
    â”‚ ---      â”† ---   â”† ---    â”† --- â”‚
    â”‚ binary   â”† str   â”† binary â”† str â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ b"hello" â”† world â”† b"!"   â”† :)  â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜

    Select binary columns and export as a dict:

    >>> df.select(cs.binary()).to_dict(as_series=False)
    {'a': [b'hello'], 'c': [b'!']}

    Select all columns *except* for those that are binary:

    >>> df.select(~cs.binary()).to_dict(as_series=False)
    {'b': ['world'], 'd': [':)']}
    )r.   r   rN   rR   rQ   r,   r,   ›  s   € ôB ”VHÓÐrR   c                 ó"   — t        t        g«      S )u)  
    Select all boolean columns.

    See Also
    --------
    by_dtype : Select all columns matching the given dtype(s).

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame({"n": range(1, 5)}).with_columns(n_even=pl.col("n") % 2 == 0)
    >>> df
    shape: (4, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ n   â”† n_even â”‚
    â”‚ --- â”† ---    â”‚
    â”‚ i64 â”† bool   â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•¡
    â”‚ 1   â”† false  â”‚
    â”‚ 2   â”† true   â”‚
    â”‚ 3   â”† false  â”‚
    â”‚ 4   â”† true   â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Select and invert boolean columns:

    >>> df.with_columns(is_odd=cs.boolean().not_())
    shape: (4, 3)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ n   â”† n_even â”† is_odd â”‚
    â”‚ --- â”† ---    â”† ---    â”‚
    â”‚ i64 â”† bool   â”† bool   â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•¡
    â”‚ 1   â”† false  â”† true   â”‚
    â”‚ 2   â”† true   â”† false  â”‚
    â”‚ 3   â”† false  â”† true   â”‚
    â”‚ 4   â”† true   â”† false  â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Select all columns *except* for those that are boolean:

    >>> df.select(~cs.boolean())
    shape: (4, 1)
    â”Œâ”€â”€â”€â”€â”€â”
    â”‚ n   â”‚
    â”‚ --- â”‚
    â”‚ i64 â”‚
    â•žâ•â•â•â•â•â•¡
    â”‚ 1   â”‚
    â”‚ 2   â”‚
    â”‚ 3   â”‚
    â”‚ 4   â”‚
    â””â”€â”€â”€â”€â”€â”˜
    )r.   r   rN   rR   rQ   r-   r-   ¿  s   € ôn ”WIÓÐrR   c                 ó^  — g }| D ]’  }t        |«      st        |t        «      r|j                  |«       Œ0t        |t        «      rD|D ]>  }t        |«      s t        |t        «      sd|›}t        |«      ‚|j                  |«       Œ@ Œ„d|›}t        |«      ‚ t        j                  |«      S )u´  
    Select all columns matching the given dtypes.

    See Also
    --------
    by_name : Select all columns matching the given names.
    by_index : Select all columns matching the given indices.

    Examples
    --------
    >>> from datetime import date
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "dt": [date(1999, 12, 31), date(2024, 1, 1), date(2010, 7, 5)],
    ...         "value": [1_234_500, 5_000_555, -4_500_000],
    ...         "other": ["foo", "bar", "foo"],
    ...     }
    ... )

    Select all columns with date or string dtypes:

    >>> df.select(cs.by_dtype(pl.Date, pl.String))
    shape: (3, 2)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ dt         â”† other â”‚
    â”‚ ---        â”† ---   â”‚
    â”‚ date       â”† str   â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•¡
    â”‚ 1999-12-31 â”† foo   â”‚
    â”‚ 2024-01-01 â”† bar   â”‚
    â”‚ 2010-07-05 â”† foo   â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”˜

    Select all columns that are not of date or string dtype:

    >>> df.select(~cs.by_dtype(pl.Date, pl.String))
    shape: (3, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ value    â”‚
    â”‚ ---      â”‚
    â”‚ i64      â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ 1234500  â”‚
    â”‚ 5000555  â”‚
    â”‚ -4500000 â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Group by string columns and sum the numeric columns:

    >>> df.group_by(cs.string()).agg(cs.numeric().sum()).sort(by="other")
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ other â”† value    â”‚
    â”‚ ---   â”† ---      â”‚
    â”‚ str   â”† i64      â”‚
    â•žâ•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ bar   â”† 5000555  â”‚
    â”‚ foo   â”† -3265500 â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
    zinvalid dtype: )r   rU   r»   rh   r   r_   r'   rÍ   )r’   Ú
all_dtypesÚtpÚtre   s        rQ   r.   r.   ù  s³   € ðJ BD€JØò !ˆÜ˜2Ô¤*¨R´Ô"6Ø×Ñ˜bÕ!Ü˜œJÔ'Øò %Ü'¨Ô*¬j¸¼DÔ.AØ+¨A¨5Ð1CÜ# C›.Ð(Ø×!Ñ! !Õ$ñ	%ð $ B 6Ð*ˆCÜ˜C“.Ð ð!ô ×Ñ˜jÓ)Ð)rR   rú   c                ó  — g }|D ][  }t        |t        t        f«      r|j                  |«       Œ+t        |t        «      r|j                  |«       ŒMd|›}t        |«      ‚ t        j                  t        j                  || «      «      S )u”  
    Select all columns matching the given indices (or range objects).

    Parameters
    ----------
    *indices
        One or more column indices (or range objects).
        Negative indexing is supported.

    Notes
    -----
    Matching columns are returned in the order in which their indexes
    appear in the selector, not the underlying schema order.

    See Also
    --------
    by_dtype : Select all columns matching the given dtypes.
    by_name : Select all columns matching the given names.

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "key": ["abc"],
    ...         **{f"c{i:02}": [0.5 * i] for i in range(100)},
    ...     },
    ... )
    >>> print(df)
    shape: (1, 101)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”
    â”‚ key â”† c00 â”† c01 â”† c02 â”† â€¦ â”† c96  â”† c97  â”† c98  â”† c99  â”‚
    â”‚ --- â”† --- â”† --- â”† --- â”†   â”† ---  â”† ---  â”† ---  â”† ---  â”‚
    â”‚ str â”† f64 â”† f64 â”† f64 â”†   â”† f64  â”† f64  â”† f64  â”† f64  â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•ªâ•â•â•â•â•â•ªâ•â•â•â•â•â•ªâ•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•¡
    â”‚ abc â”† 0.0 â”† 0.5 â”† 1.0 â”† â€¦ â”† 48.0 â”† 48.5 â”† 49.0 â”† 49.5 â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”´â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”˜

    Select columns by index ("key" column and the two first/last columns):

    >>> df.select(cs.by_index(0, 1, 2, -2, -1))
    shape: (1, 5)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”
    â”‚ key â”† c00 â”† c01 â”† c98  â”† c99  â”‚
    â”‚ --- â”† --- â”† --- â”† ---  â”† ---  â”‚
    â”‚ str â”† f64 â”† f64 â”† f64  â”† f64  â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•ªâ•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•¡
    â”‚ abc â”† 0.0 â”† 0.5 â”† 49.0 â”† 49.5 â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”˜

    Select the "key" column and use a `range` object to select various columns.
    Note that you can freely mix and match integer indices and `range` objects:

    >>> df.select(cs.by_index(0, range(1, 101, 20)))
    shape: (1, 6)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”
    â”‚ key â”† c00 â”† c20  â”† c40  â”† c60  â”† c80  â”‚
    â”‚ --- â”† --- â”† ---  â”† ---  â”† ---  â”† ---  â”‚
    â”‚ str â”† f64 â”† f64  â”† f64  â”† f64  â”† f64  â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•¡
    â”‚ abc â”† 0.0 â”† 10.0 â”† 20.0 â”† 30.0 â”† 40.0 â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”˜

    >>> df.select(cs.by_index(0, range(101, 0, -25), require_all=False))
    shape: (1, 5)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ key â”† c75  â”† c50  â”† c25  â”† c00 â”‚
    â”‚ --- â”† ---  â”† ---  â”† ---  â”† --- â”‚
    â”‚ str â”† f64  â”† f64  â”† f64  â”† f64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ abc â”† 37.5 â”† 25.0 â”† 12.5 â”† 0.0 â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜

    Select all columns *except* for the even-indexed ones:

    >>> df.select(~cs.by_index(range(1, 100, 2)))
    shape: (1, 51)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”
    â”‚ key â”† c01 â”† c03 â”† c05 â”† â€¦ â”† c93  â”† c95  â”† c97  â”† c99  â”‚
    â”‚ --- â”† --- â”† --- â”† --- â”†   â”† ---  â”† ---  â”† ---  â”† ---  â”‚
    â”‚ str â”† f64 â”† f64 â”† f64 â”†   â”† f64  â”† f64  â”† f64  â”† f64  â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•ªâ•â•â•â•â•â•ªâ•â•â•â•â•â•ªâ•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•¡
    â”‚ abc â”† 0.5 â”† 1.5 â”† 2.5 â”† â€¦ â”† 46.5 â”† 47.5 â”† 48.5 â”† 49.5 â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”´â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”˜
    zinvalid index value: )rU   Úranger   rg   r¼   rh   r_   r'   rž   r   r/   )r€   ÚindicesÚall_indicesÚidxre   s        rQ   r/   r/   O  s„   € ðp ')€KØò !ˆÜcœE¤8Ð,Ô-Ø×Ñ˜sÕ#Ü˜œSÔ!Ø×Ñ˜sÕ#à)¨#¨Ð1ˆCÜ˜C“.Ð ð!ô ×$Ñ$¤Z×%8Ñ%8¸ÀkÓ%RÓSÐSrR   c                ó6  — g }|D ]|  }t        |t        «      r|j                  |«       Œ%t        |t        «      r9|D ]3  }t        |t        «      sd|›}t	        |«      ‚|j                  |«       Œ5 Œnd|›}t	        |«      ‚ t
        j                  || ¬«      S )uá  
    Select all columns matching the given names.

    .. versionadded:: 0.20.27
      The `require_all` parameter was added.

    Parameters
    ----------
    *names
        One or more names of columns to select.
    require_all
        Whether to match *all* names (the default) or *any* of the names.

    Notes
    -----
    Matching columns are returned in the order in which they are declared in
    the selector, not the underlying schema order.

    See Also
    --------
    by_dtype : Select all columns matching the given dtypes.
    by_index : Select all columns matching the given indices.

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "foo": ["x", "y"],
    ...         "bar": [123, 456],
    ...         "baz": [2.0, 5.5],
    ...         "zap": [False, True],
    ...     }
    ... )

    Select columns by name:

    >>> df.select(cs.by_name("foo", "bar"))
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ foo â”† bar â”‚
    â”‚ --- â”† --- â”‚
    â”‚ str â”† i64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ x   â”† 123 â”‚
    â”‚ y   â”† 456 â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜

    Match *any* of the given columns by name:

    >>> df.select(cs.by_name("baz", "moose", "foo", "bear", require_all=False))
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ baz â”† foo â”‚
    â”‚ --- â”† --- â”‚
    â”‚ f64 â”† str â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 2.0 â”† x   â”‚
    â”‚ 5.5 â”† y   â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜

    Match all columns *except* for those given:

    >>> df.select(~cs.by_name("foo", "bar"))
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ baz â”† zap   â”‚
    â”‚ --- â”† ---   â”‚
    â”‚ f64 â”† bool  â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•¡
    â”‚ 2.0 â”† false â”‚
    â”‚ 5.5 â”† true  â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”˜
    zinvalid name: rV   )rU   r‰   rh   r   r_   r'   rÏ   )r€   r   Ú	all_namesÚnmÚnre   s         rQ   r0   r0   ´  s¨   € ðV €IØò !ˆÜbœ#ÔØ×Ñ˜RÕ Ü˜œJÔ'Øò $Ü! !¤SÔ)Ø*¨1¨%Ð0CÜ# C›.Ð(Ø× Ñ  Õ#ñ	$ð # 2 &Ð)ˆCÜ˜C“.Ð ð!ô ×Ñ˜Y¨{ÐÓ;Ð;rR   c                 óP   — t         j                  t        j                  «       «      S )u%  
    Select all enum columns.

    .. warning::
        This functionality is considered **unstable**. It may be changed
        at any point without it being considered a breaking change.

    See Also
    --------
    by_dtype : Select all columns matching the given dtype(s).
    categorical : Select all categorical columns.
    string : Select all string columns (optionally including categoricals).

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "foo": ["xx", "yy"],
    ...         "bar": [123, 456],
    ...         "baz": [2.0, 5.5],
    ...     },
    ...     schema_overrides={"foo": pl.Enum(["xx", "yy"])},
    ... )

    Select all enum columns:

    >>> df.select(cs.enum())
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”
    â”‚ foo  â”‚
    â”‚ ---  â”‚
    â”‚ enum â”‚
    â•žâ•â•â•â•â•â•â•¡
    â”‚ xx   â”‚
    â”‚ yy   â”‚
    â””â”€â”€â”€â”€â”€â”€â”˜

    Select all columns *except* for those that are enum:

    >>> df.select(~cs.enum())
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ bar â”† baz â”‚
    â”‚ --- â”† --- â”‚
    â”‚ i64 â”† f64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 123 â”† 2.0 â”‚
    â”‚ 456 â”† 5.5 â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜
    )r'   rž   r   Úenum_rN   rR   rQ   r9   r9     s   € ôj ×$Ñ$¤Z×%5Ñ%5Ó%7Ó8Ð8rR   c                ór   — | | j                   nd}t        j                  t        j                  |«      «      S )u%  
    Select all list columns.

    .. warning::
        This functionality is considered **unstable**. It may be changed
        at any point without it being considered a breaking change.

    See Also
    --------
    by_dtype : Select all columns matching the given dtype(s).
    array : Select all array columns.
    nested : Select all nested columns.

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "foo": [["xx", "yy"], ["x"]],
    ...         "bar": [123, 456],
    ...         "baz": [2.0, 5.5],
    ...     },
    ... )

    Select all list columns:

    >>> df.select(cs.list())
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ foo          â”‚
    â”‚ ---          â”‚
    â”‚ list[str]    â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ ["xx", "yy"] â”‚
    â”‚ ["x"]        â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Select all columns *except* for those that are list:

    >>> df.select(~cs.list())
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ bar â”† baz â”‚
    â”‚ --- â”† --- â”‚
    â”‚ i64 â”† f64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 123 â”† 2.0 â”‚
    â”‚ 456 â”† 5.5 â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜

    Select all list columns with a certain matching inner type:

    >>> df.select(cs.list(cs.string()))
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ foo          â”‚
    â”‚ ---          â”‚
    â”‚ list[str]    â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ ["xx", "yy"] â”‚
    â”‚ ["x"]        â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
    >>> df.select(cs.list(cs.integer()))
    shape: (0, 0)
    â”Œâ”
    â•žâ•¡
    â””â”˜
    N)r—   r'   rž   r   rA   )ÚinnerÚinner_ss     rQ   rA   rA   H  s1   € ðL $)Ð#4ˆe×Ò¸$€GÜ×$Ñ$¤Z§_¡_°WÓ%=Ó>Ð>rR   )Úwidthc               ót   — | | j                   nd}t        j                  t        j                  ||«      «      S )uC	  
    Select all array columns.

    .. warning::
        This functionality is considered **unstable**. It may be changed
        at any point without it being considered a breaking change.

    See Also
    --------
    by_dtype : Select all columns matching the given dtype(s).
    list : Select all list columns.
    nested : Select all nested columns.

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "foo": [["xx", "yy"], ["x", "y"]],
    ...         "bar": [123, 456],
    ...         "baz": [2.0, 5.5],
    ...     },
    ...     schema_overrides={"foo": pl.Array(pl.String, 2)},
    ... )

    Select all array columns:

    >>> df.select(cs.array())
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ foo           â”‚
    â”‚ ---           â”‚
    â”‚ array[str, 2] â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ ["xx", "yy"]  â”‚
    â”‚ ["x", "y"]    â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Select all columns *except* for those that are array:

    >>> df.select(~cs.array())
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ bar â”† baz â”‚
    â”‚ --- â”† --- â”‚
    â”‚ i64 â”† f64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 123 â”† 2.0 â”‚
    â”‚ 456 â”† 5.5 â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜

    Select all array columns with a certain matching inner type:

    >>> df.select(cs.array(cs.string()))
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ foo           â”‚
    â”‚ ---           â”‚
    â”‚ array[str, 2] â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ ["xx", "yy"]  â”‚
    â”‚ ["x", "y"]    â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
    >>> df.select(cs.array(cs.integer()))
    shape: (0, 0)
    â”Œâ”
    â•žâ•¡
    â””â”˜
    >>> df.select(cs.array(width=2))
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ foo           â”‚
    â”‚ ---           â”‚
    â”‚ array[str, 2] â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ ["xx", "yy"]  â”‚
    â”‚ ["x", "y"]    â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
    >>> df.select(cs.array(width=3))
    shape: (0, 0)
    â”Œâ”
    â•žâ•¡
    â””â”˜
    N)r—   r'   rž   r   r+   )r3  r5  r4  s      rQ   r+   r+   ’  s5   € ðl $)Ð#4ˆe×Ò¸$€GÜ×$Ñ$¤Z×%5Ñ%5°g¸uÓ%EÓFÐFrR   c                 óP   — t         j                  t        j                  «       «      S )u[  
    Select all struct columns.

    .. warning::
        This functionality is considered **unstable**. It may be changed
        at any point without it being considered a breaking change.

    See Also
    --------
    by_dtype : Select all columns matching the given dtype(s).
    list : Select all list columns.
    array : Select all array columns.
    nested : Select all nested columns.

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "foo": [{"a": "xx", "b": "z"}, {"a": "x", "b": "y"}],
    ...         "bar": [123, 456],
    ...         "baz": [2.0, 5.5],
    ...     },
    ... )

    Select all struct columns:

    >>> df.select(cs.struct())
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ foo        â”‚
    â”‚ ---        â”‚
    â”‚ struct[2]  â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ {"xx","z"} â”‚
    â”‚ {"x","y"}  â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Select all columns *except* for those that are struct:

    >>> df.select(~cs.struct())
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ bar â”† baz â”‚
    â”‚ --- â”† --- â”‚
    â”‚ i64 â”† f64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 123 â”† 2.0 â”‚
    â”‚ 456 â”† 5.5 â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜
    )r'   rž   r   Ústruct_rN   rR   rQ   rH   rH   ì  s   € ôj ×$Ñ$¤Z×%7Ñ%7Ó%9Ó:Ð:rR   c                 óP   — t         j                  t        j                  «       «      S )ud  
    Select all nested columns.

    A nested column is a list, array or struct.

    .. warning::
        This functionality is considered **unstable**. It may be changed
        at any point without it being considered a breaking change.

    See Also
    --------
    by_dtype : Select all columns matching the given dtype(s).
    list : Select all list columns.
    array : Select all array columns.
    struct : Select all struct columns.

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "foo": [{"a": "xx", "b": "z"}, {"a": "x", "b": "y"}],
    ...         "bar": [123, 456],
    ...         "baz": [2.0, 5.5],
    ...         "wow": [[1, 2], [3]],
    ...     },
    ... )

    Select all nested columns:

    >>> df.select(cs.nested())
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ foo        â”† wow       â”‚
    â”‚ ---        â”† ---       â”‚
    â”‚ struct[2]  â”† list[i64] â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ {"xx","z"} â”† [1, 2]    â”‚
    â”‚ {"x","y"}  â”† [3]       â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Select all columns *except* for those that are nested:

    >>> df.select(~cs.nested())
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ bar â”† baz â”‚
    â”‚ --- â”† --- â”‚
    â”‚ i64 â”† f64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 123 â”† 2.0 â”‚
    â”‚ 456 â”† 5.5 â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜
    )r'   rž   r   rC   rN   rR   rQ   rC   rC   $  s   € ôp ×$Ñ$¤Z×%6Ñ%6Ó%8Ó9Ð9rR   c                 óP   — t         j                  t        j                  «       «      S )ub  
    Select all categorical columns.

    See Also
    --------
    by_dtype : Select all columns matching the given dtype(s).
    string : Select all string columns (optionally including categoricals).

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "foo": ["xx", "yy"],
    ...         "bar": [123, 456],
    ...         "baz": [2.0, 5.5],
    ...     },
    ...     schema_overrides={"foo": pl.Categorical},
    ... )

    Select all categorical columns:

    >>> df.select(cs.categorical())
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”
    â”‚ foo â”‚
    â”‚ --- â”‚
    â”‚ cat â”‚
    â•žâ•â•â•â•â•â•¡
    â”‚ xx  â”‚
    â”‚ yy  â”‚
    â””â”€â”€â”€â”€â”€â”˜

    Select all columns *except* for those that are categorical:

    >>> df.select(~cs.categorical())
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ bar â”† baz â”‚
    â”‚ --- â”† --- â”‚
    â”‚ i64 â”† f64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 123 â”† 2.0 â”‚
    â”‚ 456 â”† 5.5 â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜
    )r'   rž   r   r1   rN   rR   rQ   r1   r1   _  s   € ô^ ×$Ñ$¤Z×%;Ñ%;Ó%=Ó>Ð>rR   c                 ót   — t        | «      }d|› d}t        j                  t        j                  |«      «      S )u¸  
    Select columns whose names contain the given literal substring(s).

    Parameters
    ----------
    substring
        Substring(s) that matching column names should contain.

    See Also
    --------
    matches : Select all columns that match the given regex pattern.
    ends_with : Select columns that end with the given substring(s).
    starts_with : Select columns that start with the given substring(s).

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "foo": ["x", "y"],
    ...         "bar": [123, 456],
    ...         "baz": [2.0, 5.5],
    ...         "zap": [False, True],
    ...     }
    ... )

    Select columns that contain the substring 'ba':

    >>> df.select(cs.contains("ba"))
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ bar â”† baz â”‚
    â”‚ --- â”† --- â”‚
    â”‚ i64 â”† f64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 123 â”† 2.0 â”‚
    â”‚ 456 â”† 5.5 â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜

    Select columns that contain the substring 'ba' or the letter 'z':

    >>> df.select(cs.contains("ba", "z"))
    shape: (2, 3)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ bar â”† baz â”† zap   â”‚
    â”‚ --- â”† --- â”† ---   â”‚
    â”‚ i64 â”† f64 â”† bool  â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•¡
    â”‚ 123 â”† 2.0 â”† false â”‚
    â”‚ 456 â”† 5.5 â”† true  â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”˜

    Select all columns *except* for those that contain the substring 'ba':

    >>> df.select(~cs.contains("ba"))
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ foo â”† zap   â”‚
    â”‚ --- â”† ---   â”‚
    â”‚ str â”† bool  â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•¡
    â”‚ x   â”† false â”‚
    â”‚ y   â”† true  â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”˜
    ú^.*ú.*$©r  r'   rž   r   rB   )Ú	substringÚescaped_substringÚ
raw_paramss      rQ   r2   r2   ‘  s<   € ôD # 9Ó-ÐØÐ(Ð)¨Ð-€Jä×$Ñ$¤Z×%7Ñ%7¸
Ó%CÓDÐDrR   c                 ó"   — t        t        g«      S )u  
    Select all date columns.

    See Also
    --------
    datetime : Select all datetime columns, optionally filtering by time unit/zone.
    duration : Select all duration columns, optionally filtering by time unit.
    temporal : Select all temporal columns.
    time : Select all time columns.

    Examples
    --------
    >>> from datetime import date, datetime, time
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "dtm": [datetime(2001, 5, 7, 10, 25), datetime(2031, 12, 31, 0, 30)],
    ...         "dt": [date(1999, 12, 31), date(2024, 8, 9)],
    ...         "tm": [time(0, 0, 0), time(23, 59, 59)],
    ...     },
    ... )

    Select all date columns:

    >>> df.select(cs.date())
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ dt         â”‚
    â”‚ ---        â”‚
    â”‚ date       â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ 1999-12-31 â”‚
    â”‚ 2024-08-09 â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Select all columns *except* for those that are dates:

    >>> df.select(~cs.date())
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ dtm                 â”† tm       â”‚
    â”‚ ---                 â”† ---      â”‚
    â”‚ datetime[Î¼s]        â”† time     â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ 2001-05-07 10:25:00 â”† 00:00:00 â”‚
    â”‚ 2031-12-31 00:30:00 â”† 23:59:59 â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
    )r.   r   rN   rR   rQ   r3   r3   Ù  ó   € ôb ”TFÓÐrR   c                ó2  — | €g d¢}n(t        | t        «      r| gnt        j                  | «      }|€dg}n:|r8t        |t        t        j
                  f«      r|gnt        j                  |«      }t        j                  t        j                  |«      «      S )uO  
    Select all datetime columns, optionally filtering by time unit/zone.

    Parameters
    ----------
    time_unit
        One (or more) of the allowed timeunit precision strings, "ms", "us", and "ns".
        Omit to select columns with any valid timeunit.
    time_zone
        * One or more timezone strings, as defined in zoneinfo (to see valid options
          run `import zoneinfo; zoneinfo.available_timezones()` for a full list).
        * Set `None` to select Datetime columns that do not have a timezone.
        * Set "*" to select Datetime columns that have *any* timezone.

    See Also
    --------
    date : Select all date columns.
    duration : Select all duration columns, optionally filtering by time unit.
    temporal : Select all temporal columns.
    time : Select all time columns.

    Examples
    --------
    >>> from datetime import datetime, date, timezone
    >>> import polars.selectors as cs
    >>> from zoneinfo import ZoneInfo
    >>> tokyo_tz = ZoneInfo("Asia/Tokyo")
    >>> utc_tz = timezone.utc
    >>> df = pl.DataFrame(
    ...     {
    ...         "tstamp_tokyo": [
    ...             datetime(1999, 7, 21, 5, 20, 16, 987654, tzinfo=tokyo_tz),
    ...             datetime(2000, 5, 16, 6, 21, 21, 123465, tzinfo=tokyo_tz),
    ...         ],
    ...         "tstamp_utc": [
    ...             datetime(2023, 4, 10, 12, 14, 16, 999000, tzinfo=utc_tz),
    ...             datetime(2025, 8, 25, 14, 18, 22, 666000, tzinfo=utc_tz),
    ...         ],
    ...         "tstamp": [
    ...             datetime(2000, 11, 20, 18, 12, 16, 600000),
    ...             datetime(2020, 10, 30, 10, 20, 25, 123000),
    ...         ],
    ...         "dt": [date(1999, 12, 31), date(2010, 7, 5)],
    ...     },
    ...     schema_overrides={
    ...         "tstamp_tokyo": pl.Datetime("ns", "Asia/Tokyo"),
    ...         "tstamp_utc": pl.Datetime("us", "UTC"),
    ...     },
    ... )

    Select all datetime columns:

    >>> df.select(cs.datetime())
    shape: (2, 3)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ tstamp_tokyo                   â”† tstamp_utc                  â”† tstamp                  â”‚
    â”‚ ---                            â”† ---                         â”† ---                     â”‚
    â”‚ datetime[ns, Asia/Tokyo]       â”† datetime[Î¼s, UTC]           â”† datetime[Î¼s]            â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ 1999-07-21 05:20:16.987654 JST â”† 2023-04-10 12:14:16.999 UTC â”† 2000-11-20 18:12:16.600 â”‚
    â”‚ 2000-05-16 06:21:21.123465 JST â”† 2025-08-25 14:18:22.666 UTC â”† 2020-10-30 10:20:25.123 â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Select all datetime columns that have 'us' precision:

    >>> df.select(cs.datetime("us"))
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ tstamp_utc                  â”† tstamp                  â”‚
    â”‚ ---                         â”† ---                     â”‚
    â”‚ datetime[Î¼s, UTC]           â”† datetime[Î¼s]            â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ 2023-04-10 12:14:16.999 UTC â”† 2000-11-20 18:12:16.600 â”‚
    â”‚ 2025-08-25 14:18:22.666 UTC â”† 2020-10-30 10:20:25.123 â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Select all datetime columns that have *any* timezone:

    >>> df.select(cs.datetime(time_zone="*"))
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ tstamp_tokyo                   â”† tstamp_utc                  â”‚
    â”‚ ---                            â”† ---                         â”‚
    â”‚ datetime[ns, Asia/Tokyo]       â”† datetime[Î¼s, UTC]           â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ 1999-07-21 05:20:16.987654 JST â”† 2023-04-10 12:14:16.999 UTC â”‚
    â”‚ 2000-05-16 06:21:21.123465 JST â”† 2025-08-25 14:18:22.666 UTC â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Select all datetime columns that have a *specific* timezone:

    >>> df.select(cs.datetime(time_zone="UTC"))
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ tstamp_utc                  â”‚
    â”‚ ---                         â”‚
    â”‚ datetime[Î¼s, UTC]           â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ 2023-04-10 12:14:16.999 UTC â”‚
    â”‚ 2025-08-25 14:18:22.666 UTC â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Select all datetime columns that have NO timezone:

    >>> df.select(cs.datetime(time_zone=None))
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ tstamp                  â”‚
    â”‚ ---                     â”‚
    â”‚ datetime[Î¼s]            â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ 2000-11-20 18:12:16.600 â”‚
    â”‚ 2020-10-30 10:20:25.123 â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Select all columns *except* for datetime columns:

    >>> df.select(~cs.datetime())
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ dt         â”‚
    â”‚ ---        â”‚
    â”‚ date       â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ 1999-12-31 â”‚
    â”‚ 2010-07-05 â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
    N©ÚmsÚusÚns)
rU   r‰   r½   rA   rÂ   Útimezoner'   rž   r   r4   )r±   r²   Útime_unit_lstÚtime_zone_lsts       rQ   r4   r4     s‘   € ðR ÐÚ*‰ô & i´Ô5ˆY‰K¼8¿=¹=ÈÓ;Sð 	ð
 ÐØ˜‰Ù	ô ˜)¤c¬:×+>Ñ+>Ð%?Ô@ð ‰Kä—‘˜yÓ)ð 	ô ×$Ñ$¤Z×%8Ñ%8¸ÈÓ%VÓWÐWrR   c                 óP   — t         j                  t        j                  «       «      S )u  
    Select all decimal columns.

    See Also
    --------
    float : Select all float columns.
    integer : Select all integer columns.
    numeric : Select all numeric columns.

    Examples
    --------
    >>> from decimal import Decimal as D
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "foo": ["x", "y"],
    ...         "bar": [D(123), D(456)],
    ...         "baz": [D("2.0005"), D("-50.5555")],
    ...     },
    ...     schema_overrides={"baz": pl.Decimal(scale=5, precision=10)},
    ... )

    Select all decimal columns:

    >>> df.select(cs.decimal())
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ bar           â”† baz           â”‚
    â”‚ ---           â”† ---           â”‚
    â”‚ decimal[38,0] â”† decimal[10,5] â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ 123           â”† 2.00050       â”‚
    â”‚ 456           â”† -50.55550     â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Select all columns *except* the decimal ones:

    >>> df.select(~cs.decimal())
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”
    â”‚ foo â”‚
    â”‚ --- â”‚
    â”‚ str â”‚
    â•žâ•â•â•â•â•â•¡
    â”‚ x   â”‚
    â”‚ y   â”‚
    â””â”€â”€â”€â”€â”€â”˜
    )r'   rž   r   r5   rN   rR   rQ   r5   r5   ª  ó   € ôd ×$Ñ$¤Z×%7Ñ%7Ó%9Ó:Ð:rR   c                óf   — | rdnd}t         j                  t        j                  d|› d«      «      S )u‚
  
    Select all columns having names consisting only of digits.

    Notes
    -----
    Matching column names cannot contain *any* non-digit characters. Note that the
    definition of "digit" consists of all valid Unicode digit characters (`\d`)
    by default; this can be changed by setting `ascii_only=True`.

    Examples
    --------
    >>> import polars as pl
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "key": ["aaa", "bbb", "aaa", "bbb", "bbb"],
    ...         "year": [2001, 2001, 2025, 2025, 2001],
    ...         "value": [-25, 100, 75, -15, -5],
    ...     }
    ... ).pivot(
    ...     values="value",
    ...     index="key",
    ...     on="year",
    ...     aggregate_function="sum",
    ... )
    >>> print(df)
    shape: (2, 3)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”
    â”‚ key â”† 2001 â”† 2025 â”‚
    â”‚ --- â”† ---  â”† ---  â”‚
    â”‚ str â”† i64  â”† i64  â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•¡
    â”‚ aaa â”† -25  â”† 75   â”‚
    â”‚ bbb â”† 95   â”† -15  â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”˜

    Select columns with digit names:

    >>> df.select(cs.digit())
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”
    â”‚ 2001 â”† 2025 â”‚
    â”‚ ---  â”† ---  â”‚
    â”‚ i64  â”† i64  â”‚
    â•žâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•¡
    â”‚ -25  â”† 75   â”‚
    â”‚ 95   â”† -15  â”‚
    â””â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”˜

    Select all columns *except* for those with digit names:

    >>> df.select(~cs.digit())
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”
    â”‚ key â”‚
    â”‚ --- â”‚
    â”‚ str â”‚
    â•žâ•â•â•â•â•â•¡
    â”‚ aaa â”‚
    â”‚ bbb â”‚
    â””â”€â”€â”€â”€â”€â”˜

    Demonstrate use of `ascii_only` flag (by default all valid unicode digits
    are considered, but this can be constrained to ascii 0-9):

    >>> df = pl.DataFrame({"à¥§à¥¯à¥¯à¥¯": [1999], "à¥¨à¥¦à¥­à¥­": [2077], "3000": [3000]})
    >>> df.select(cs.digit())
    shape: (1, 3)
    â”Œâ”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”
    â”‚ à¥§à¥¯à¥¯à¥¯ â”† à¥¨à¥¦à¥­à¥­ â”† 3000 â”‚
    â”‚ ---  â”† ---  â”† ---  â”‚
    â”‚ i64  â”† i64  â”† i64  â”‚
    â•žâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•¡
    â”‚ 1999 â”† 2077 â”† 3000 â”‚
    â””â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”˜

    >>> df.select(cs.digit(ascii_only=True))
    shape: (1, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”
    â”‚ 3000 â”‚
    â”‚ ---  â”‚
    â”‚ i64  â”‚
    â•žâ•â•â•â•â•â•â•¡
    â”‚ 3000 â”‚
    â””â”€â”€â”€â”€â”€â”€â”˜
    z[0-9]r  r~   z+$r  )r  r   s     rQ   r6   r6   ß  s3   € ñn &‰x¨5€HÜ×$Ñ$¤Z×%7Ñ%7¸1¸X¸JÀbÐ8IÓ%JÓKÐKrR   c                ó°   — | €g d¢} n(t        | t        «      r| gnt        j                  | «      } t        j                  t        j                  | «      «      S )ud  
    Select all duration columns, optionally filtering by time unit.

    Parameters
    ----------
    time_unit
        One (or more) of the allowed timeunit precision strings, "ms", "us", and "ns".
        Omit to select columns with any valid timeunit.

    See Also
    --------
    date : Select all date columns.
    datetime : Select all datetime columns, optionally filtering by time unit/zone.
    temporal : Select all temporal columns.
    time : Select all time columns.

    Examples
    --------
    >>> from datetime import date, timedelta
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "dt": [date(2022, 1, 31), date(2025, 7, 5)],
    ...         "td1": [
    ...             timedelta(days=1, milliseconds=123456),
    ...             timedelta(days=1, hours=23, microseconds=987000),
    ...         ],
    ...         "td2": [
    ...             timedelta(days=7, microseconds=456789),
    ...             timedelta(days=14, minutes=999, seconds=59),
    ...         ],
    ...         "td3": [
    ...             timedelta(weeks=4, days=-10, microseconds=999999),
    ...             timedelta(weeks=3, milliseconds=123456, microseconds=1),
    ...         ],
    ...     },
    ...     schema_overrides={
    ...         "td1": pl.Duration("ms"),
    ...         "td2": pl.Duration("us"),
    ...         "td3": pl.Duration("ns"),
    ...     },
    ... )

    Select all duration columns:

    >>> df.select(cs.duration())
    shape: (2, 3)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ td1            â”† td2             â”† td3                â”‚
    â”‚ ---            â”† ---             â”† ---                â”‚
    â”‚ duration[ms]   â”† duration[Î¼s]    â”† duration[ns]       â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ 1d 2m 3s 456ms â”† 7d 456789Âµs     â”† 18d 999999Âµs       â”‚
    â”‚ 1d 23h 987ms   â”† 14d 16h 39m 59s â”† 21d 2m 3s 456001Âµs â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Select all duration columns that have 'ms' precision:

    >>> df.select(cs.duration("ms"))
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ td1            â”‚
    â”‚ ---            â”‚
    â”‚ duration[ms]   â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ 1d 2m 3s 456ms â”‚
    â”‚ 1d 23h 987ms   â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Select all duration columns that have 'ms' OR 'ns' precision:

    >>> df.select(cs.duration(["ms", "ns"]))
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ td1            â”† td3                â”‚
    â”‚ ---            â”† ---                â”‚
    â”‚ duration[ms]   â”† duration[ns]       â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ 1d 2m 3s 456ms â”† 18d 999999Âµs       â”‚
    â”‚ 1d 23h 987ms   â”† 21d 2m 3s 456001Âµs â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Select all columns *except* for duration columns:

    >>> df.select(~cs.duration())
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ dt         â”‚
    â”‚ ---        â”‚
    â”‚ date       â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ 2022-01-31 â”‚
    â”‚ 2025-07-05 â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
    rE  )rU   r‰   r½   rA   r'   rž   r   r7   )r±   s    rQ   r7   r7   :  sN   € ðD ÐÚ&‰	ô & i´Ô5ˆY‰K¼8¿=¹=ÈÓ;Sð 	ô ×$Ñ$¤Z×%8Ñ%8¸Ó%CÓDÐDrR   c                 ót   — t        | «      }d|› d}t        j                  t        j                  |«      «      S )u/  
    Select columns that end with the given substring(s).

    See Also
    --------
    contains : Select columns that contain the given literal substring(s).
    matches : Select all columns that match the given regex pattern.
    starts_with : Select columns that start with the given substring(s).

    Parameters
    ----------
    suffix
        Substring(s) that matching column names should end with.

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "foo": ["x", "y"],
    ...         "bar": [123, 456],
    ...         "baz": [2.0, 5.5],
    ...         "zap": [False, True],
    ...     }
    ... )

    Select columns that end with the substring 'z':

    >>> df.select(cs.ends_with("z"))
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”
    â”‚ baz â”‚
    â”‚ --- â”‚
    â”‚ f64 â”‚
    â•žâ•â•â•â•â•â•¡
    â”‚ 2.0 â”‚
    â”‚ 5.5 â”‚
    â””â”€â”€â”€â”€â”€â”˜

    Select columns that end with *either* the letter 'z' or 'r':

    >>> df.select(cs.ends_with("z", "r"))
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ bar â”† baz â”‚
    â”‚ --- â”† --- â”‚
    â”‚ i64 â”† f64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 123 â”† 2.0 â”‚
    â”‚ 456 â”† 5.5 â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜

    Select all columns *except* for those that end with the substring 'z':

    >>> df.select(~cs.ends_with("z"))
    shape: (2, 3)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ foo â”† bar â”† zap   â”‚
    â”‚ --- â”† --- â”† ---   â”‚
    â”‚ str â”† i64 â”† bool  â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•¡
    â”‚ x   â”† 123 â”† false â”‚
    â”‚ y   â”† 456 â”† true  â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”˜
    r<  r   r>  )ÚsuffixÚescaped_suffixrA  s      rQ   r8   r8   ¦  s:   € ôD   Ó'€NØ~Ð& aÐ(€Jä×$Ñ$¤Z×%7Ñ%7¸
Ó%CÓDÐDrR   c                ó   — t        | g|¢­Ž  S )uŸ  
    Select all columns except those matching the given columns, datatypes, or selectors.

    Parameters
    ----------
    columns
        One or more columns (col or name), datatypes, columns, or selectors representing
        the columns to exclude.
    *more_columns
        Additional columns, datatypes, or selectors to exclude, specified as positional
        arguments.

    Notes
    -----
    If excluding a single selector it is simpler to write as `~selector` instead.

    Examples
    --------
    Exclude by column name(s):

    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "aa": [1, 2, 3],
    ...         "ba": ["a", "b", None],
    ...         "cc": [None, 2.5, 1.5],
    ...     }
    ... )
    >>> df.select(cs.exclude("ba", "xx"))
    shape: (3, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”
    â”‚ aa  â”† cc   â”‚
    â”‚ --- â”† ---  â”‚
    â”‚ i64 â”† f64  â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•â•¡
    â”‚ 1   â”† null â”‚
    â”‚ 2   â”† 2.5  â”‚
    â”‚ 3   â”† 1.5  â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”˜

    Exclude using a column name, a selector, and a dtype:

    >>> df.select(cs.exclude("aa", cs.string(), pl.UInt32))
    shape: (3, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”
    â”‚ cc   â”‚
    â”‚ ---  â”‚
    â”‚ f64  â”‚
    â•žâ•â•â•â•â•â•â•¡
    â”‚ null â”‚
    â”‚ 2.5  â”‚
    â”‚ 1.5  â”‚
    â””â”€â”€â”€â”€â”€â”€â”˜
    )r•   )rû   rü   s     rQ   r:   r:   î  s   € ô@ ! Ð8¨<Ò8Ð8Ð8rR   c                óR   — t         j                  t        j                  | «      «      S )ub  
    Select the first column in the current scope.

    See Also
    --------
    all : Select all columns.
    last : Select the last column in the current scope.

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "foo": ["x", "y"],
    ...         "bar": [123, 456],
    ...         "baz": [2.0, 5.5],
    ...         "zap": [0, 1],
    ...     }
    ... )

    Select the first column:

    >>> df.select(cs.first())
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”
    â”‚ foo â”‚
    â”‚ --- â”‚
    â”‚ str â”‚
    â•žâ•â•â•â•â•â•¡
    â”‚ x   â”‚
    â”‚ y   â”‚
    â””â”€â”€â”€â”€â”€â”˜

    Select everything  *except* for the first column:

    >>> df.select(~cs.first())
    shape: (2, 3)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ bar â”† baz â”† zap â”‚
    â”‚ --- â”† --- â”† --- â”‚
    â”‚ i64 â”† f64 â”† i64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 123 â”† 2.0 â”† 0   â”‚
    â”‚ 456 â”† 5.5 â”† 1   â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜
    )r'   rž   r   r<   rV   s    rQ   r<   r<   1	  s!   € ô^ ×$Ñ$¤Z×%5Ñ%5°fÓ%=Ó>Ð>rR   c                 óP   — t         j                  t        j                  «       «      S )u  
    Select all float columns.

    See Also
    --------
    integer : Select all integer columns.
    numeric : Select all numeric columns.
    signed_integer : Select all signed integer columns.
    unsigned_integer : Select all unsigned integer columns.

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "foo": ["x", "y"],
    ...         "bar": [123, 456],
    ...         "baz": [2.0, 5.5],
    ...         "zap": [0.0, 1.0],
    ...     },
    ...     schema_overrides={"baz": pl.Float32, "zap": pl.Float64},
    ... )

    Select all float columns:

    >>> df.select(cs.float())
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ baz â”† zap â”‚
    â”‚ --- â”† --- â”‚
    â”‚ f32 â”† f64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 2.0 â”† 0.0 â”‚
    â”‚ 5.5 â”† 1.0 â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜

    Select all columns *except* for those that are float:

    >>> df.select(~cs.float())
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ foo â”† bar â”‚
    â”‚ --- â”† --- â”‚
    â”‚ str â”† i64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ x   â”† 123 â”‚
    â”‚ y   â”† 456 â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜
    )r'   rž   r   r=   rN   rR   rQ   r=   r=   c	  s   € ôd ×$Ñ$¤Z×%5Ñ%5Ó%7Ó8Ð8rR   c                 óP   — t         j                  t        j                  «       «      S )uô  
    Select all integer columns.

    See Also
    --------
    by_dtype : Select columns by dtype.
    float : Select all float columns.
    numeric : Select all numeric columns.
    signed_integer : Select all signed integer columns.
    unsigned_integer : Select all unsigned integer columns.

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "foo": ["x", "y"],
    ...         "bar": [123, 456],
    ...         "baz": [2.0, 5.5],
    ...         "zap": [0, 1],
    ...     }
    ... )

    Select all integer columns:

    >>> df.select(cs.integer())
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ bar â”† zap â”‚
    â”‚ --- â”† --- â”‚
    â”‚ i64 â”† i64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 123 â”† 0   â”‚
    â”‚ 456 â”† 1   â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜

    Select all columns *except* for those that are integer :

    >>> df.select(~cs.integer())
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ foo â”† baz â”‚
    â”‚ --- â”† --- â”‚
    â”‚ str â”† f64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ x   â”† 2.0 â”‚
    â”‚ y   â”† 5.5 â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜
    )r'   rž   r   r>   rN   rR   rQ   r>   r>   ˜	  rM  rR   c                 óP   — t         j                  t        j                  «       «      S )u1  
    Select all signed integer columns.

    See Also
    --------
    by_dtype : Select columns by dtype.
    float : Select all float columns.
    integer : Select all integer columns.
    numeric : Select all numeric columns.
    unsigned_integer : Select all unsigned integer columns.

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "foo": [-123, -456],
    ...         "bar": [3456, 6789],
    ...         "baz": [7654, 4321],
    ...         "zap": ["ab", "cd"],
    ...     },
    ...     schema_overrides={"bar": pl.UInt32, "baz": pl.UInt64},
    ... )

    Select all signed integer columns:

    >>> df.select(cs.signed_integer())
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”
    â”‚ foo  â”‚
    â”‚ ---  â”‚
    â”‚ i64  â”‚
    â•žâ•â•â•â•â•â•â•¡
    â”‚ -123 â”‚
    â”‚ -456 â”‚
    â””â”€â”€â”€â”€â”€â”€â”˜

    >>> df.select(~cs.signed_integer())
    shape: (2, 3)
    â”Œâ”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ bar  â”† baz  â”† zap â”‚
    â”‚ ---  â”† ---  â”† --- â”‚
    â”‚ u32  â”† u64  â”† str â”‚
    â•žâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 3456 â”† 7654 â”† ab  â”‚
    â”‚ 6789 â”† 4321 â”† cd  â”‚
    â””â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜

    Select all integer columns (both signed and unsigned):

    >>> df.select(cs.integer())
    shape: (2, 3)
    â”Œâ”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”
    â”‚ foo  â”† bar  â”† baz  â”‚
    â”‚ ---  â”† ---  â”† ---  â”‚
    â”‚ i64  â”† u32  â”† u64  â”‚
    â•žâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•¡
    â”‚ -123 â”† 3456 â”† 7654 â”‚
    â”‚ -456 â”† 6789 â”† 4321 â”‚
    â””â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”˜
    )r'   rž   r   rE   rN   rR   rQ   rE   rE   Í	  s   € ô| ×$Ñ$¤Z×%>Ñ%>Ó%@ÓAÐArR   c                 óP   — t         j                  t        j                  «       «      S )u|  
    Select all unsigned integer columns.

    See Also
    --------
    by_dtype : Select columns by dtype.
    float : Select all float columns.
    integer : Select all integer columns.
    numeric : Select all numeric columns.
    signed_integer : Select all signed integer columns.

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "foo": [-123, -456],
    ...         "bar": [3456, 6789],
    ...         "baz": [7654, 4321],
    ...         "zap": ["ab", "cd"],
    ...     },
    ...     schema_overrides={"bar": pl.UInt32, "baz": pl.UInt64},
    ... )

    Select all unsigned integer columns:

    >>> df.select(cs.unsigned_integer())
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”
    â”‚ bar  â”† baz  â”‚
    â”‚ ---  â”† ---  â”‚
    â”‚ u32  â”† u64  â”‚
    â•žâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•¡
    â”‚ 3456 â”† 7654 â”‚
    â”‚ 6789 â”† 4321 â”‚
    â””â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”˜

    Select all columns *except* for those that are unsigned integers:

    >>> df.select(~cs.unsigned_integer())
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ foo  â”† zap â”‚
    â”‚ ---  â”† --- â”‚
    â”‚ i64  â”† str â”‚
    â•žâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ -123 â”† ab  â”‚
    â”‚ -456 â”† cd  â”‚
    â””â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜

    Select all integer columns (both signed and unsigned):

    >>> df.select(cs.integer())
    shape: (2, 3)
    â”Œâ”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”
    â”‚ foo  â”† bar  â”† baz  â”‚
    â”‚ ---  â”† ---  â”† ---  â”‚
    â”‚ i64  â”† u32  â”† u64  â”‚
    â•žâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•¡
    â”‚ -123 â”† 3456 â”† 7654 â”‚
    â”‚ -456 â”† 6789 â”† 4321 â”‚
    â””â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”˜
    )r'   rž   r   rK   rN   rR   rQ   rK   rK   
  s   € ô@ ×$Ñ$¤Z×%@Ñ%@Ó%BÓCÐCrR   c                óR   — t         j                  t        j                  | «      «      S )u_  
    Select the last column in the current scope.

    See Also
    --------
    all : Select all columns.
    first : Select the first column in the current scope.

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "foo": ["x", "y"],
    ...         "bar": [123, 456],
    ...         "baz": [2.0, 5.5],
    ...         "zap": [0, 1],
    ...     }
    ... )

    Select the last column:

    >>> df.select(cs.last())
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”
    â”‚ zap â”‚
    â”‚ --- â”‚
    â”‚ i64 â”‚
    â•žâ•â•â•â•â•â•¡
    â”‚ 0   â”‚
    â”‚ 1   â”‚
    â””â”€â”€â”€â”€â”€â”˜

    Select everything  *except* for the last column:

    >>> df.select(~cs.last())
    shape: (2, 3)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ foo â”† bar â”† baz â”‚
    â”‚ --- â”† --- â”† --- â”‚
    â”‚ str â”† i64 â”† f64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ x   â”† 123 â”† 2.0 â”‚
    â”‚ y   â”† 456 â”† 5.5 â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜
    )r'   rž   r   r@   rV   s    rQ   r@   r@   Q
  s   € ô^ ×$Ñ$¤Z§_¡_°VÓ%<Ó=Ð=rR   c                ó.  — | dk(  r
t        «       S | j                  d«      r| dd } n| j                  d«      r| dd } | j                  d«      sdnd}| j                  d«      sd	nd}|› | › |› }t        j	                  t        j                  |«      «      S )
u÷  
    Select all columns that match the given regex pattern.

    See Also
    --------
    contains : Select all columns that contain the given substring.
    ends_with : Select all columns that end with the given substring(s).
    starts_with : Select all columns that start with the given substring(s).

    Parameters
    ----------
    pattern
        A valid regular expression pattern, compatible with the `regex crate
        <https://docs.rs/regex/latest/regex/>`_.

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "foo": ["x", "y"],
    ...         "bar": [123, 456],
    ...         "baz": [2.0, 5.5],
    ...         "zap": [0, 1],
    ...     }
    ... )

    Match column names containing an 'a', preceded by a character that is not 'z':

    >>> df.select(cs.matches("[^z]a"))
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ bar â”† baz â”‚
    â”‚ --- â”† --- â”‚
    â”‚ i64 â”† f64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 123 â”† 2.0 â”‚
    â”‚ 456 â”† 5.5 â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜

    Do not match column names ending in 'R' or 'z' (case-insensitively):

    >>> df.select(~cs.matches(r"(?i)R|z$"))
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ foo â”† zap â”‚
    â”‚ --- â”† --- â”‚
    â”‚ str â”† i64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ x   â”† 0   â”‚
    â”‚ y   â”† 1   â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜
    z.*é   Néþÿÿÿr~   r<  r³   r   r=  )r(   rŠ   r‹   r'   rž   r   rB   )ÚpatternÚpfxÚsfxrA  s       rQ   rB   rB   ƒ
  s›   € ðl $‚Ü‹uˆà×Ñ˜dÔ#Ø˜a˜bk‰GØ×Ñ˜dÔ#Ø˜c˜rlˆGà"×-Ñ-¨cÔ2‰e¸ˆØ"×+Ñ+¨CÔ0‰e°bˆØu˜W˜I c UÐ+ˆ
ä×(Ñ(¬×);Ñ);¸JÓ)GÓHÐHrR   c                 óP   — t         j                  t        j                  «       «      S )uF  
    Select all numeric columns.

    See Also
    --------
    by_dtype : Select columns by dtype.
    float : Select all float columns.
    integer : Select all integer columns.
    signed_integer : Select all signed integer columns.
    unsigned_integer : Select all unsigned integer columns.

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "foo": ["x", "y"],
    ...         "bar": [123, 456],
    ...         "baz": [2.0, 5.5],
    ...         "zap": [0, 0],
    ...     },
    ...     schema_overrides={"bar": pl.Int16, "baz": pl.Float32, "zap": pl.UInt8},
    ... )

    Match all numeric columns:

    >>> df.select(cs.numeric())
    shape: (2, 3)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ bar â”† baz â”† zap â”‚
    â”‚ --- â”† --- â”† --- â”‚
    â”‚ i16 â”† f32 â”† u8  â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 123 â”† 2.0 â”† 0   â”‚
    â”‚ 456 â”† 5.5 â”† 0   â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜

    Match all columns *except* for those that are numeric:

    >>> df.select(~cs.numeric())
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”
    â”‚ foo â”‚
    â”‚ --- â”‚
    â”‚ str â”‚
    â•žâ•â•â•â•â•â•¡
    â”‚ x   â”‚
    â”‚ y   â”‚
    â””â”€â”€â”€â”€â”€â”˜
    )r'   rž   r   rD   rN   rR   rQ   rD   rD   È
  s   € ôf ×$Ñ$¤Z×%7Ñ%7Ó%9Ó:Ð:rR   c                 óP   — t         j                  t        j                  «       «      S )u£	  
    Select all object columns.

    See Also
    --------
    by_dtype : Select columns by dtype.

    Examples
    --------
    >>> import polars.selectors as cs
    >>> from uuid import uuid4
    >>> with pl.Config(fmt_str_lengths=36):
    ...     df = pl.DataFrame(
    ...         {
    ...             "idx": [0, 1],
    ...             "uuid_obj": [uuid4(), uuid4()],
    ...             "uuid_str": [str(uuid4()), str(uuid4())],
    ...         },
    ...         schema_overrides={"idx": pl.Int32},
    ...     )
    ...     print(df)  # doctest: +IGNORE_RESULT
    shape: (2, 3)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ idx â”† uuid_obj                             â”† uuid_str                             â”‚
    â”‚ --- â”† ---                                  â”† ---                                  â”‚
    â”‚ i32 â”† object                               â”† str                                  â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ 0   â”† 6be063cf-c9c6-43be-878e-e446cfd42981 â”† acab9fea-c05d-4b91-b639-418004a63f33 â”‚
    â”‚ 1   â”† 7849d8f9-2cac-48e7-96d3-63cf81c14869 â”† 28c65415-8b7d-4857-a4ce-300dca14b12b â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Select object columns and export as a dict:

    >>> df.select(cs.object()).to_dict(as_series=False)  # doctest: +IGNORE_RESULT
    {
        "uuid_obj": [
            UUID("6be063cf-c9c6-43be-878e-e446cfd42981"),
            UUID("7849d8f9-2cac-48e7-96d3-63cf81c14869"),
        ]
    }

    Select all columns *except* for those that are object and export as dict:

    >>> df.select(~cs.object())  # doctest: +IGNORE_RESULT
    {
        "idx": [0, 1],
        "uuid_str": [
            "acab9fea-c05d-4b91-b639-418004a63f33",
            "28c65415-8b7d-4857-a4ce-300dca14b12b",
        ],
    }
    )r'   rž   r   rÀ   rN   rR   rQ   rÀ   rÀ   þ
  s   € ôj ×$Ñ$¤Z×%6Ñ%6Ó%8Ó9Ð9rR   c                 ót   — t        | «      }d|› d}t        j                  t        j                  |«      «      S )uL  
    Select columns that start with the given substring(s).

    Parameters
    ----------
    prefix
        Substring(s) that matching column names should start with.

    See Also
    --------
    contains : Select all columns that contain the given substring.
    ends_with : Select all columns that end with the given substring(s).
    matches : Select all columns that match the given regex pattern.

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "foo": [1.0, 2.0],
    ...         "bar": [3.0, 4.0],
    ...         "baz": [5, 6],
    ...         "zap": [7, 8],
    ...     }
    ... )

    Match columns starting with a 'b':

    >>> df.select(cs.starts_with("b"))
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ bar â”† baz â”‚
    â”‚ --- â”† --- â”‚
    â”‚ f64 â”† i64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 3.0 â”† 5   â”‚
    â”‚ 4.0 â”† 6   â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜

    Match columns starting with *either* the letter 'b' or 'z':

    >>> df.select(cs.starts_with("b", "z"))
    shape: (2, 3)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ bar â”† baz â”† zap â”‚
    â”‚ --- â”† --- â”† --- â”‚
    â”‚ f64 â”† i64 â”† i64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 3.0 â”† 5   â”† 7   â”‚
    â”‚ 4.0 â”† 6   â”† 8   â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜

    Match all columns *except* for those starting with 'b':

    >>> df.select(~cs.starts_with("b"))
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ foo â”† zap â”‚
    â”‚ --- â”† --- â”‚
    â”‚ f64 â”† i64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ 1.0 â”† 7   â”‚
    â”‚ 2.0 â”† 8   â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜
    r~   r=  r>  )ÚprefixÚescaped_prefixrA  s      rQ   rF   rF   6  s:   € ôD   Ó'€NØ^Ð$ CÐ(€Jä×$Ñ$¤Z×%7Ñ%7¸
Ó%CÓDÐDrR   )Úinclude_categoricalc                óT   — t         g}| r|j                  t        «       t        |«      S )un  
    Select all String (and, optionally, Categorical) string columns.

    See Also
    --------
    binary : Select all binary columns.
    by_dtype : Select all columns matching the given dtype(s).
    categorical: Select all categorical columns.

    Examples
    --------
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "w": ["xx", "yy", "xx", "yy", "xx"],
    ...         "x": [1, 2, 1, 4, -2],
    ...         "y": [3.0, 4.5, 1.0, 2.5, -2.0],
    ...         "z": ["a", "b", "a", "b", "b"],
    ...     },
    ... ).with_columns(
    ...     z=pl.col("z").cast(pl.Categorical("lexical")),
    ... )

    Group by all string columns, sum the numeric columns, then sort by the string cols:

    >>> df.group_by(cs.string()).agg(cs.numeric().sum()).sort(by=cs.string())
    shape: (2, 3)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”
    â”‚ w   â”† x   â”† y   â”‚
    â”‚ --- â”† --- â”† --- â”‚
    â”‚ str â”† i64 â”† f64 â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•ªâ•â•â•â•â•â•¡
    â”‚ xx  â”† 0   â”† 2.0 â”‚
    â”‚ yy  â”† 6   â”† 7.0 â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜

    Group by all string *and* categorical columns:

    >>> df.group_by(cs.string(include_categorical=True)).agg(cs.numeric().sum()).sort(
    ...     by=cs.string(include_categorical=True)
    ... )
    shape: (3, 4)
    â”Œâ”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”
    â”‚ w   â”† z   â”† x   â”† y    â”‚
    â”‚ --- â”† --- â”† --- â”† ---  â”‚
    â”‚ str â”† cat â”† i64 â”† f64  â”‚
    â•žâ•â•â•â•â•â•ªâ•â•â•â•â•â•ªâ•â•â•â•â•â•ªâ•â•â•â•â•â•â•¡
    â”‚ xx  â”† a   â”† 2   â”† 4.0  â”‚
    â”‚ xx  â”† b   â”† -2  â”† -2.0 â”‚
    â”‚ yy  â”† b   â”† 6   â”† 7.0  â”‚
    â””â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”˜
    )r   rh   r   r.   )re  Ústring_dtypess     rQ   rG   rG   ~  s(   € ôj 5;°8€MÙØ×Ñœ[Ô)äMÓ"Ð"rR   c                 óP   — t         j                  t        j                  «       «      S )u]  
    Select all temporal columns.

    See Also
    --------
    by_dtype : Select all columns matching the given dtype(s).
    date : Select all date columns.
    datetime : Select all datetime columns, optionally filtering by time unit/zone.
    duration : Select all duration columns, optionally filtering by time unit.
    time : Select all time columns.

    Examples
    --------
    >>> from datetime import date, time
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "dt": [date(2021, 1, 1), date(2021, 1, 2)],
    ...         "tm": [time(12, 0, 0), time(20, 30, 45)],
    ...         "value": [1.2345, 2.3456],
    ...     }
    ... )

    Match all temporal columns:

    >>> df.select(cs.temporal())
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ dt         â”† tm       â”‚
    â”‚ ---        â”† ---      â”‚
    â”‚ date       â”† time     â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ 2021-01-01 â”† 12:00:00 â”‚
    â”‚ 2021-01-02 â”† 20:30:45 â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Match all temporal columns *except* for time columns:

    >>> df.select(cs.temporal() - cs.time())
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ dt         â”‚
    â”‚ ---        â”‚
    â”‚ date       â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ 2021-01-01 â”‚
    â”‚ 2021-01-02 â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Match all columns *except* for temporal columns:

    >>> df.select(~cs.temporal())
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ value  â”‚
    â”‚ ---    â”‚
    â”‚ f64    â”‚
    â•žâ•â•â•â•â•â•â•â•â•¡
    â”‚ 1.2345 â”‚
    â”‚ 2.3456 â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”˜
    )r'   rž   r   rI   rN   rR   rQ   rI   rI   º  s   € ô~ ×$Ñ$¤Z×%8Ñ%8Ó%:Ó;Ð;rR   c                 ó"   — t        t        g«      S )u  
    Select all time columns.

    See Also
    --------
    date : Select all date columns.
    datetime : Select all datetime columns, optionally filtering by time unit/zone.
    duration : Select all duration columns, optionally filtering by time unit.
    temporal : Select all temporal columns.

    Examples
    --------
    >>> from datetime import date, datetime, time
    >>> import polars.selectors as cs
    >>> df = pl.DataFrame(
    ...     {
    ...         "dtm": [datetime(2001, 5, 7, 10, 25), datetime(2031, 12, 31, 0, 30)],
    ...         "dt": [date(1999, 12, 31), date(2024, 8, 9)],
    ...         "tm": [time(0, 0, 0), time(23, 59, 59)],
    ...     },
    ... )

    Select all time columns:

    >>> df.select(cs.time())
    shape: (2, 1)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ tm       â”‚
    â”‚ ---      â”‚
    â”‚ time     â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ 00:00:00 â”‚
    â”‚ 23:59:59 â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜

    Select all columns *except* for those that are times:

    >>> df.select(~cs.time())
    shape: (2, 2)
    â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”
    â”‚ dtm                 â”† dt         â”‚
    â”‚ ---                 â”† ---        â”‚
    â”‚ datetime[Î¼s]        â”† date       â”‚
    â•žâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•ªâ•â•â•â•â•â•â•â•â•â•â•â•â•¡
    â”‚ 2001-05-07 10:25:00 â”† 1999-12-31 â”‚
    â”‚ 2031-12-31 00:30:00 â”† 2024-08-09 â”‚
    â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”˜
    )r.   r   rN   rR   rQ   rJ   rJ   ü  rC  rR   )rP   r'   r   zLiteral[True])rP   r   r   zLiteral[False])rP   r   r   r¾   )rc   z4DataFrame | LazyFrame | Mapping[str, PolarsDataType]rd   r  rW   r¾   r   ztuple[str, ...])ri   zDataFrame | LazyFramerj   r   r   zbuiltins.list[Any])ru   r"   rv   zMapping[Any, Any] | Nonerw   r¾   rx   r¾   rp   r¾   r   zdict[str, Any])rj   z[str | Expr | PolarsDataType | Selector | Collection[str | Expr | PolarsDataType | Selector]r   z&str | Expr | PolarsDataType | Selectorr   r'   )rG   ústr | Collection[str]r	  r¾   r   r‰   r  )F)r  r¾   r  r¾   r   r'   )r’   zUPolarsDataType | PythonDataType | Iterable[PolarsDataType] | Iterable[PythonDataType]r   r'   )r)  z#int | range | Sequence[int | range]r€   r¾   r   r'   )r   rj  r€   r¾   r   r'   rM   )r3  zNone | Selectorr   r'   )r3  zSelector | Noner5  z
int | Noner   r'   )r?  r‰   r   r'   )N)r°   N)r±   ú&TimeUnit | Collection[TimeUnit] | Noner²   zOstr | pydatetime.timezone | Collection[str | pydatetime.timezone | None] | Noner   r'   )r  r¾   r   r'   )r±   rk  r   r'   )rQ  r‰   r   r'   )rû   z[str | PolarsDataType | Selector | Expr | Collection[str | PolarsDataType | Selector | Expr]rü   z&str | PolarsDataType | Selector | Exprr   r'   )rW   r¾   r   r'   )r]  r‰   r   r'   )rc  r‰   r   r'   )re  r¾   r   r'   )jÚ
__future__r   r½   Ú
contextlibr4   rÂ   ÚsysÚcollections.abcr   r   r   r5   r   rÄ   Ú	functoolsr   Úoperatorr	   Útypingr
   r   r   r   r   Úpolars.datatypes.classesÚ	datatypesÚclassesr´   Úpolarsr   r¤   Úpolars._utils.parse.exprr   Úpolars._utils.unstabler   Úpolars._utils.variousr   r   Úpolars.datatypesr   r   r   r   r   r   r   Úpolars.exprr   ÚsuppressÚImportErrorÚpolars._plrr   r   Úversion_infoÚtypesr    r»   r!   r"   r#   Úpolars._typingr$   r%   r&   Ú__all__r?   r;   ro   r|   r•   r'   r  r  r(   r)   r*   r,   r-   r.   r/   r0   r9   rA   r+   rH   rC   r1   r2   r3   r6   r7   r8   r:   r<   r=   r>   rE   rK   r@   rB   rD   rÀ   rF   rG   rI   rJ   rN   rR   rQ   ú<module>rƒ     s×  ðÝ "ã Û Û Û 
ß 9Ñ 9Ý (Ý Ý ÷õ ÷ (Ð 'Ý !Ý >Ý +ß 6÷÷ ñ õ à€Z×Ñ˜Ó%ñ /ß.÷/ð ×ÑwÒÞñ D‹z€HáÝ(ç+ßGÑGò(€ðV 
Ú 4ó 
Ø 4ð 
Ú 0ó 
Ø 0ó%ð, ñ	L;Ø@ðL;àðL;ð ð	L;ð
 óL;ób ðR ñØðàðð ð	ð
 ðð ðð óð24!ð	=ð4!ð 8ð4!ð ó4!ôny/ˆtô y/ðx	 AEõ ó9ó,/7ðdhW¸Uõ hWðX ð_ð  ñ_Øð_ð ð_ð ó	_óD!óH7ðtS*ð	#ðS*ð óS*ðn HLñbTØ1ðbTØ@DðbTàóbTðJ @Dõ Y<ñx 
ƒò49ó ð49ñn 
ƒóF?ó ðF?ñR 
ƒðVGÀô VGó ðVGñr 
ƒò4;ó ð4;ñn 
ƒò7:ó ð7:ót/?ódEEóP1ðj 9=ð	ð	ZXØ5ðZXð 	XðZXð óZXóz2;ôjXLðx 9=ðiEØ5ðiEàóiEóXEEðP@9ð	=ð@9ð :ð@9ð ó@9ðF !õ /?ód29ój2;ój>BóB@DðF  õ />ódBIóJ3;ól5:ópEEðP +0õ 9#óx?<ôD1÷s^/ñ /ús   Â	H3È3H=