1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
Ë
nñúhãóè—dZddlmZddlZddlZddlmZmZmZddl    Z
ddl m Z ddl mZmZerddlmZd d„Zej&                                        d d    „«Zej&                                        d d
„«Zy)z6Common utilities for Numba operations with groupby opsé)Ú annotationsN)Ú TYPE_CHECKINGÚAnyÚCallable)Úimport_optional_dependency)ÚNumbaUtilErrorÚjit_user_function)ÚScalarcó"—t|«s td«‚ttj|«j
j ««}ddg}t|«}t|«|ks|d||k7rtd|›d|j›d|›«‚y)a^
    Validate user defined function for ops when using Numba with groupby ops.
 
    The first signature arguments should include:
 
    def f(values, index, ...):
        ...
 
    Parameters
    ----------
    func : function, default False
        user defined function
 
    Returns
    -------
    None
 
    Raises
    ------
    NumbaUtilError
    z5Numba engine can only be used with a single function.ÚvaluesÚindexNz
The first z arguments to z     must be )
ÚcallableÚNotImplementedErrorÚlistÚinspectÚ    signatureÚ
parametersÚkeysÚlenrÚ__name__)ÚfuncÚ udf_signatureÚ expected_argsÚmin_number_argss    úMH:\Change_password\venv_build\Lib\site-packages\pandas/core/groupby/numba_.pyÚ validate_udfrs¢€ô, DŒ>Ü!Ø Có
ð    
ôœ×*Ñ*¨4Ó0×;Ñ;×@Ñ@ÓBÓC€MؘwÐ'€Mܘ-Ó(€Oä ˆMÓ˜_Ò,Ø Ð)˜/Ð *¨mÒ ;äØ˜Ð)¨¸¿ ¹ °Ài؈oð ó
ð    
ð <óc󤇇—t|«ŠtrddlŠn td«Š‰j    |||¬«                                                        dˆˆfd„ «}|S)aŽ
    Generate a numba jitted agg function specified by values from engine_kwargs.
 
    1. jit the user's function
    2. Return a groupby agg function with the jitted function inline
 
    Configurations specified in engine_kwargs apply to both the user's
    function _AND_ the groupby evaluation loop.
 
    Parameters
    ----------
    func : function
        function to be applied to each group and will be JITed
    nopython : bool
        nopython to be passed into numba.jit
    nogil : bool
        nogil to be passed into numba.jit
    parallel : bool
        parallel to be passed into numba.jit
 
    Returns
    -------
    Numba function
    rNÚnumba©ÚnopythonÚnogilÚparallelcó(•—t|«t|«k(sJ‚t|«}tj||f«}‰ j|«D]A}|||||}    ‰ j|«D] }
|||||…|
f} ‰ | |    g|¢­Ž|||
f<Œ"ŒC|S©N©rÚnpÚemptyÚprange©r r ÚbeginÚendÚ num_columnsÚargsÚ
num_groupsÚresultÚiÚ group_indexÚjÚgrouprÚ
numba_funcs            €€rÚ    group_aggz*generate_numba_agg_func.<locals>.group_agges»ø€ô5‹zœS ›XÒ%Ð%Ð%ܘ“Zˆ
ä—‘˜: {Ð3Ó4ˆØ—‘˜jÓ)ò    EˆAØ  a¡¨3¨q©6Ð2ˆKØ—\‘\ +Ó.ò EØ˜u Q™x¨#¨a©&Ð0°!Ð3Ñ4Ù)¨%°ÐD¸tÒDq˜!t’ ñ Eð    Eð
ˆ r©r ú
np.ndarrayr r8r+r8r,r8r-Úintr.rÚreturnr8©r    rrrÚjit)rr!r"r#r6rr5s     @@rÚgenerate_numba_agg_funcr=@s‹ù€ô># 4Ó(€JÝÜä*¨7Ó3ˆà
‡YY˜¨¸€YÓAðØðàððððð    ð
ð ð ð ð
õóBðð& Ðrc󤇇—t|«ŠtrddlŠn td«Š‰j    |||¬«                                                        dˆˆfd„ «}|S)a›
    Generate a numba jitted transform function specified by values from engine_kwargs.
 
    1. jit the user's function
    2. Return a groupby transform function with the jitted function inline
 
    Configurations specified in engine_kwargs apply to both the user's
    function _AND_ the groupby evaluation loop.
 
    Parameters
    ----------
    func : function
        function to be applied to each window and will be JITed
    nopython : bool
        nopython to be passed into numba.jit
    nogil : bool
        nogil to be passed into numba.jit
    parallel : bool
        parallel to be passed into numba.jit
 
    Returns
    -------
    Numba function
    rNrr cóJ•—t|«t|«k(sJ‚t|«}tjt|«|f«}‰ j|«D]I}|||||}    ‰ j|«D](}
|||||…|
f} ‰ | |    g|¢­Ž|||||…|
f<Œ*ŒK|Sr%r&r*s            €€rÚgroup_transformz6generate_numba_transform_func.<locals>.group_transform¡sÎø€ô5‹zœS ›XÒ%Ð%Ð%ܘ“Zˆ
ä—‘œ3˜v›;¨ Ð4Ó5ˆØ—‘˜jÓ)ò    UˆAØ  a¡¨3¨q©6Ð2ˆKØ—\‘\ +Ó.ò UØ˜u Q™x¨#¨a©&Ð0°!Ð3Ñ4Ù/9¸%ÀÐ/TÈtÒ/Tu˜Q‘x # a¡&Ð(¨!Ð+Ò,ñ Uð    Uð
ˆ rr7r;)rr!r"r#r@rr5s     @@rÚgenerate_numba_transform_funcrA|s‹ù€ô># 4Ó(€JÝÜä*¨7Ó3ˆà
‡YY˜¨¸€YÓAðØðàððððð    ð
ð ð ð ð
õóBðð& Ðr)rrr:ÚNone)
rzCallable[..., Scalar]r!Úboolr"rCr#rCr:úPCallable[[np.ndarray, np.ndarray, np.ndarray, np.ndarray, int, Any], np.ndarray])
rzCallable[..., np.ndarray]r!rCr"rCr#rCr:rD)Ú__doc__Ú
__future__rÚ    functoolsrÚtypingrrrÚnumpyr'Úpandas.compat._optionalrÚpandas.core.util.numba_rr    Úpandas._typingr
rÚcacher=rA©rrú<module>rOsÅðÙ<Ý"ãÛ÷ñó å>÷ñ
Ý%ó$
ðN ‡ð8Ø
ð8àð8ð ð8ðð    8ð
Vò 8óð8ðv ‡ð8Ø
#ð8àð8ð ð8ðð    8ð
Vò 8óñ8r