
    eCid                        S SK Jr  S SKJr  S SKJrJr  S SKrS SKJ	r	  S SK
Jr  S SKJr  S SKJr  S S	KJrJr  S S
KJr  \ " S S\5      5       r\ " S S\5      5       r\ " S S\5      5       rg)    )annotations)	dataclass)ClassVarCallableN)	DataFrame)Scale)GroupBy)Stat)EstimateAggregatorWeightedAggregator)Vectorc                  T    \ rS rSr% SrSrS\S'   SrS\S'             SS	 jrS
r	g)Agg   a0  
Aggregate data along the value axis using given method.

Parameters
----------
func : str or callable
    Name of a :class:`pandas.Series` method or a vector -> scalar function.

See Also
--------
objects.Est : Aggregation with error bars.

Examples
--------
.. include:: ../docstrings/objects.Agg.rst

meanstr | Callable[[Vector], float]funcTClassVar[bool]group_by_orientc                    SSS.R                  U5      nUR                  XU R                  05      R                  U/S9R	                  SS9nU$ )Nyxr   r   subsetTdrop)getaggr   dropnareset_index)selfdatagroupbyorientscalesvarress          T/home/james-whalen/.local/lib/python3.13/site-packages/seaborn/_stats/aggregation.py__call__Agg.__call__)   sU     c"&&v.STYY'(VC5V![d[#	 	 
     N
r#   r   r$   r	   r%   strr&   zdict[str, Scale]returnr   )
__name__
__module____qualname____firstlineno____doc__r   __annotations__r   r*   __static_attributes__r-   r,   r)   r   r      sK    " -3D
)2&*O^*(/9<FV	r,   r   c                      \ rS rSr% SrSrS\S'   SrS\S'   S	rS
\S'   Sr	S\S'   Sr
S\S'           SS jr          SS jrSrg)Est7   a  
Calculate a point estimate and error bar interval.

For more information about the various `errorbar` choices, see the
:doc:`errorbar tutorial </tutorial/error_bars>`.

Additional variables:

- **weight**: When passed to a layer that uses this stat, a weighted estimate
  will be computed. Note that use of weights currently limits the choice of
  function and error bar method  to `"mean"` and `"ci"`, respectively.

Parameters
----------
func : str or callable
    Name of a :class:`numpy.ndarray` method or a vector -> scalar function.
errorbar : str, (str, float) tuple, or callable
    Name of errorbar method (one of "ci", "pi", "se" or "sd"), or a tuple
    with a method name ane a level parameter, or a function that maps from a
    vector to a (min, max) interval.
n_boot : int
   Number of bootstrap samples to draw for "ci" errorbars.
seed : int
    Seed for the PRNG used to draw bootstrap samples.

Examples
--------
.. include:: ../docstrings/objects.Est.rst

r   r   r   )ci_   zstr | tuple[str, float]errorbari  intn_bootNz
int | NoneseedTr   r   c                @    U" X5      n[         R                  " U/5      $ N)pdr   )r"   r#   r'   	estimatorr(   s        r)   _processEst._process^   s    
 "||SE""r,   c                   U R                   U R                  S.nSU;   a"  [        U R                  U R                  40 UD6nO![        U R                  U R                  40 UD6nSSS.U   nUR                  XR                  Xv5      R                  U/S9R                  SS9nUR                  U S	3X   U S
3X   05      nU$ )N)r?   r@   weightr   r   r   r   Tr   minmax)r?   r@   r   r   r=   r   applyrE   r    r!   fillna)	r"   r#   r$   r%   r&   boot_kwsenginer'   r(   s	            r)   r*   Est.__call__f   s     #kk499=t'		4==MHMF'		4==MHMFc"6*U44VC5V![d[#	 	 jjSE+sxC5chGH
r,   r-   )r#   r   r'   r/   rD   r   r0   r   r.   )r1   r2   r3   r4   r5   r   r6   r=   r?   r@   r   rE   r*   r7   r-   r,   r)   r9   r9   7   s    < -3D
)2(2H%2FCD*&*O^*##$'#4F#	#(/9<FV	r,   r9   c                      \ rS rSr S rSrg)Rolling}   c                    g rB   r-   )r"   r#   r$   r%   r&   s        r)   r*   Rolling.__call__   s    r,   r-   N)r1   r2   r3   r4   r*   r7   r-   r,   r)   rQ   rQ   }   s
    r,   rQ   )
__future__r   dataclassesr   typingr   r   pandasrC   r   seaborn._core.scalesr   seaborn._core.groupbyr	   seaborn._stats.baser
   seaborn._statisticsr   r   seaborn._core.typingr   r   r9   rQ   r-   r,   r)   <module>r^      s}    " ! %   & ) $ ( !$ ! !H B$ B BJ d  r,   