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
U
­ý°diã@sHdZddlZddlZddlmZmZddlmZmZdd„Z    dd„Z
dS)    zY
Test the consistency of the groupby API, both internally and with other pandas objects.
éN)Ú    DataFrameÚSeries)ÚDataFrameGroupByÚ SeriesGroupByc    Csþ|dkr"d}|j tjj|d¡|dkrDd}|j tjj|d¡|dkr^tt|ƒrZt‚dStt|ƒ}tt    |ƒ}t
t   |¡j ƒ}|dkr’dh}nt
t   |¡j ƒ}t
ƒt
ƒ}}|d    krÄd
d d h}nô|d krÖdd h}nâ|dkræd h}nÒ|dkrd d
dh}dddh}n²|dkr$d d
dh}ddh}n”|dkr:d d
dh}n~|dkrPddd h}nh|dkrjddh}dh}nN|dkr|dh}n<|dkr”d
h}d h}n$|dkr¦dh}n|dkr¸d d h}||@|ksÊt‚||@|ksÜt‚||8}||8}||ksút‚dS)!N©ÚfirstÚlastz?first and last are entirely different between frame and groupby©Úreason)ÚcumcountzDataFrame has no such methodÚngroupÚsizeÚself©ÚanyÚallÚkwargsÚ    bool_onlyÚaxis)ÚcountÚ numeric_only)Znunique©ÚmaxÚminÚskipnaÚ    min_countÚengineÚ engine_kwargs©ZmeanZstdÚsumÚvar©ZmedianÚprodZsem©ZbackfillZbfillZffillÚpadÚdowncastÚinplace©ZcummaxZcumminÚargs©ZcumprodZcumsum©Z
pct_change©Zrank©ZquantileÚmethod)ÚnodeÚ
add_markerÚpytestÚmarkÚxfailÚhasattrrÚAssertionErrorÚgetattrrÚsetÚinspectÚ    signatureÚ
parameters)    ÚrequestÚ groupby_funcÚmsgZ frame_methodÚ    gb_methodÚresultÚexpectedÚexclude_expectedÚexclude_result©rBú`d:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\pandas/tests/groupby/test_api_consistency.pyÚtest_frame_consistencysb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
rDc    Csü|dkr"d}|j tjj|d¡|dkrDd}|j tjj|d¡|dkr^tt|ƒrZt‚dStt|ƒ}tt    |ƒ}t
t   |¡j ƒ}|dkr’dh}nt
t   |¡j ƒ}t
ƒt
ƒ}}|d    krÄd
d d h}nò|d krÔd h}nâ|dkròd d
dh}dddh}nÄ|dkrd d
dh}ddh}n¦|dkr&d d
dh}n|dkr<ddd h}nz|dkrVddh}dh}n`|dkrhdh}nN|dkr€d
h}d h}n6|dkr’dh}n$|dkr¦dd
h}n|dkr¶dh}||@|ksÈt‚||@|ksÚt‚||8}||8}||ksøt‚dS) Nrz@first and last are entirely different between Series and groupbyr    )r ZcorrwithzSeries has no such methodr r rrrrr)Zdiffrrrrrrr!r#r%r&r'r(rr)r*r+)ZidxminZidxmaxr,)r.r/r0r1r2r3rr4r5rr6r7r8r9)    r:r;r<Z series_methodr=r>r?r@rArBrBrCÚtest_series_consistencyRsb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
rE) Ú__doc__r7r0ZpandasrrZpandas.core.groupby.genericrrrDrErBrBrBrCÚ<module>s ?