L idddlmZddlmZddlmZmZddlZddlm Z ddl m Z ddl m Z ddlmZdd lmZmZdd lmZeGd d eZeGd deZeGddeZy)) annotations) dataclass)ClassVarCallableN) DataFrame)Scale)GroupBy)Stat)EstimateAggregatorWeightedAggregator)VectorcJeZdZUdZdZded<dZded< d dZy ) Agga` 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 meanstr | Callable[[Vector], float]funcTClassVar[bool]group_by_orientcdddj|}|j|||jij|gj d}|S)NyxrrsubsetTdrop)getaggrdropna reset_index)selfdatagroupbyorientscalesvarress `/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/seaborn/_stats/aggregation.py__call__z Agg.__call__)sWc"&&v.  STYY' ( VC5V ! [d[ #  N r"rr#r r$strr%zdict[str, Scale]returnr)__name__ __module__ __qualname____doc__r__annotations__rr)r*r(rrsK"-3D )2&*O^*  (/ 9< FV   r*rceZdZUdZdZded<dZded<dZd ed <d Zd ed <dZ ded< ddZ ddZ y )Esta, Calculate a point estimate and error bar interval. For more information about the various `errorbar` choices, see the :doc:`errorbar tutorial `. 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 rrr)ci_zstr | tuple[str, float]errorbariintn_bootNz int | NoneseedTrrc@|||}tj|gSN)pdr)r!r"r& estimatorr's r(_processz Est._process^s! c"||SE""r*c|j|jd}d|vr"t|j|jfi|}n!t |j|jfi|}ddd|}|j ||j||j|gjd}|j|d |||d ||i}|S) N)r:r;weightrrrrTrminmax) r:r;r rr8r applyr@rr fillna) r!r"r#r$r%boot_kwsenginer&r's r(r)z Est.__call__fs#kk499= t ' 4==MHMF' 4==MHMFc"6*  U4V 4 VC5V ! [d[ # jjSE+s3xC5c#hGH r*)r"rr&r,r?r r-rr+) r.r/r0r1rr2r8r:r;rr@r)r3r*r(r5r57s<-3D )2(2H%2FCD*&*O^*##$'#4F# #(/9<FV r*r5ceZdZ dZy)Rollingcyr=r3)r!r"r#r$r%s r(r)zRolling.__call__s r*N)r.r/r0r)r3r*r(rJrJ}s  r*rJ) __future__r dataclassesrtypingrrpandasr>rseaborn._core.scalesrseaborn._core.groupbyr seaborn._stats.baser seaborn._statisticsr r seaborn._core.typingr rr5rJr3r*r(rUs}"!%&)$( !$! !H B$B BJ  d   r*