ó
    Ñ]j:)  ã                  óŽ  • S r SSKJr  SSKJrJr  SSKJrJr  SSK	r
SSKJrJrJr  SSKJr  SSKJrJr  SS	KJrJrJr  SS
KJr  SSKJr  SSKJr  \(       a  SSKJrJ r J!r!  SSK"J#r#J$r$            SS jr% " S S\5      r& " S S\&5      r' " S S\&5      r(SS jr)SS jr*      SS jr+S S jr,    S!S jr-    S"S jr.g)#z–
Module responsible for execution of NDFrame.describe() method.

Method NDFrame.describe() delegates actual execution to function describe_ndframe().
é    )Úannotations)ÚABCÚabstractmethod)ÚTYPE_CHECKINGÚcastN)ÚDtypeObjÚNDFrameTÚnpt)Úvalidate_percentile)Úis_bool_dtypeÚis_numeric_dtype)Ú
ArrowDtypeÚDatetimeTZDtypeÚExtensionDtype)ÚFloat64Dtype)Úconcat)Úformat_percentiles)ÚCallableÚHashableÚSequence)Ú	DataFrameÚSeriesc                óÈ   • [        U5      nU R                  S:X  a  [        [        SU 5      S9nO[	        [        SU 5      UUS9nUR                  US9n[        [        U5      $ )aÜ  Describe series or dataframe.

Called from pandas.core.generic.NDFrame.describe()

Parameters
----------
obj: DataFrame or Series
    Either dataframe or series to be described.
include : 'all', list-like of dtypes or None (default), optional
    A white list of data types to include in the result. Ignored for ``Series``.
exclude : list-like of dtypes or None (default), optional,
    A black list of data types to omit from the result. Ignored for ``Series``.
percentiles : list-like of numbers, optional
    The percentiles to include in the output. All should fall between 0 and 1.
    The default is ``[.25, .5, .75]``, which returns the 25th, 50th, and
    75th percentiles.

Returns
-------
Dataframe or series description.
é   r   ©Úobjr   )r   ÚincludeÚexclude)Úpercentiles)Ú_refine_percentilesÚndimÚSeriesDescriberr   ÚDataFrameDescriberÚdescriber	   )r   r   r   r   Ú	describerÚresults         ÚY/home/mande/repo/quber/.venv/lib/python3.13/site-packages/pandas/core/methods/describe.pyÚdescribe_ndframer(   7   sm   € ô8 & kÓ2€Kð ‡x�x�1ƒ}Ü#Ü�X˜sÓ#ñ
‰	ô 'Ü�[ #Ó&ØØñ
ˆ	ð ×Ñ¨KÐÐ8€FÜ”˜&Ó!Ð!ó    c                  ó6   • \ rS rSrSrSS jr\SS j5       rSrg)	ÚNDFrameDescriberAbstractée   z€Abstract class for describing dataframe or series.

Parameters
----------
obj : Series or DataFrame
    Object to be described.
c                ó   • Xl         g ©Nr   )Úselfr   s     r'   Ú__init__Ú!NDFrameDescriberAbstract.__init__n   s   € Ø�r)   c                ó   • g)z�Do describe either series or dataframe.

Parameters
----------
percentiles : list-like of numbers
    The percentiles to include in the output.
N© )r/   r   s     r'   r$   Ú!NDFrameDescriberAbstract.describeq   s   � r)   r   N)r   úDataFrame | SeriesÚreturnÚNone)r   úSequence[float] | np.ndarrayr6   r5   )	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r0   r   r$   Ú__static_attributes__r3   r)   r'   r+   r+   e   s    † ñôð óó ór)   r+   c                  ó.   • \ rS rSr% SrS\S'   SS jrSrg)	r"   é|   z2Class responsible for creating series description.r   r   c                óR   • [        U R                  5      nU" U R                  U5      $ r.   )Úselect_describe_funcr   )r/   r   Údescribe_funcs      r'   r$   ÚSeriesDescriber.describe�   s&   € Ü,Ø�H‰Hó
ˆñ ˜TŸX™X {Ó3Ð3r)   r3   N)r   r8   r6   r   )r9   r:   r;   r<   r=   Ú__annotations__r$   r>   r3   r)   r'   r"   r"   |   s   ‡ Ù<à	ƒK÷4r)   r"   c                  ó`   ^ • \ rS rSr% SrS\S'           S	U 4S jjrS
S jrSS jrSr	U =r
$ )r#   éˆ   a>  Class responsible for creating dataobj description.

Parameters
----------
obj : DataFrame
    DataFrame to be described.
include : 'all', list-like of dtypes or None
    A white list of data types to include in the result.
exclude : list-like of dtypes or None
    A black list of data types to omit from the result.
r   r   c               ó¦   >• X l         X0l        UR                  S:X  a%  UR                  R                  S:X  a  [        S5      e[        TU ]  U5        g )Né   r   z+Cannot describe a DataFrame without columns)r   r   r!   ÚcolumnsÚsizeÚ
ValueErrorÚsuperr0   )r/   r   r   r   Ú	__class__s       €r'   r0   ÚDataFrameDescriber.__init__—   sD   ø€ ð ŒØŒà�8‰8�q‹=˜SŸ[™[×-Ñ-°Ó2ÜÐJÓKÐKä‰Ñ˜Õr)   c                óT  • U R                  5       n/ nUR                  5        H'  u  pE[        U5      nUR                  U" XQ5      5        M)     [	        U5      n[        U Vs/ s H  oˆR                  U5      PM     snSSSS9n	UR                  R                  5       U	l        U	$ s  snf )Nr   TF)ÚaxisÚignore_indexÚsort)	Ú_select_dataÚitemsrB   ÚappendÚreorder_columnsr   ÚreindexrJ   Úcopy)
r/   r   ÚdataÚldescÚ_ÚseriesrC   Ú	col_namesÚxÚds
             r'   r$   ÚDataFrameDescriber.describe¦   sš   € Ø× Ñ Ó"ˆà ˆØŸ™ž‰IˆAÜ0°Ó8ˆMØ�L‰L™ vÓ;Ö<ñ &ô $ EÓ*ˆ	ÜÙ+0Ó1ª5 a�Y‰Y�yÖ!©5Ñ1ØØØñ	
ˆð —L‘L×%Ñ%Ó'ˆŒ	Øˆùò 2s   Á"B%c                óö  • U R                   c_  U R                  cR  [        R                  S/nU R                  R                  US9n[        UR                  5      S:X  a  U R                  nU$ U R                   S:X  a(  U R                  b  Sn[        U5      eU R                  nU$ U R                  R                  U R                   U R                  S9n[        UR                  5      S:X  a  Sn[        U5      eU$ )zSelect columns to be described.Údatetime)r   r   Úallz*exclude must be None when include is 'all')r   r   z<No columns match the specified include or exclude data types)	r   r   ÚnpÚnumberr   Úselect_dtypesÚlenrJ   rL   )r/   Údefault_includerZ   Úmsgs       r'   rT   ÚDataFrameDescriber._select_data¸   sâ   € à�L‰LÑ  t§|¡|Ñ';ä46·I±I¸zÐ3JˆOØ—8‘8×)Ñ)°/Ð)ÐBˆDÜ�4—<‘<Ó  AÓ%Ø—x‘x�ð ˆð �\‰\˜UÓ"Ø�|‰|Ñ'ØB�Ü  “oÐ%Ø—8‘8ˆDð ˆð —8‘8×)Ñ)ØŸ™ØŸ™ð *ð ˆDô �4—<‘<Ó  AÓ%ØT�Ü  “oÐ%Øˆr)   )r   r   )r   r   r   ústr | Sequence[str] | Noner   rl   r6   r7   )r   r8   r6   r   )r6   r   )r9   r:   r;   r<   r=   rE   r0   r$   rT   r>   Ú__classcell__)rN   s   @r'   r#   r#   ˆ   sI   ø‡ ñ
ð 
ƒNðàðð ,ð	ð
 ,ðð 
÷ô÷$ò r)   r#   c                ó¾   • / n[        5       n[        S U  5       [        S9nU H5  nU H,  nXR;  d  M
  UR                  U5        UR	                  U5        M.     M7     U$ )z,Set a convenient order for rows for display.c              3  ó8   #   • U  H  oR                   v •  M     g 7fr.   )Úindex)Ú.0r_   s     r'   Ú	<genexpr>Ú"reorder_columns.<locals>.<genexpr>Ô   s   é € Ð3ªU¨ŸGžGªUùs   ‚)Úkey)ÚsetÚsortedrh   ÚaddrV   )r[   ÚnamesÚ
seen_namesÚldesc_indexesÚidxnamesÚnames         r'   rW   rW   Ð   sY   € à€EÜ #£€JÜÑ3©UÓ3¼Ñ=€MÛ!ˆÛˆDØÕ%Ø—‘˜tÔ$Ø—‘˜TÖ"ó ñ "ð
 €Lr)   c                óÌ  • SSK Jn  [        U5      n[        U5      S:X  a  / nOU R	                  U5      R                  5       nSSSS/UQSPnU R                  5       U R                  5       U R                  5       U R                  5       /UQU R                  5       Pn[        U R                  [        5      (       ae  [        U R                  [        5      (       a;  U R                  R                  S:X  a  S	nO\SS	Kn[        UR#                  5       5      nO>[%        5       nO3U R                  R                  S
;   a  [&        R                  " S5      nOS	nU" XeU R(                  US9$ )z¿Describe series containing numerical data.

Parameters
----------
series : Series
    Series to be described.
percentiles : list-like of numbers
    The percentiles to include in the output.
r   ©r   ÚcountÚmeanÚstdÚminÚmaxÚmNÚiufbÚfloat©rp   r|   Údtype)Úpandasr   r   rh   ÚquantileÚtolistr   r€   r�   r‚   rƒ   Ú
isinstancerˆ   r   r   ÚkindÚpyarrowÚfloat64r   re   r|   )	r]   r   r   Úformatted_percentilesÚ	quantilesÚ
stat_indexr`   rˆ   Úpas	            r'   Údescribe_numeric_1dr”   Ý   s&  € õ ä.¨{Ó;Ðä
ˆ;Ó˜1ÓØ‰	à—O‘O KÓ0×7Ñ7Ó9ˆ	à˜6 5¨%ÐOÐ2GÐOÈÐO€Jà�‰‹Ø�‰‹Ø�
‰
‹Ø�
‰
‹ð		ð
 
ð	ð 	�
‰
‹ð	€Aô �&—,‘,¤×/Ñ/Ü�f—l‘l¤J×/Ñ/Ø�|‰|× Ñ  CÓ'à‘ã$ä" 2§:¡:£<Ó0‘ä “N‰EØ	�‰×	Ñ	˜fÓ	$ä—’˜Ó!‰àˆÙ�!¨F¯K©K¸uÑEÐEr)   c                ó.  • / SQnU R                  5       n[        X3S:g     5      nUS:”  a   UR                  S   UR                  S   peSnO![        R
                  [        R
                  peSnU R                  5       XEU/nSSKJn	  U	" X‚U R                  US9$ )zÇDescribe series containing categorical data.

Parameters
----------
data : Series
    Series to be described.
percentiles_ignored : list-like of numbers
    Ignored, but in place to unify interface.
)r   ÚuniqueÚtopÚfreqr   NÚobjectr~   r‡   )
Úvalue_countsrh   rp   Úilocre   Únanr   r‰   r   r|   )
rZ   Úpercentiles_ignoredrx   Ú	objcountsÚcount_uniquer—   r˜   rˆ   r&   r   s
             r'   Údescribe_categorical_1dr      sŒ   € ò /€EØ×!Ñ!Ó#€IÜ�y¨a¡Ñ0Ó1€LØ�aÓØ—O‘O AÑ&¨	¯©°qÑ(9ˆTØ‰ô —F‘FœBŸF™FˆTØˆà�j‰j‹l˜L¨tÐ4€Fåá�&¨D¯I©I¸UÑCÐCr)   c                ó  • SSK Jn  [        U5      nSSS/UQSPnU R                  5       U R	                  5       U R                  5       /U R                  U5      R                  5       QU R                  5       PnU" XTU R                  S9$ )z¿Describe series containing datetime64 dtype.

Parameters
----------
data : Series
    Series to be described.
percentiles : list-like of numbers
    The percentiles to include in the output.
r   r~   r   r€   r‚   rƒ   )rp   r|   )
r‰   r   r   r   r€   r‚   rŠ   r‹   rƒ   r|   )rZ   r   r   r�   r’   r`   s         r'   Údescribe_timestamp_1dr¢   .  sŠ   € õ ä.¨{Ó;Ðà˜6 5ÐHÐ+@ÐHÀ%ÐH€Jà�
‰
‹Ø�	‰	‹Ø�‰‹
ð	ð 
�‰�{Ó	#×	*Ñ	*Ó	,ð		ð
 	�‰‹
ð	€Añ �!¨D¯I©IÑ6Ð6r)   c                ó8  • [        U R                  5      (       a  [        $ [        U 5      (       a  [        $ U R                  R
                  S:X  d  [        U R                  [        5      (       a  [        $ U R                  R
                  S:X  a  [        $ [        $ )z‚Select proper function for describing series based on data type.

Parameters
----------
data : Series
    Series to be described.
ÚMr„   )	r   rˆ   r    r   r”   r�   rŒ   r   r¢   )rZ   s    r'   rB   rB   H  sl   € ô �T—Z‘Z× Ñ Ü&Ð&Ü	˜$×	Ñ	Ü"Ð"Ø	�‰�‰˜CÓ	¤:¨d¯j©j¼/×#JÑ#JÜ$Ð$Ø	�‰�‰˜CÓ	Ü"Ð"ä&Ð&r)   c                óú   • U c  [         R                  " / SQ5      $ [         R                  " U 5      n [        U 5        [         R                  " U 5      nU c   e[        U5      [        U 5      :  a  [        S5      eU$ )z¢
Ensure that percentiles are unique and sorted.

Parameters
----------
percentiles : list-like of numbers, optional
    The percentiles to include in the output.
)g      Ð?g      à?g      è?z%percentiles cannot contain duplicates)re   ÚarrayÚasarrayr   r–   rh   rL   )r   Úunique_pctss     r'   r    r    ^  sr   € ð ÑÜ�xŠxÒ)Ó*Ð*ä—*’*˜[Ó)€Kô ˜Ô$ô —)’)˜KÓ(€KØÑ"Ð"Ð"Ü
ˆ;Óœ#˜kÓ*Ó*ÜÐ@ÓAÐAàÐr)   )
r   r	   r   rl   r   rl   r   ú#Sequence[float] | np.ndarray | Noner6   r	   )r[   zSequence[Series]r6   zlist[Hashable])r]   r   r   úSequence[float]r6   r   )rZ   r   r�   rª   r6   r   )rZ   r   r   rª   r6   r   )rZ   r   r6   r   )r   r©   r6   znpt.NDArray[np.float64])/r=   Ú
__future__r   Úabcr   r   Útypingr   r   Únumpyre   Úpandas._typingr   r	   r
   Úpandas.util._validatorsr   Úpandas.core.dtypes.commonr   r   Úpandas.core.dtypes.dtypesr   r   r   Úpandas.core.arrays.floatingr   Úpandas.core.reshape.concatr   Úpandas.io.formats.formatr   Úcollections.abcr   r   r   r‰   r   r   r(   r+   r"   r#   rW   r”   r    r¢   rB   r    r3   r)   r'   Ú<module>r·      s  ðñõ #÷÷ó
 ÷ñ õ
 8÷÷ñ õ 5Ý -å 7æ÷ñ ÷ð+"à	ð+"ð (ð+"ð (ð	+"ð
 5ð+"ð ô+"ô\˜sô ô.	4Ð.ô 	4ôEÐ1ô EôP
ô.FðbDØ
ðDà(ðDð ôDô@7ð4'Ø
ð'àô'ð,Ø4ðàõr)   