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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
Ë
nñúhuzãó´—dZddlmZddlmZddlmZddlmZddl    m
Z
m Z m Z m Z mZmZmZmZddlZddlZddlmZmZdd    lmZdd
lmZdd lmZmZmZdd l m!Z!dd l"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)ddl*m+Z+m,Z,ddl-m.Z.ddl/m0Z0m1Z1ddl2m3Z3ddl4m5Z5m6Z6m7Z7m8Z8m9Z9ddl:m;cm<Z=ddl>m?Z?ddl@mAZAmBZBddlCmDZDmEZEmFZFmGZGmHZHmIZIddlJmKZKmLZLmMZMmNZNddlOmPZPddlQmRZRddlSmTZTddlUmVZVe
r.ddlWmXZXmYZYmZZZddl[m\Z\m]Z]m^Z^m_Z_m`Z`maZambZbmcZcmdZdmeZeddlfmgZgddlhmiZieeje de ffZked «ZlGd!„d"e«ZmGd#„d$eDeP«ZnGd%„d&eDe?«Zo                                d(d'„Zpy))zî
Define the SeriesGroupBy and DataFrameGroupBy
classes that hold the groupby interfaces (and some implementations).
 
These are user facing as the result of the ``df.groupby(...)`` operations,
which here returns a DataFrameGroupBy object.
é)Ú annotations)Úabc)Úpartial)Údedent)Ú TYPE_CHECKINGÚAnyÚCallableÚLiteralÚ
NamedTupleÚTypeVarÚUnionÚcastN)ÚIntervalÚlib)Ú
duplicated)ÚSpecificationError)ÚAppenderÚ SubstitutionÚdoc)Úfind_stack_level)Ú ensure_int64Úis_boolÚ is_dict_likeÚis_integer_dtypeÚ is_list_likeÚis_numeric_dtypeÚ    is_scalar)ÚCategoricalDtypeÚ IntervalDtype)Ú is_hashable)ÚisnaÚnotna)Ú
algorithms)Ú GroupByApplyÚmaybe_mangle_lambdasÚreconstruct_funcÚvalidate_func_kwargsÚwarn_alias_replacement)Ú    DataFrame)ÚbaseÚops)ÚGroupByÚ GroupByPlotÚ_agg_template_frameÚ_agg_template_seriesÚ _apply_docsÚ_transform_template)ÚIndexÚ
MultiIndexÚall_indexes_sameÚ default_index)ÚSeries)Úget_group_index)Úmaybe_use_numba)Úboxplot_frame_groupby)ÚHashableÚMappingÚSequence)
Ú    ArrayLikeÚAxisÚAxisIntÚCorrelationMethodÚ FillnaOptionsÚ
IndexLabelÚManagerÚ    Manager2DÚ SingleManagerÚ TakeIndexer)Ú Categorical)ÚNDFrame.Ú ScalarResultcó&—eZdZUdZded<ded<y)ÚNamedAggaó
    Helper for column specific aggregation with control over output column names.
 
    Subclass of typing.NamedTuple.
 
    Parameters
    ----------
    column : Hashable
        Column label in the DataFrame to apply aggfunc.
    aggfunc : function or str
        Function to apply to the provided column. If string, the name of a built-in
        pandas function.
 
    Examples
    --------
    >>> df = pd.DataFrame({"key": [1, 1, 2], "a": [-1, 0, 1], 1: [10, 11, 12]})
    >>> agg_a = pd.NamedAgg(column="a", aggfunc="min")
    >>> agg_1 = pd.NamedAgg(column=1, aggfunc=lambda x: np.mean(x))
    >>> df.groupby("key").agg(result_a=agg_a, result_1=agg_1)
         result_a  result_1
    key
    1          -1      10.5
    2           1      12.0
    r:ÚcolumnÚ    AggScalarÚaggfuncN)Ú__name__Ú
__module__Ú __qualname__Ú__doc__Ú__annotations__©óúNH:\Change_password\venv_build\Lib\site-packages\pandas/core/groupby/generic.pyrKrK|s…ñð2 ÓØ ÔrUrKcó‡—eZdZd-d„Zdddœ                    d.d„Zed«Zeedjd    ed
¬ ««d/ˆfd „ «Z
e e ed¬ «d0dddœd„«Z e Zd„Zd1d„Z        d2                                    d3d„Zd„Zed«Zede¬«ee«dddœd„««Z    d4                    d5d„Z                d6d„Zd7d8d„Zd7d9d„Ze ej8«d:d/ˆfd„ «Z                    d;                                    d<d„Zddej>ddej>f                                                    d=d„Z ej>f                    d>d„Z!ej>ddf                            d?d „Z"e#e ejHjJ«d@d!„««Z$e ejLjJ«    dA                    dBd"„«Z&e ejNjJ«    dA                    dBd#„«Z'e ejPjJ«ej>df                    dCd$„«Z(e ejRjJ«ej>df                    dCd%„«Z)e ejTjJ«        dD                            dEd&„«Z*e ejVjJ«    dF                            dGd'„«Z+e#d/d(„«Z,e#d/d)„«Z-e ej\jJ«                                            dH                                                                    dId*„«Z.e#e ej^jJ«d/d+„««Z/d/d,„Z0ˆxZ1S)JÚ SeriesGroupByr6cóŠ—|jj||j¬«}|jj|_|S©N©Úaxes)ÚobjÚ_constructor_from_mgrr\ÚnameÚ_name)ÚselfÚmgrÚouts   rVÚ_wrap_agged_managerz!SeriesGroupBy._wrap_agged_manager›s3€Øh‰h×,Ñ,¨S°s·x±xÐ,Ó@ˆØ—H‘H—M‘MˆŒ    Øˆ
rUFN©Ú numeric_onlyr_c    ó¸—|j}|j}|r?t|j«s*d}t    d|›dt |«j ›d|›d«‚|S)Nrfz Cannot use z =True with ú.z and non-numeric dtypes.)Ú_obj_with_exclusionsÚ_mgrrÚdtypeÚ    TypeErrorÚtyperO)rarfr_ÚserÚsingleÚkwd_names      rVÚ_get_data_to_aggregatez$SeriesGroupBy._get_data_to_aggregate sh€ð×'Ñ'ˆØ—‘ˆÙ Ô 0°·±Ô ;à%ˆHÜØ˜h˜Z {ܘ“:×&Ñ&Ð' q¨¨Ð.FðHóð ðˆ rUa§
    Examples
    --------
    >>> s = pd.Series([1, 2, 3, 4])
 
    >>> s
    0    1
    1    2
    2    3
    3    4
    dtype: int64
 
    >>> s.groupby([1, 1, 2, 2]).min()
    1    1
    2    3
    dtype: int64
 
    >>> s.groupby([1, 1, 2, 2]).agg('min')
    1    1
    2    3
    dtype: int64
 
    >>> s.groupby([1, 1, 2, 2]).agg(['min', 'max'])
       min  max
    1    1    2
    2    3    4
 
    The output column names can be controlled by passing
    the desired column names and aggregations as keyword arguments.
 
    >>> s.groupby([1, 1, 2, 2]).agg(
    ...     minimum='min',
    ...     maximum='max',
    ... )
       minimum  maximum
    1        1        2
    2        3        4
 
    .. versionchanged:: 1.3.0
 
        The resulting dtype will reflect the return value of the aggregating function.
 
    >>> s.groupby([1, 1, 2, 2]).agg(lambda x: x.astype(float).min())
    1    1.0
    2    3.0
    dtype: float64
    ÚtemplateÚseriesÚseries_examples)ÚinputÚexamplescó*•—t‰||g|¢­i|¤ŽS©N)ÚsuperÚapply)raÚfuncÚargsÚkwargsÚ    __class__s    €rVrzzSeriesGroupBy.applyàsø€ô ‰w‰}˜TÐ3 DÒ3¨FÑ3Ð3rU©rvÚklass©ÚengineÚ engine_kwargscóÌ—|du}d}|rt|«\}}i}t|t«r+t|«r|||d<|||d<t    ||«|i|¤ŽSt|t
j «rVt|«}||d<||d<|j|g|¢­i|¤Ž}|r |€J‚||_    |js|j«}|Stj|«}    |    r"|s |st|||    «t    ||    ««St|«r|j|g|¢­d|i|¤ŽS|j dk(r]|j"}
|j$j'g|j$j(|j*j,|
j.¬«S|j*j0dkDr|j2|g|¢­i|¤ŽS    |j2|g|¢­i|¤ŽS#t4$rˆ|j6|g|¢­i|¤Ž} t9j:dt=|«j>›dt@tC«¬«tE| |j*j,¬    «} |jG| «} | cYSwxYw)
Nr‚rƒr©r_Úindexrkéz)Pinning the groupby key to each group in z¯.agg is deprecated, and cases that relied on it will raise in a future version. If your operation requires utilizing the groupby keys, iterate over the groupby object instead.©Ú
stacklevel©r†)$r'Ú
isinstanceÚstrr8ÚgetattrrÚIterabler%Ú_aggregate_multiple_funcsÚcolumnsÚas_indexÚ reset_indexÚcomÚget_cython_funcr(Ú_aggregate_with_numbaÚngroupsrir]Ú _constructorr_Ú_grouperÚ result_indexrkÚnkeysÚ_python_agg_generalÚKeyErrorÚ_aggregate_namedÚwarningsÚwarnrmrOÚ FutureWarningrr6Ú_wrap_aggregated_output) rar{r‚rƒr|r}Ú
relabelingrÚretÚcyfuncr]Úresults             rVÚ    aggregatezSeriesGroupBy.aggregateès“€à˜T\ˆ
؈٠Ü0°Ó8‰MˆGT؈Fä dœCÔ  Ü˜vÔ&¨6Ð+=ð
$*xÑ ØÐ(Ø*7Ñ'Ø&”7˜4 Ó&¨Ð7°Ñ7Ð 7ä ˜œcŸl™lÔ +ô(¨Ó-ˆDØ%ˆF8Ñ Ø&3ˆF?Ñ #Ø0$×0Ñ0°ÐG¸ÒGÀÑGˆCÙàÐ*Ð*Ð*Ø%” Ø—=’=Ø—o‘oÓ'ØˆJô×(Ñ(¨Ó.ˆFÙ™d©6Ü& t¨T°6Ô:Ø,”w˜t VÓ,Ó.Ð.ä˜vÔ&Ø1t×1Ñ1ØðØòØ/<ðØ@Fñðð|‰|˜qÒ ð
×/Ñ/Ø—x‘x×,Ñ,ØØŸ™Ÿ™ØŸ-™-×4Ñ4ØŸ)™)ð    -óðð}‰}×"Ñ" QÒ&Ø/t×/Ñ/°ÐF°tÒF¸vÑFÐFð Ø/t×/Ñ/°ÐF°tÒF¸vÑFÐFøÜò ð/˜×.Ñ.¨tÐE°dÒE¸fÑEä— ‘ Ø?ܘD“z×*Ñ*Ð+ð,?ð?ô
"Ü/Ó1õô  ¨d¯m©m×.HÑ.HÔIØ×5Ñ5°fÓ=Ø’ ð' úsÆ<GÇBI#É"I#có:‡‡‡—‰}tj‰«Š|‰k7r tj‰}t|||«ˆˆˆfd„}|j}|j
j ||«}|j||j¬«}    |j|    «S)Ncó•—‰|g‰¢­i‰¤ŽSrxrT©Úxr|r{r}s €€€rVú<lambda>z3SeriesGroupBy._python_agg_general.<locals>.<lambda>D󸀑d˜1Ð.˜tÒ. vÑ.€rU)r_)
r“Úis_builtin_funcÚ_builtin_table_aliasr(rir˜Ú
agg_seriesr—r_r¡)
rar{r|r}Ú    orig_funcÚaliasÚfr]r¥Úress
 ```      rVr›z!SeriesGroupBy._python_agg_general>sŒú€Øˆ    Ü×"Ñ" 4Ó(ˆØ ˜Ò Ü×,Ñ,¨TÑ2ˆEÜ " 4¨°EÔ :Ý .ˆà×'Ñ'ˆØ—‘×)Ñ)¨#¨qÓ1ˆØ×јv¨C¯H©HÐÓ5ˆØ×+Ñ+¨CÓ0Ð0rUcóô—t|t«rW|jr td«‚d}t    j
|t t«¬«t|j««}nQtd„|D««r*|Dcgc]}t|ttf«s||fn|‘Œ }}nd„|D«}t||«}i}tj|dd«5t|«D]8\}\}    }
t!j"|    |¬«} |j$|
g|¢­i|¤Ž|| <Œ:    ddd«td    „|j'«D««r9d
d lm} | |j'«d |D cgc]} | j,‘Œc} ¬ «} | S|j«D cic]\} }| j.|“Œ}} }|j0j3|d¬«}t5d„|D««|_|Scc}w#1swYŒÊxYwcc} wcc}} w)Nznested renamer is not supportedzŠPassing a dictionary to SeriesGroupBy.agg is deprecated and will raise in a future version of pandas. Pass a list of aggregations instead.)ÚmessageÚcategoryr‰c3óHK—|]}t|ttf«–—Œy­wrx)r‹ÚtupleÚlist©Ú.0rªs  rVú    <genexpr>z:SeriesGroupBy._aggregate_multiple_funcs.<locals>.<genexpr>]sèø€Ò;°!”˜A¤¤t˜}×-Ñ;ùs‚ "c3óNK—|]}tj|«xs|–—Œy­wrx)r“Úget_callable_name)r»r²s  rVr¼z:SeriesGroupBy._aggregate_multiple_funcs.<locals>.<genexpr>as#èø€ÒB¸”s×,Ñ,¨QÓ/Ò4°1Ó4ÑBùs‚#%r‘T)ÚlabelÚpositionc3ó<K—|]}t|t«–—Œy­wrx)r‹r)rºs  rVr¼z:SeriesGroupBy._aggregate_multiple_funcs.<locals>.<genexpr>lsèø€ÒB¨AŒz˜!œY×'ÑBùs‚r©Úconcatr‡)ÚaxisÚkeysrŠc3ó4K—|]}|j–—Œy­wrx)r¿)r»Úkeys  rVr¼z:SeriesGroupBy._aggregate_multiple_funcs.<locals>.<genexpr>vsèø€Ò<¨S˜sŸyyÑ<ùó‚)r‹Údictr‘rržrŸr rr¹ÚitemsÚanyr¸Úzipr“Ú temp_setattrÚ    enumerater*Ú    OutputKeyr¦ÚvaluesÚpandasrÃr¿rÀr]Ú_constructor_expanddimr2r)raÚargr|r}ÚmsgrªrÚresultsÚidxr_r{rÇrÃÚres_dfÚvalÚindexed_outputÚoutputs                 rVrz'SeriesGroupBy._aggregate_multiple_funcsKsÒ€Ü cœ4Ô  Ø}Š}ä(Ð)JÓKÐKð/ðô
— ‘ ØÜ*Ü/Ó1õô
˜3Ÿ9™9›;Ó'‘Ü Ñ;°sÔ;Ô ;ØNQÖRȤ¨A´´t¨}Ô!=Aq‘6À1ÑDÐRˆCÑRñC¸cÔBˆGܐg˜sÓ#ˆCà<>ˆÜ × Ñ ˜d J°Ó 5ñ    Eô&/¨s£^ò EÑ!‘\d˜DÜ—n‘n¨4¸#Ô>Ø-˜tŸ~™~¨dÐD°TÒD¸VÑD˜’ ñ E÷    Eô ÑB°·±Ó1AÔBÔ BÝ %áØ—‘Ó  qÀWÖ/M¸c°·    ³    Ò/MôˆFðˆMà<C¿M¹M»O×L±°°S˜#Ÿ,™,¨Ñ+ÐLˆÑLØ—‘×0Ñ0°ÀtÐ0ÓLˆÜÑ<°GÔ<Ó<ˆŒàˆ ùò5S÷    Eð    Eüò0NùóMsÁ>#GÃAG#ÅG/ ÆG4Ç#G,có4—t|«dk(rb|r |j}n|jj}|jj g|jj ||j¬«S|€J‚t|dt«rs|jj}|jj||¬«}|j|«}|jd¬«}|jj |_|St|dttf«ry|j|||¬«}    t|    t«r|jj |    _|j s,|r*|j#|    «}    t%t|    ««|    _|    S|jj ||jj|jj ¬«}    |j s*|j#|    «}    t%t|    ««|    _|j|    «S)aÃ
        Wrap the output of SeriesGroupBy.apply into the expected result.
 
        Parameters
        ----------
        data : Series
            Input data for groupby operation.
        values : List[Any]
            Applied output for each group.
        not_indexed_same : bool, default False
            Whether the applied outputs are not indexed the same as the group axes.
 
        Returns
        -------
        DataFrame or Series
        rr…rŠT)Ú future_stack©Únot_indexed_sameÚ is_transform)Údatar†r_)Úlenr†r˜r™r]r—r_rkr‹rÉrÒÚ_reindex_outputÚstackr6r)Ú_concat_objectsr‘Ú_insert_inaxis_grouperr5)
raràrÐrÞrßÚ    res_indexr†r×Úres_serr¥s
          rVÚ_wrap_applied_outputz"SeriesGroupBy._wrap_applied_outputzs€ô. ˆv‹;˜!Ò áà ŸJ™J‘    à ŸM™M×6Ñ6    à—8‘8×(Ñ(ØØ—X‘X—]‘]ØØ—j‘jð    )óð ð Ð!Ð!Ð!ä f˜Q‘i¤Ô &à—M‘M×.Ñ.ˆEØ—X‘X×4Ñ4°VÀ5Ð4ÓIˆFØ×)Ñ)¨&Ó1ˆFð—l‘l°lÓ5ˆGØŸ8™8Ÿ=™=ˆGŒL؈NÜ ˜˜q™    ¤F¬IÐ#6Ô 7Ø×)Ñ)ØØ!1Ø)ð*óˆFô
˜&¤&Ô)Ø"Ÿh™hŸm™m” Ø—=’=Ñ%5Ø×4Ñ4°VÓ<Ü,¬S°«[Ó9” ؈Mð—X‘X×*Ñ*Ø 4§=¡=×#=Ñ#=ÀDÇHÁHÇMÁMð+óˆFð—=’=Ø×4Ñ4°VÓ<Ü,¬S°«[Ó9” Ø×'Ñ'¨Ó/Ð /rUcóB—i}d}|jj|j|j¬«D]f\}}tj |d|«||g|¢­i|¤Ž}t j|«}|s"t j||j«d}|||<Œh|S)NF©rÄr_T)
r˜Ú get_iteratorrirÄÚobjectÚ __setattr__r+Úextract_resultÚcheck_result_arrayrk)    rar{r|r}r¥Ú initializedr_ÚgrouprÚs             rVrzSeriesGroupBy._aggregate_namedÁs¨€ðˆØˆ àŸ=™=×5Ñ5Ø × %Ñ %¨D¯I©Ið6ó
ò     "‰KˆD%ô × Ñ ˜u f¨dÔ 3á˜%Ð1 $Ò1¨&Ñ1ˆFÜ×'Ñ'¨Ó/ˆFÙä×&Ñ& v¨u¯{©{Ô;Ø" Ø!ˆF4ŠLð     "ðˆ rUa7
    >>> ser = pd.Series([390.0, 350.0, 30.0, 20.0],
    ...                 index=["Falcon", "Falcon", "Parrot", "Parrot"],
    ...                 name="Max Speed")
    >>> grouped = ser.groupby([1, 1, 2, 2])
    >>> grouped.transform(lambda x: (x - x.mean()) / x.std())
        Falcon    0.707107
        Falcon   -0.707107
        Parrot    0.707107
        Parrot   -0.707107
        Name: Max Speed, dtype: float64
 
    Broadcast result of the transformation
 
    >>> grouped.transform(lambda x: x.max() - x.min())
    Falcon    40.0
    Falcon    40.0
    Parrot    10.0
    Parrot    10.0
    Name: Max Speed, dtype: float64
 
    >>> grouped.transform("mean")
    Falcon    370.0
    Falcon    370.0
    Parrot     25.0
    Parrot     25.0
    Name: Max Speed, dtype: float64
 
    .. versionchanged:: 1.3.0
 
    The resulting dtype will reflect the return value of the passed ``func``,
    for example:
 
    >>> grouped.transform(lambda x: x.astype(int).max())
    Falcon    390
    Falcon    390
    Parrot     30
    Parrot     30
    Name: Max Speed, dtype: int64
    ©r€Úexamplecó4—|j|g|¢­||dœ|¤ŽS©Nr©Ú
_transform©rar{r‚rƒr|r}s      rVÚ    transformzSeriesGroupBy.transformó4€ðˆt‰Ø ð
Øñ
Ø &°mñ
ØGMñ
ð    
rUc ó<—|dk(sJ‚|j}    |jjd|j||fi|¤Ž}|j||jj|j¬«S#t$r!}t |›d|j ›d«|‚d}~wwxYw)Nrrùz is not supported for z dtype©r†r_) rir˜Ú_cython_operationÚ_valuesÚNotImplementedErrorrlrkr—r]r†r_)raÚhowrfrÄr}r]r¥Úerrs        rVÚ_cython_transformzSeriesGroupBy._cython_transform    s¦€ðqŠyЈyà×'Ñ'ˆð    VØ4T—]‘]×4Ñ4ؘSŸ[™[¨#¨tñØ7=ñˆFð×Ñ ¨d¯h©h¯n©nÀ3Ç8Á8ÐÓLÐLøô    #ò    Vä˜s˜eÐ#9¸#¿)¹)¸ÀFÐKÓLÐRUÐ Uûð    Vús•*A1Á1    BÁ:BÂBcó`—t|«r|j|g|¢­d|i|¤ŽSt|«sJ‚t|j«}g}|j
j |j|j¬«D]K\}}    tj|    d|«||    g|¢­i|¤Ž}
|j||
|    j¬««ŒM|r ddl m} | |«} |j| «} n*|jj!t"j$¬«} |jj&| _| S)z3
        Transform with a callable `func`.
        rƒrêr_rŠrr©rk)r8Ú_transform_with_numbaÚcallablermr]r˜rërirÄrìríÚappendr†Úpandas.core.reshape.concatrÃÚ_set_result_index_orderedr—ÚnpÚfloat64r_)rar{r‚rƒr|r}r€rÕr_rñr³rÃÚ concatenatedr¥s              rVÚ_transform_generalz SeriesGroupBy._transform_generals!€ô ˜6Ô "Ø-4×-Ñ-ØðØòØ+8ðØ<Bñð ô˜Œ~Ј~ܐT—X‘X“ˆàˆØŸ=™=×5Ñ5Ø × %Ñ %¨D¯I©Ið6ó
ò    :‰KˆD%ô × Ñ ˜u f¨dÔ 3ِuÐ.˜tÒ. vÑ.ˆCà N‰N™5 ¨E¯K©KÔ8Õ 9ð    :ñ Ý 9á! '›?ˆLØ×3Ñ3°LÓA‰Fà—X‘X×*Ñ*´·±Ð*Ó<ˆFà—h‘h—m‘mˆŒ ؈ rUTc󄇇‡‡ —t‰t«rˆˆˆfd„Š nˆˆˆfd„Š dˆ fd„ }    |jj|j|j
¬«Dcgc]\}}||«r|j |«‘Œ }}}|j||«}
|
Scc}}w#ttf$r}    td«|    ‚d}    ~    wwxYw)a°
        Filter elements from groups that don't satisfy a criterion.
 
        Elements from groups are filtered if they do not satisfy the
        boolean criterion specified by func.
 
        Parameters
        ----------
        func : function
            Criterion to apply to each group. Should return True or False.
        dropna : bool
            Drop groups that do not pass the filter. True by default; if False,
            groups that evaluate False are filled with NaNs.
 
        Returns
        -------
        Series
 
        Notes
        -----
        Functions that mutate the passed object can produce unexpected
        behavior or errors and are not supported. See :ref:`gotchas.udf-mutation`
        for more details.
 
        Examples
        --------
        >>> df = pd.DataFrame({'A' : ['foo', 'bar', 'foo', 'bar',
        ...                           'foo', 'bar'],
        ...                    'B' : [1, 2, 3, 4, 5, 6],
        ...                    'C' : [2.0, 5., 8., 1., 2., 9.]})
        >>> grouped = df.groupby('A')
        >>> df.groupby('A').B.filter(lambda x: x.mean() > 3.)
        1    2
        3    4
        5    6
        Name: B, dtype: int64
        có(•—t|‰«‰i‰¤ŽSrx©rr©s €€€rVr«z&SeriesGroupBy.filter.<locals>.<lambda>dsø€Ð 0¤¨¨4Ó 0°$РA¸&Ñ A€rUcó•—‰|g‰¢­i‰¤ŽSrxrTr©s €€€rVr«z&SeriesGroupBy.filter.<locals>.<lambda>fsø€¡ QР8¨Ò 8°Ñ 8€rUcó2•—‰|«}t|«xr|Srx)r")rªÚbÚwrappers  €rVÚtrue_and_notnaz,SeriesGroupBy.filter.<locals>.true_and_notnaisø€Ù˜“
ˆAܘ“8’> Ð !rUrêz'the filter must return a boolean resultN)ÚreturnÚbool)
r‹rŒr˜rërirÄÚ
_get_indexÚ
ValueErrorrlÚ _apply_filter) rar{Údropnar|r}rr_rñÚindicesrÚfilteredrs  ` ``      @rVÚfilterzSeriesGroupBy.filter=sÃû€ôL dœCÔ  ÝA‰Gå8ˆGõ    "ð        Pð$(§=¡=×#=Ñ#=Ø×-Ñ-°D·I±Ið$>ó$÷áD˜%ñ" %Ô(ð    —‘ Õ%ðˆGñð×%Ñ% g¨vÓ6ˆØˆùóøôœIÐ&ò    PÜÐEÓFÈCÐ Oûð    Pús)«4BÁ#BÂBÂBÂB?Â. B:Â:B?cóä—|jj\}}}|jj}t    j
||d¬«\}}|jj r|dk\}||}||}t||g|t|«fd|¬«}    |r |    dk\}|j«r
||}|    |}    t|    d«}tj|||¬«}
t|
«}
|jj} |jj|
| |jj ¬«} |j"s*|j%| «} t't| ««| _|j+| d¬«S)    a°
        Return number of unique elements in the group.
 
        Returns
        -------
        Series
            Number of unique values within each group.
 
        Examples
        --------
        For SeriesGroupby:
 
        >>> lst = ['a', 'a', 'b', 'b']
        >>> ser = pd.Series([1, 2, 3, 3], index=lst)
        >>> ser
        a    1
        a    2
        b    3
        b    3
        dtype: int64
        >>> ser.groupby(level=0).nunique()
        a    2
        b    1
        dtype: int64
 
        For Resampler:
 
        >>> ser = pd.Series([1, 2, 3, 3], index=pd.DatetimeIndex(
        ...                 ['2023-01-01', '2023-01-15', '2023-02-01', '2023-02-15']))
        >>> ser
        2023-01-01    1
        2023-01-15    2
        2023-02-01    3
        2023-02-15    3
        dtype: int64
        >>> ser.resample('MS').nunique()
        2023-01-01    2
        2023-02-01    1
        Freq: MS, dtype: int64
        F)Úuse_na_sentinelÚsortr)ÚlabelsÚshaper!ÚxnullÚfirst)Ú    minlengthrü)Ú
fill_value)r˜Ú
group_infor]rþr#Ú    factorizeÚhas_dropped_nar7rárËrr
Úbincountrr™r—r_r‘rår5r†râ) rarÚidsÚ_r–rØÚcodesÚuniquesÚmaskÚ group_indexr³Úrir¥s              rVÚnuniquezSeriesGroupBy.nunique{s\€ðRŸ-™-×2Ñ2‰ˆˆQØh‰h×шÜ#×-Ñ-¨cÀ6ÐPUÔV‰ˆˆwà =‰=× 'Ò 'ؘ!‘8ˆDؐd‘)ˆCؘ$‘KˆEä%ؘ<ØœC ›LÐ)ØØô    
ˆ ñ Ø !Ñ#ˆDؐ{‰{Œ}ؘ$‘iØ)¨$Ñ/ ä˜+ wÓ/ˆÜk‰k˜#˜t˜e™*°Ô8ˆÜ˜3Óˆà ]‰]× 'Ñ 'ˆØ%)§X¡X×%:Ñ%:Ø r §¡§ ¡ ð&;ó&
ˆð}Š}Ø×0Ñ0°Ó8ˆFÜ(¬¨V«Ó5ˆFŒLØ×#Ñ# F°qÐ#Ó9Ð9rUcó(•—t‰||||¬«S)N)Ú percentilesÚincludeÚexclude)ryÚdescribe)rar5r6r7r~s    €rVr8zSeriesGroupBy.describeÇs!ø€ä‰wÑØ#¨W¸gð ó
ð    
rUcóÊ ‡+‡,—|rdnd}|€|j||||¬«}||_|Sddlm}ddlm}    |j j\}
} } |jj} |j j|jjgz} t| jt«s|Stj|«s>|j!t"j$||||¬«}||_| |j&_
|S|
dk7}|
|| |} }
|€t)j*| d    ¬
«\}}d „}nc|    t#| d ¬ «|d    ¬«}t-d|j«}|j.}|j1|j2d    |j4¬«}d„}t|jt6«r=t-t8|«}tj:|j<|j>|
f«}ntj:||
f«}|
|||}}
dtj@|
dd|
ddk7«dz}tjBd|f}tE|
«s|}||tGdd««||tGdd««k7}tjBd    |f}tE| «s|}d    ||<tjHtj@tjB|d    f«d«}tKtjLtjNjQ||«¬«}|j jR}|Dcgc]
}||«‘Œ c}|||«gz}|j jTDcgc]}|jV‘Œc}|gz} |r2|ddk7}|jY«rd }n|||Dcgc]}||‘Œ    }}}|r†|j[d«}tjHtjB|tE|
«f«}!|r5|
|dk(}"tjNj]|!|"d«||!«|}#n||!«}#||#z}|r>|€<|r|
||n|
|}$tj:|r|n| |$f«}|||d|c}|d<|gtj^tE|«d¬«Š+|ddD]#}‰+tjBd    |dd|ddk7fzŠ+Œ%‰+ja«tE| d«c}%Š,tjLtjb|%«‰,«tjdtjb‰,«|%«g}&‰+jg«dz
|dg}'||&|'d d¬«\} }|tjh|dk7||d«}|r0tj:|r|n| |&df«}|||&d|c}|&d<dˆ+ˆ,fd„ }(|ddD)cgc]
})|(|)«‘Œ }})|jk|&d«tm| || d ¬«}*to|j«r tq|«}|jjs||*|¬«}|jts|jw«}|Scc}wcc}wcc}wcc})w)NÚ
proportionÚcount)Ú    normalizer!Ú    ascendingrr)Úget_join_indexers)Úcut)r<r!r=ÚbinséÿÿÿÿT)r!có —||SrxrT©ÚlabÚincs  rVr«z,SeriesGroupBy.value_counts.<locals>.<lambda>þs
€ C¨¡H€rUF©Úcopy)Úinclude_lowestrG)Ú
allow_fillr'có:—||jjdS)NrA)Ú _multiindexr.rCs  rVr«z,SeriesGroupBy.value_counts.<locals>.<lambda>    s€ C¨¡H×$8Ñ$8×$>Ñ$>¸rÑ$B€rUr‡)ÚrepeatsÚfloatrrÚleft)r!rcó6•—tj|‰‰«Srx)r
Úrepeat)Ú    lev_codesÚdiffÚnbins €€rVÚ build_codesz/SeriesGroupBy.value_counts.<locals>.build_codes]sø€Ü—y‘y ¨4¡°$Ó7Ð7rU)Úlevelsr.ÚnamesÚverify_integrityrü)rQú
np.ndarrayrrX)<Ú _value_countsr_Úpandas.core.reshape.merger>Úpandas.core.reshape.tiler?r˜r(r]rþrVr‹rkrr
Úiterablerzr6Ú value_countsr†r#r)rÚ
categoriesÚtaker.Ú    _na_valuerrÚlexsortrNÚrightÚnonzeroÚr_ráÚslicerRrrPÚaddÚreduceatÚreconstructed_codesÚ    groupingsÚ _group_indexÚallÚastypeÚatÚzerosÚsumÚarangeÚtileÚcumsumÚwhererr3rrr—r‘r’)-rar<r!r=r@rr_r¥r>r?r,r-rØÚ index_namesrnr0rDÚlevÚllabÚcat_serÚcat_objÚ lab_intervalÚsorterÚ    idchangesrÖÚlchangesrErcÚrepr.Ú level_codesÚpingrUÚdÚmÚaccÚcatÚncatrNrbrTrQÚmirRrSs-                                           @@rVr]zSeriesGroupBy.value_countsÍsù€ñ )‰|¨gˆà ˆ<Ø×'Ñ'Ø#¨$¸)ÈFð(óˆFðˆFŒK؈Må?Ý0à—M‘M×,Ñ,‰    ˆˆQØh‰h×шà—m‘m×)Ñ)¨T¯X©X¯]©]¨OÑ;ˆ ä c—i‘iÔ!1Ô 2Ø Ð ¤R§[¡[°Ô%6ð
—*‘*Ü×#Ñ#Ø#ØØ#Øð óˆCðˆCŒHØ)ˆCI‰IŒO؈Jðb‰yˆØt‘9˜c $™iˆSˆð ˆ<Ü!×+Ñ+¨C°dÔ;‰HˆCÙ,‰Dñœ& ¨5Ô1°4ÈÔMˆGܘ=¨'¯/©/Ó:ˆGØ×$Ñ$ˆCØ—(‘(Ø— ‘ ØØŸ=™=ðóˆCñ
CˆDä c—i‘i¤Ô /䤨#Ó.ˆLä—Z‘Z ×!2Ñ!2°L×4FÑ4FÈРLÓM‰Fä—Z‘Z  c 
Ó+ˆFàv‘;  F¡ ˆSˆðœŸ
™
 3 q r 7¨c°#°2¨hÑ#6Ó7¸Ñ:Ñ:ˆ    Üe‰eAyLÑ!ˆÜ3Œx؈Cñ˜œU 1 d›^Ó,±°S¼%ÀÀb»/Ó0JÑJˆÜe‰eD˜(NÑ#ˆÜ3Œx؈C؈ˆC‰Üg‰g”b—j‘j¤§¡ s¨D yÑ!1Ó2°1Ñ5Ó6ˆô”b—i‘i¬¯©¯©¸¸cÓ)BÔCˆð— ‘ ×1Ñ1ˆØ5:Ö; k‘[Õ!Ò;¹tÀCÈ»~Ð>NÑNˆØ04· ± ×0GÑ0GÖH¨$×#Ó#ÒHÈCÈ5ÑPˆá ؘ‘9 ‘?ˆD؏x‰xŒzؑࠠ™YÈeÖ(T¸{¨°TÓ):Ð(TUÐ(Tá Ø—*‘*˜WÓ%ˆCÜ—‘œŸ™˜c¤3 s£8˜mÑ,Ó-ˆAÙØ˜˜r™    ‘NÜ—‘—    ‘    ˜!˜Q Ô#Ù˜!“f˜T‘l‘á˜!“fØ 3‰JˆCá DLÙ$*#c‘(˜4’.°°C±ˆCÜ—Z‘Z©    ¡¸°t¸SРAÓBˆFØ  ™[¨%°©)°FÑ*;ˆNˆCr‘à Ñ ô—8‘8œC ›H¨FÔ3ˆDØ$ S b˜zò I ØœŸ™˜d K°° O°{À3ÀBÐ7GÑ$GÐGÑHÑH‘ð I🙛¤S¨°©£_ˆJˆD$ä—I‘IœbŸi™i¨›o¨tÓ4´b·g±g¼b¿i¹iÈ»oÈtÓ6TÐUˆDà—[‘[“] QÑ&¨¨b©    Ð2ˆEñ
'ؐe %¨Vô‰FˆAˆsðˆÜ—h‘h˜s b™y¨#¨c©(°AÓ6áÜŸ™©I¡S¸C¸4ÀÀaÁÐ$IÓJØ # F¡ ¨T°"©X°fÑ-= T˜"‘Xö 8ð>CÀ3ÀB¸ZÖH°    ‘[ Õ+ÐHˆEÐHØ L‰L˜˜b™Ô "ä Ø ¨kÈEô
ˆô ˜CŸI™IÔ &ܘsÓ#ˆCØ—‘×&Ñ& s°"¸4Ð&Ó@ˆØ}Š}Ø×'Ñ'Ó)ˆF؈ ùòI<ùÚHùò)Uùò`IsÌ1YÍ&YÎ% Y×Y c    óê—tjt|«j›dt|j«j›dt
t «¬«|jd||||||¬«}|S)a‹
        Fill NA/NaN values using the specified method within groups.
 
        .. deprecated:: 2.2.0
            This method is deprecated and will be removed in a future version.
            Use the :meth:`.SeriesGroupBy.ffill` or :meth:`.SeriesGroupBy.bfill`
            for forward or backward filling instead. If you want to fill with a
            single value, use :meth:`Series.fillna` instead.
 
        Parameters
        ----------
        value : scalar, dict, Series, or DataFrame
            Value to use to fill holes (e.g. 0), alternately a
            dict/Series/DataFrame of values specifying which value to use for
            each index (for a Series) or column (for a DataFrame).  Values not
            in the dict/Series/DataFrame will not be filled. This value cannot
            be a list. Users wanting to use the ``value`` argument and not ``method``
            should prefer :meth:`.Series.fillna` as this
            will produce the same result and be more performant.
        method : {{'bfill', 'ffill', None}}, default None
            Method to use for filling holes. ``'ffill'`` will propagate
            the last valid observation forward within a group.
            ``'bfill'`` will use next valid observation to fill the gap.
        axis : {0 or 'index', 1 or 'columns'}
            Unused, only for compatibility with :meth:`DataFrameGroupBy.fillna`.
        inplace : bool, default False
            Broken. Do not set to True.
        limit : int, default None
            If method is specified, this is the maximum number of consecutive
            NaN values to forward/backward fill within a group. In other words,
            if there is a gap with more than this number of consecutive NaNs,
            it will only be partially filled. If method is not specified, this is the
            maximum number of entries along the entire axis where NaNs will be
            filled. Must be greater than 0 if not None.
        downcast : dict, default is None
            A dict of item->dtype of what to downcast if possible,
            or the string 'infer' which will try to downcast to an appropriate
            equal type (e.g. float64 to int64 if possible).
 
        Returns
        -------
        Series
            Object with missing values filled within groups.
 
        See Also
        --------
        ffill : Forward fill values within a group.
        bfill : Backward fill values within a group.
 
        Examples
        --------
        For SeriesGroupBy:
 
        >>> lst = ['cat', 'cat', 'cat', 'mouse', 'mouse']
        >>> ser = pd.Series([1, None, None, 2, None], index=lst)
        >>> ser
        cat    1.0
        cat    NaN
        cat    NaN
        mouse  2.0
        mouse  NaN
        dtype: float64
        >>> ser.groupby(level=0).fillna(0, limit=1)
        cat    1.0
        cat    0.0
        cat    NaN
        mouse  2.0
        mouse  0.0
        dtype: float64
        ú´.fillna is deprecated and will be removed in a future version. Use obj.ffill() or obj.bfill() for forward or backward filling instead. If you want to fill with a single value, use ú.fillna insteadrˆÚfillna©ÚvalueÚmethodrÄÚinplaceÚlimitÚdowncast©ržrŸrmrOr]r rÚ _op_via_apply©rar‹rŒrÄrrŽrr¥s        rVr‰zSeriesGroupBy.fillnans‚€ô^     ‰ ܐD‹z×"Ñ"Ð#ð$!ô"& d§h¡h£×!8Ñ!8Р9¸ð Jô Ü'Ó)õ     
ð×#Ñ#Ø ØØØØØØð$ó
ˆðˆ rUc ó0—|jd||dœ|¤Ž}|S)a¢
        Return the elements in the given *positional* indices in each group.
 
        This means that we are not indexing according to actual values in
        the index attribute of the object. We are indexing according to the
        actual position of the element in the object.
 
        If a requested index does not exist for some group, this method will raise.
        To get similar behavior that ignores indices that don't exist, see
        :meth:`.SeriesGroupBy.nth`.
 
        Parameters
        ----------
        indices : array-like
            An array of ints indicating which positions to take in each group.
        axis : {0 or 'index', 1 or 'columns', None}, default 0
            The axis on which to select elements. ``0`` means that we are
            selecting rows, ``1`` means that we are selecting columns.
            For `SeriesGroupBy` this parameter is unused and defaults to 0.
 
            .. deprecated:: 2.1.0
                For axis=1, operate on the underlying object instead. Otherwise
                the axis keyword is not necessary.
 
        **kwargs
            For compatibility with :meth:`numpy.take`. Has no effect on the
            output.
 
        Returns
        -------
        Series
            A Series containing the elements taken from each group.
 
        See Also
        --------
        Series.take : Take elements from a Series along an axis.
        Series.loc : Select a subset of a DataFrame by labels.
        Series.iloc : Select a subset of a DataFrame by positions.
        numpy.take : Take elements from an array along an axis.
        SeriesGroupBy.nth : Similar to take, won't raise if indices don't exist.
 
        Examples
        --------
        >>> df = pd.DataFrame([('falcon', 'bird', 389.0),
        ...                    ('parrot', 'bird', 24.0),
        ...                    ('lion', 'mammal', 80.5),
        ...                    ('monkey', 'mammal', np.nan),
        ...                    ('rabbit', 'mammal', 15.0)],
        ...                   columns=['name', 'class', 'max_speed'],
        ...                   index=[4, 3, 2, 1, 0])
        >>> df
             name   class  max_speed
        4  falcon    bird      389.0
        3  parrot    bird       24.0
        2    lion  mammal       80.5
        1  monkey  mammal        NaN
        0  rabbit  mammal       15.0
        >>> gb = df["name"].groupby([1, 1, 2, 2, 2])
 
        Take elements at positions 0 and 1 along the axis 0 in each group (default).
 
        >>> gb.take([0, 1])
        1  4    falcon
           3    parrot
        2  2      lion
           1    monkey
        Name: name, dtype: object
 
        We may take elements using negative integers for positive indices,
        starting from the end of the object, just like with Python lists.
 
        >>> gb.take([-1, -2])
        1  3    parrot
           4    falcon
        2  0    rabbit
           1    monkey
        Name: name, dtype: object
        ©rrÄ©r_©r‘©rarrÄr}r¥s     rVr_zSeriesGroupBy.takeÐs&€ðh$×#Ñ#ÐQ°GÀ$ÑQÈ&ÑQˆØˆ rUc óš—|tjurd}|dk7r|j    d|||dœ|¤Ž}|Sd„}|j    d|||dœ|¤ŽS)aÎ
        Return unbiased skew within groups.
 
        Normalized by N-1.
 
        Parameters
        ----------
        axis : {0 or 'index', 1 or 'columns', None}, default 0
            Axis for the function to be applied on.
            This parameter is only for compatibility with DataFrame and is unused.
 
            .. deprecated:: 2.1.0
                For axis=1, operate on the underlying object instead. Otherwise
                the axis keyword is not necessary.
 
        skipna : bool, default True
            Exclude NA/null values when computing the result.
 
        numeric_only : bool, default False
            Include only float, int, boolean columns. Not implemented for Series.
 
        **kwargs
            Additional keyword arguments to be passed to the function.
 
        Returns
        -------
        Series
 
        See Also
        --------
        Series.skew : Return unbiased skew over requested axis.
 
        Examples
        --------
        >>> ser = pd.Series([390., 350., 357., np.nan, 22., 20., 30.],
        ...                 index=['Falcon', 'Falcon', 'Falcon', 'Falcon',
        ...                        'Parrot', 'Parrot', 'Parrot'],
        ...                 name="Max Speed")
        >>> ser
        Falcon    390.0
        Falcon    350.0
        Falcon    357.0
        Falcon      NaN
        Parrot     22.0
        Parrot     20.0
        Parrot     30.0
        Name: Max Speed, dtype: float64
        >>> ser.groupby(level=0).skew()
        Falcon    1.525174
        Parrot    1.457863
        Name: Max Speed, dtype: float64
        >>> ser.groupby(level=0).skew(skipna=False)
        Falcon         NaN
        Parrot    1.457863
        Name: Max Speed, dtype: float64
        r©rÄÚskipnarfcó2—td|j›«‚©Nz"'skew' is not supported for dtype=©rlrk©r]s rVÚaltzSeriesGroupBy.skew.<locals>.altsó€ôÐ@ÀÇÁÀ ÐLÓMÐ MrU©rŸršrf©Úskew©rÚ
no_defaultr‘Ú_cython_agg_general©rarÄršrfr}r¥rŸs       rVr£zSeriesGroupBy.skew's…€ð~ ”3—>‘>Ñ !؈Dà 1Š9Ø'T×'Ñ'ØðàØØ)ñ    ð
ñ ˆFðˆMò    Nð
(ˆt×'Ñ'Ø ð
Ø F¸ñ
ØIOñ
ð    
rUcó—t|«}|Srx©r-©rar¥s  rVÚplotzSeriesGroupBy.plot|ó€ô˜TÓ"ˆØˆ rUcó~—ttj||¬«}|j}|j    ||d¬«}|S©N)ÚnÚkeepT)rÞ)rr6ÚnlargestriÚ_python_apply_general©rar¯r°r²ràr¥s      rVr±zSeriesGroupBy.nlargest‚s?€ô ”F—O‘O q¨tÔ 4ˆØ×(Ñ(ˆð×+Ñ+¨A¨tÀdÐ+ÓKˆØˆ rUcó~—ttj||¬«}|j}|j    ||d¬«}|Sr®)rr6Ú    nsmallestrir²r³s      rVrµzSeriesGroupBy.nsmallestsA€ô ”F×$Ñ$¨°Ô 5ˆØ×(Ñ(ˆð×+Ñ+¨A¨tÀdÐ+ÓKˆØˆ rUcó*—|jd||¬«S)NÚidxmin©rÄrš©Ú_idxmax_idxmin©rarÄršs   rVr·zSeriesGroupBy.idxmin˜ó€ð×"Ñ" 8°$¸vÐ"ÓFÐFrUcó*—|jd||¬«S)NÚidxmaxr¸r¹r»s   rVr¾zSeriesGroupBy.idxmaxžr¼rUcó0—|jd|||¬«}|S)NÚcorr)ÚotherrŒÚ min_periodsr–)rarÁrŒrÂr¥s     rVrÀzSeriesGroupBy.corr¤s)€ð×#Ñ#Ø ˜%¨¸Kð$ó
ˆðˆ rUcó0—|jd|||¬«}|S)NÚcov)rÁrÂÚddofr–)rarÁrÂrÅr¥s     rVrÄzSeriesGroupBy.cov°s)€ð×#Ñ#Ø ˜¨K¸dð$ó
ˆðˆ rUcó&—|jd„«S)ax
        Return whether each group's values are monotonically increasing.
 
        Returns
        -------
        Series
 
        Examples
        --------
        >>> s = pd.Series([2, 1, 3, 4], index=['Falcon', 'Falcon', 'Parrot', 'Parrot'])
        >>> s.groupby(level=0).is_monotonic_increasing
        Falcon    False
        Parrot     True
        dtype: bool
        có—|jSrx)Úis_monotonic_increasing©rns rVr«z7SeriesGroupBy.is_monotonic_increasing.<locals>.<lambda>Êó € c×&AÑ&A€rU©rz©ras rVrÈz%SeriesGroupBy.is_monotonic_increasing¹ó€ð"z‰zÑAÓBÐBrUcó&—|jd„«S)ax
        Return whether each group's values are monotonically decreasing.
 
        Returns
        -------
        Series
 
        Examples
        --------
        >>> s = pd.Series([2, 1, 3, 4], index=['Falcon', 'Falcon', 'Parrot', 'Parrot'])
        >>> s.groupby(level=0).is_monotonic_decreasing
        Falcon     True
        Parrot    False
        dtype: bool
        có—|jSrx)Úis_monotonic_decreasingrÉs rVr«z7SeriesGroupBy.is_monotonic_decreasing.<locals>.<lambda>ÝrÊrUrËrÌs rVrÐz%SeriesGroupBy.is_monotonic_decreasingÌrÍrUc  óD—|j    d|||||||||    |
| dœ | ¤Ž} | S)N) ÚbyÚaxÚgridÚ
xlabelsizeÚxrotÚ
ylabelsizeÚyrotÚfigsizer@ÚbackendÚlegend©Úhistr–)rarÒrÓrÔrÕrÖr×rØrÙr@rÚrÛr}r¥s              rVrÝzSeriesGroupBy.histßsP€ð $×#Ñ#Ø ð
àØØØ!ØØ!ØØØØØñ
ðñ
ˆðˆ rUcó&—|jd„«S)Ncó—|jSrxrrÉs rVr«z%SeriesGroupBy.dtype.<locals>.<lambda>s
€ c§i¡i€rUrËrÌs rVrkzSeriesGroupBy.dtypes€ðz‰zÑ/Ó0Ð0rUcó(—|jd«}|S)ac
        Return unique values for each group.
 
        It returns unique values for each of the grouped values. Returned in
        order of appearance. Hash table-based unique, therefore does NOT sort.
 
        Returns
        -------
        Series
            Unique values for each of the grouped values.
 
        See Also
        --------
        Series.unique : Return unique values of Series object.
 
        Examples
        --------
        >>> df = pd.DataFrame([('Chihuahua', 'dog', 6.1),
        ...                    ('Beagle', 'dog', 15.2),
        ...                    ('Chihuahua', 'dog', 6.9),
        ...                    ('Persian', 'cat', 9.2),
        ...                    ('Chihuahua', 'dog', 7),
        ...                    ('Persian', 'cat', 8.8)],
        ...                   columns=['breed', 'animal', 'height_in'])
        >>> df
               breed     animal   height_in
        0  Chihuahua        dog         6.1
        1     Beagle        dog        15.2
        2  Chihuahua        dog         6.9
        3    Persian        cat         9.2
        4  Chihuahua        dog         7.0
        5    Persian        cat         8.8
        >>> ser = df.groupby('animal')['breed'].unique()
        >>> ser
        animal
        cat              [Persian]
        dog    [Chihuahua, Beagle]
        Name: breed, dtype: object
        Úuniquer–rªs  rVrázSeriesGroupBy.uniques€ðP×#Ñ# HÓ-ˆØˆ rU)rbrCrr6)rfrr_ú
str | NonerrE©rr6rx©rr)©FF)
ràr6rÐz    list[Any]rÞrrßrrúDataFrame | Series©Fr)rrŒrfrrÄr?)r{r    rr6©T©rr)rrrúSeries | DataFrame)NNN)FTFNT)
r<rr!rr=rrrrrê)r‹zobject | ArrayLike | NonerŒúFillnaOptions | NonerÄúAxis | None | lib.NoDefaultrrrŽú
int | Nonerzdict | None | lib.NoDefaultrz Series | None)rrFrÄúAxis | lib.NoDefaultrr6)rÄrîršrrfrrr6©rr-)ér%)r¯Úintr°zLiteral['first', 'last', 'all']rr6)rÄrîršrrr6)ÚpearsonN)rÁr6rŒr@rÂrírr6©Nr‡)rÁr6rÂrírÅrírr6) NNTNNNNNé
NF)rÔrrÕrírÖú float | Noner×rírØrõrÙútuple[int, int] | Noner@úint | Sequence[int]rÚrârÛr)2rOrPrQrdrqrÚ_agg_examples_docrr0Úformatrzrr/r¦Úaggr›rrèrÚ#_SeriesGroupBy__examples_series_docrr1rùrr rr3r6r8r]rr¥r‰r_r£Úpropertyr«rRr±rµr·r¾rÀrÄrÈrÐrÝrkráÚ __classcell__©r~s@rVrXrXšs§ø„óð ',Àñ Ø#ð Ø3=ð à    ó ñð.    ó0ÐñdؐJÑ×&Ñ&Ø [Ð1BÑ%Cð    'ó    
óô
4ó ð
4ñ    Ð    Ð(9ÀÔJðQ°ÀTóQóKðQðf €Cò 1ó-ðf"'Ø"ð E0àðE0ððE0ðð    E0ð
ð E0ð
ó E0òNñ,#ð'    ó)ÐñV˜Ð*?Ô@Ù Ð!Ó"Ø,0Àó
ó#óAð
ð EFðMØðMØ&*ðMØ:AóMð"!Øð!à    ó!ôF<ô|J:ñX    ˆ‰Óõ
óð
ð ØØØ Øð _àð_ðð_ðð    _ð ð _ð
ó_ðF,0Ø'+Ø,/¯N©NØØ Ø03·±ð`à(ð`ð%ð`ð*ð    `ð
ð `ð ð `ð.ð`ð
ó`ðJ&)§^¡^ðUàðUð#ðUð
 
ó Uðr&)§^¡^ØØ"ð    S
à"ðS
ððS
ðð    S
ð
ó S
ðjÙˆ‰×    Ñ    Óòóóðñ    ˆ‰×     Ñ     Ó!àBIðØðØ ?ðà    òó"ðñ    ˆ×    Ñ    ×    !Ñ    !Ó"àBIðØðØ ?ðà    òó#ðñ    ˆ‰×    Ñ    Óà+.¯>©>È$ðGØ(ðGØCGðGà    òGó ðGñ
    ˆ‰×    Ñ    Óà+.¯>©>È$ðGØ(ðGØCGðGà    òGó ðGñ
    ˆ‰×    Ñ    Óð%.Ø"&ð        àð    ð"ð    ð ð        ð
 
ò     óð    ñ    ˆ‰×    Ñ    ÓàPQðØðØ*4ðØCMðà    òóððòCóðCð$òCóðCñ$    ˆ‰×    Ñ    Óð Ø ØØ!%Ø!Ø!%Ø!Ø*.Ø$&Ø"Øððð    ð
ð ð ð ððððð(ðð"ððððòóðð@Ùˆ‰×    Ñ    Óò1óóð1÷)rUrXcó‡—eZdZed«Zeeed¬«d)dddœd„«ZeZd„Z    d*d„Z
        d+                            d,d
„Z                                         d-d „Z         d.                            d/d „Z d „Zed«Zede¬«ee«dddœd„««Zd„Zd0d„Zd1d2d„Zd3ˆfd„ Zd)d4d„Zd    ddœ                    d5d„Zd6d„Zd*d„Zd1d7d„Zej<dd    f                            d8d„Zej<dd    f                            d8d„Z e!Z"                    d9                                            d:d„Z#ddej<d    dej<f                                            d;d„Z$ej<f                    d<d „Z%ej<dd    f                            d8d!„Z&e'ee(jRjT«d=d"„««Z)ee(jVjT«            d>                            d?d$„«Z+ee(jXjT«            d@                            dAd%„«Z,ee(jZjT«                                                            dB                                                                                                    dCd&„«Z-e'ee(j\jT«dDd'„««Z.ee(j^jT«ej<d    d#d    f                                            dEd(„«Z/ˆxZ0S)FÚDataFrameGroupBya‘
    Examples
    --------
    >>> data = {"A": [1, 1, 2, 2],
    ...         "B": [1, 2, 3, 4],
    ...         "C": [0.362838, 0.227877, 1.267767, -0.562860]}
    >>> df = pd.DataFrame(data)
    >>> df
       A  B         C
    0  1  1  0.362838
    1  1  2  0.227877
    2  2  3  1.267767
    3  2  4 -0.562860
 
    The aggregation is for each column.
 
    >>> df.groupby('A').agg('min')
       B         C
    A
    1  1  0.227877
    2  3 -0.562860
 
    Multiple aggregations
 
    >>> df.groupby('A').agg(['min', 'max'])
        B             C
      min max       min       max
    A
    1   1   2  0.227877  0.362838
    2   3   4 -0.562860  1.267767
 
    Select a column for aggregation
 
    >>> df.groupby('A').B.agg(['min', 'max'])
       min  max
    A
    1    1    2
    2    3    4
 
    User-defined function for aggregation
 
    >>> df.groupby('A').agg(lambda x: sum(x) + 2)
        B           C
    A
    1    5    2.590715
    2    9    2.704907
 
    Different aggregations per column
 
    >>> df.groupby('A').agg({'B': ['min', 'max'], 'C': 'sum'})
        B             C
      min max       sum
    A
    1   1   2  0.590715
    2   3   4  0.704907
 
    To control the output names with different aggregations per column,
    pandas supports "named aggregation"
 
    >>> df.groupby("A").agg(
    ...     b_min=pd.NamedAgg(column="B", aggfunc="min"),
    ...     c_sum=pd.NamedAgg(column="C", aggfunc="sum")
    ... )
       b_min     c_sum
    A
    1      1  0.590715
    2      3  0.704907
 
    - The keywords are the *output* column names
    - The values are tuples whose first element is the column to select
      and the second element is the aggregation to apply to that column.
      Pandas provides the ``pandas.NamedAgg`` namedtuple with the fields
      ``['column', 'aggfunc']`` to make it clearer what the arguments are.
      As usual, the aggregation can be a callable or a string alias.
 
    See :ref:`groupby.aggregate.named` for more.
 
    .. versionchanged:: 1.3.0
 
        The resulting dtype will reflect the return value of the aggregating function.
 
    >>> df.groupby("A")[["B"]].agg(lambda x: x.astype(float).min())
          B
    A
    1   1.0
    2   3.0
    r)rNrcóJ—t|fi|¤Ž\}}}}t|«}t|«r
||d<||d<t||||¬«}    |    j    «}
t |«s+|
)|j st|«r|
j«S|
S|r:tt|
«}
|
jdd…|f}
tt|
«}
||
_ |
€ód|vr|d=|d=t|«r|j|g|¢­d|i|¤ŽS|jjdkDr|j |g|¢­i|¤ŽS|s|r|j"|g|¢­i|¤Ž}
n||j$dk(r|j#|«}
|
St||gdi¬«}     | j    «}
tt|
«}
|j&jj)«|
_ |j s*|j/|
«}
t1t3|
««|
_|
S#t*$r)} dt-| «vr‚|j#|«}
Yd} ~ Œed} ~ wwxYw)Nr‚rƒ)r|r}r‡rTzNo objects to concatenate)r&r%r8r$rúrr‘rr’rr)Úilocrr•r˜ršr›Ú_aggregate_framerÄrirGrrŒrår5rár†) rar{r‚rƒr|r}r¢rÚorderÚopr¥Úgbars              rVr¦zDataFrameGroupBy.aggregateŒsA€ä+;¸DÑ+KÀFÑ+KÑ(ˆ
D˜' 5Ü# DÓ)ˆä ˜6Ô "ð &ˆF8Ñ Ø&3ˆF?Ñ #ä ˜$ ¨4¸Ô ?ˆØ—‘“ˆÜ˜DÔ! fÐ&8à—=’=¤\°$Ô%7Ø×)Ñ)Ó+Ð+à Ù ôœ) VÓ,ˆFØ—[‘[¢ E Ñ*ˆFÜœ) VÓ,ˆFð
%ˆFŒNà ˆ>ð˜6Ñ!ؘ8Ð$ؘ?Ð+ô˜vÔ&Ø1t×1Ñ1ØðØòØ/<ðØ@Fñðð}‰}×"Ñ" QÒ&à/t×/Ñ/°ÐF°tÒF¸vÑFÐFÙ™ð/˜×.Ñ.¨tÐE°dÒE¸fÑE‘à—‘˜a’ð×.Ñ.¨tÓ4Ø ô# 4¨$¨°bÀÔDðNØ ŸW™W›YFô "¤)¨VÓ4FØ%)×%>Ñ%>×%FÑ%F×%KÑ%KÓ%MF”Nà}Š}Ø×0Ñ0°Ó8ˆFÜ(¬¨V«Ó5ˆFŒLàˆ øô+"ò    9Ø2¼#¸c»(ÑBØð"×2Ñ2°4Ó8•Fûð    9úsÅ/G0Ç0    H"Ç9HÈH"cóÀ‡‡‡—‰}tj‰«Š|‰k7r tj‰}t|||«ˆˆˆfd„}|jdk(r|j ||j d¬«S|j}|jdk(r |j}t|j«s|j ||j «Si}t|j««D])\}    \}
} |jj| |«} | ||    <Œ+|j j#|«} |jj%d¬«| _ |j'| «S)Ncó•—‰|g‰¢­i‰¤ŽSrxrTr©s €€€rVr«z6DataFrameGroupBy._python_agg_general.<locals>.<lambda>ër¬rUrT©Úis_aggr‡F)Údeep)r“r­r®r(r–r²Ú _selected_objrirÄÚTrárrÎrÊr˜r¯r]r—rGr¡)rar{r|r}r°r±r²r]rÚrÖr_rnr¥r³s ```          rVr›z$DataFrameGroupBy._python_agg_generalås8ú€Øˆ    Ü×"Ñ" 4Ó(ˆØ ˜Ò Ü×,Ñ,¨TÑ2ˆEÜ " 4¨°EÔ :Ý .ˆà <‰<˜1Ò ð×-Ñ-¨a°×1CÑ1CÈDÐ-ÓQÐ Qà×'Ñ'ˆØ 9‰9˜Š>Ø—%‘%ˆCä3—;‘;Ôà×-Ñ-¨a°×1CÑ1CÓDÐ Dà')ˆÜ )¨#¯)©)«+Ó 6ò    !Ñ ˆC‘$˜Ø—]‘]×-Ñ-¨c°1Ó5ˆFØ ˆF3ŠKð    !ðh‰h×#Ñ# FÓ+ˆØ—k‘k×&Ñ&¨EÐ&Ó2ˆŒ Ø×+Ñ+¨CÓ0Ð0rUcó¾—|jjdk7r td«‚|j}i}|jj    ||j
«D]\}}||g|¢­i|¤Ž}|||<Œ|jj }    |jd|j
z
}
|jj||
|    ¬«} |j
dk(r | j} | S)Nr‡zNumber of keys must be 1©r†rr) r˜ršÚAssertionErrorrirërÄr™r\r]r—r ) rar{r|r}r]r¥r_Úgrp_dfÚfresr™Úother_axrcs             rVrz!DataFrameGroupBy._aggregate_framesÐ€Ø =‰=× Ñ  !Ò #Ü Ð!;Ó<Ð <à×'Ñ'ˆà79ˆØ ŸM™M×6Ñ6°s¸D¿I¹IÓFò     ‰LˆD&Ù˜Ð0 Ò0¨Ñ0ˆD؈F4ŠLð     ð—}‘}×1Ñ1ˆ Ø—8‘8˜A §    ¡    ™MÑ*ˆØh‰h×#Ñ# F°(ÀLÐ#ÓQˆØ 9‰9˜Š>Ø—%‘%ˆCàˆ
rUFcóð—t|«dk(rk|r |j}n|jj}|jj ||j ¬«}|j|jd¬«}|Sttj|Žd«}|€|jj «St|t«r|j|||¬«S|jr|jjnd}t|t j"t$f«rUt'|j(«st+|j(«}    n |j(}    |jj-|||    ¬«St|t.«sd|jr|jj-||¬«S|jj ||j(g¬«}|j1|«}|S|j3|||||«S)    NrrFrFrÝrürŠ)r)rár†r˜r™r]r—rrlÚdtypesÚnextr“Únot_noner‹r)rär‘r
Úndarrayr2r Ú
_selectionr¸Ú_constructor_slicedr6råÚ_wrap_applied_output_series)
raràrÐrÞrßrær¥Úfirst_not_noneÚ    key_indexr_s
          rVrèz%DataFrameGroupBy._wrap_applied_outputs³€ô ˆv‹;˜!Ò Ùà ŸJ™J‘    à ŸM™M×6Ñ6    à—X‘X×*Ñ*°ÀDÇLÁLÐ*ÓQˆFØ—]‘] 4§;¡;°U]Ó;ˆF؈MôœcŸl™l¨FÐ3°TÓ:ˆà Ð !à—8‘8×(Ñ(Ó*Ð *Ü ˜¬    Ô 2Ø×'Ñ'ØØ!1Ø)ð(óð ð 37·-²-D—M‘M×.Ò.ÀTˆ    ä n¤r§z¡z´5Ð&9Ô :ô ˜tŸ™Ô/ä˜TŸ_™_Ó-‘ð
—‘Ø—8‘8×/Ñ/°¸iÈdÐ/ÓSÐ SܘN¬FÔ3ð
}Š}Ø—x‘x×3Ñ3°FÀ)Ð3ÓLÐLàŸ™×.Ñ.¨vÀÇÁÐ?PÐ.ÓQØ×4Ñ4°VÓ<Ø ð×3Ñ3ØØ ØØØó ð rUcó:—|j«}tdi|¤Ž}|Dcgc]}||n|‘Œ
}}td„|D««}    |    s|j|d|¬«St    j
|D
cgc]}
t    j |
«‘Œc}
«} |jdk(ri|} |jj«} | j€[|D
chc]}
|
j’Œ}}
t|«dk(r4tt|««| _
n|j} |} | j} | jt k(r| j#«} |j$j'| | | ¬«}|j(s|j+|«}|j-|«Scc}wcc}
wcc}
w)Nc3ó4K—|]}|j–—Œy­wrxrŠrºs  rVr¼z?DataFrameGroupBy._wrap_applied_output_series.<locals>.<genexpr>hsèø€Ò+D¸¨A¯G­GÑ+DùrÈTrÝrr‡rrT)Ú_construct_axes_dictr6r4rär
ÚvstackÚasarrayrÄr†rGr_rárÚiterr rkrìÚtolistr]r—r‘rårâ)rarÐrÞrrrßr}ÚbackuprªÚall_indexed_sameÚvÚstacked_valuesr†rrVr¥s                rVrz,DataFrameGroupBy._wrap_applied_output_series\s€ð ×4Ñ4Ó6ˆÜÑ!˜&Ñ!ˆØ<BÖC°q˜˜ ‘!¨FÑ2ÐCˆÐCä+Ñ+D¸VÔ+DÓDÐáà×'Ñ'ØØ!%Ø)ð(óð ôŸ™¸6Ö#B°a¤B§J¡J¨q¥MÒ#BÓCˆà 9‰9˜Š>؈EØ$×*Ñ*×/Ñ/Ó1ˆG؏|‰|Ð#à)/Ö0 A˜Ÿ›Ð0Ð0ܐu“: ’?Ü#'¬¨U« Ó#4G•Là"×(Ñ(ˆE؈GØ+×-Ñ-ˆNà × Ñ ¤6Ò )à+×2Ñ2Ó4ˆNØ—‘×&Ñ& ~¸UÈGÐ&ÓTˆà}Š}Ø×0Ñ0°Ó8ˆFà×#Ñ# FÓ+Ð+ùòKDùò$Cùò1s  FÁ*FÃFc 󠇇‡—|dk(sJ‚‰j|‰¬«}dˆˆˆfd„ }|j|«}|jd|jd«‰jj ||j¬«}‰j |«}|S)NrrecóD•—‰jjd|‰dfi‰¤ŽS)Nrùr‡)r˜rý)Úbvaluesrr}ras €€€rVÚarr_funcz4DataFrameGroupBy._cython_transform.<locals>.arr_funcŸs-ø€Ø24—=‘=×2Ñ2ؘW c¨1ñØ06ñð rUr‡r[)r+r=rr=)rqÚgrouped_reduceÚset_axisr\r]r^Ú_maybe_transpose_result)    rarrfrÄr}rbr,Úres_mgrr×s    ``  `    rVrz"DataFrameGroupBy._cython_transformsŽú€ðqŠyЈyð×4Ñ4Ø%¨Cð5ó
ˆ÷    ð×$Ñ$ XÓ.ˆØ×ј˜CŸH™H Q™KÔ(à—‘×/Ñ/°¸g¿l¹lÐ/ÓKˆØ×-Ñ-¨fÓ5ˆØˆ rUcóà—t|«r|j|g|¢­d|i|¤ŽSddlm}g}|j}|j
j ||j¬«}    |j|g|¢­i|¤Ž\}
}     t|    «\} } tj| d| «    |j|
| | «\}}| jdkDr)t|j | |«}|j#|«    |    D]\\} } | jdk(rŒtj| d| «| «}t|j | |«}|j#|«Œ^|jdk(r |j&n |j(}|jdk(rdnd}|||jd¬    «}|j+||d¬
«}|j-|«S#t$r}d}t|«|‚d}~wwxYw#t$$rYŒÿwxYw) NrƒrrÂrêr_z3transform must return a scalar value for each groupr‡F)rÄrW)rÄrG)r8rrrÃrir˜rërÄÚ _define_pathsrrìríÚ _choose_pathrÚsizeÚ_wrap_transform_general_framer]rÚ StopIterationrr†Úreindexr    )rar{r‚rƒr|r}rÃÚappliedr]ÚgenÚ    fast_pathÚ    slow_pathr_rñÚpathr³rrÔÚ concat_indexÚ
other_axisr s                     rVr z#DataFrameGroupBy._transform_general­sô€Ü ˜6Ô "Ø-4×-Ñ-ØðØòØ+8ðØ<Bñð õ    6àˆØ×'Ñ'ˆØm‰m×(Ñ(¨°4·9±9Ð(Ó=ˆØ1˜t×1Ñ1°$ÐH¸ÒHÀÑHш    9ð
    $ܘs›)‰KˆD%ô
× Ñ ˜u f¨dÔ 3ð /Ø ×-Ñ-¨i¸ÀEÓJ‘    cð
z‰z˜AŠ~Ü3°D·H±H¸eÀSÓIØ—‘˜sÕ#ðò     ‰KˆD%؏z‰z˜QŠØä × Ñ ˜u f¨dÔ 3ِu“+ˆCä/°·±¸%ÀÓEˆCØ N‰N˜3Õ ð     ð'+§i¡i°1¢ns—{’{¸#¿)¹)ˆ ØŸ)™) qš.‘Q¨aˆ
Ù˜g¨D¯I©IÈÔNˆ Ø#×+Ñ+¨L¸zÐPUÐ+ÓVˆ Ø×-Ñ-¨lÓ;Ð;øô/ò /àKÜ  “o¨3Ð.ûð /ûôò    Ù ð    ús*Á9G!ÂGÇ    GÇ GÇGÇ!    G-Ç,G-a
    >>> df = pd.DataFrame({'A' : ['foo', 'bar', 'foo', 'bar',
    ...                           'foo', 'bar'],
    ...                    'B' : ['one', 'one', 'two', 'three',
    ...                           'two', 'two'],
    ...                    'C' : [1, 5, 5, 2, 5, 5],
    ...                    'D' : [2.0, 5., 8., 1., 2., 9.]})
    >>> grouped = df.groupby('A')[['C', 'D']]
    >>> grouped.transform(lambda x: (x - x.mean()) / x.std())
            C         D
    0 -1.154701 -0.577350
    1  0.577350  0.000000
    2  0.577350  1.154701
    3 -1.154701 -1.000000
    4  0.577350 -0.577350
    5  0.577350  1.000000
 
    Broadcast result of the transformation
 
    >>> grouped.transform(lambda x: x.max() - x.min())
        C    D
    0  4.0  6.0
    1  3.0  8.0
    2  4.0  6.0
    3  3.0  8.0
    4  4.0  6.0
    5  3.0  8.0
 
    >>> grouped.transform("mean")
        C    D
    0  3.666667  4.0
    1  4.000000  5.0
    2  3.666667  4.0
    3  4.000000  5.0
    4  3.666667  4.0
    5  4.000000  5.0
 
    .. versionchanged:: 1.3.0
 
    The resulting dtype will reflect the return value of the passed ``func``,
    for example:
 
    >>> grouped.transform(lambda x: x.astype(int).max())
    C  D
    0  5  8
    1  5  9
    2  5  8
    3  5  9
    4  5  8
    5  5  9
    ròcó4—|j|g|¢­||dœ|¤ŽSrõrörøs      rVrùzDataFrameGroupBy.transformrúrUcóv‡‡‡‡—t‰t«rˆˆˆfd„}ˆˆˆˆfd„}||fSˆˆˆfd„}ˆˆˆˆfd„}||fS)Ncó(•—t|‰«‰i‰¤ŽSrxr©rñr|r{r}s €€€rVr«z0DataFrameGroupBy._define_paths.<locals>.<lambda>sø€Ð&:¤g¨e°TÓ&:¸DÐ&KÀFÑ&K€rUcóH•—|jˆˆˆfd„‰j¬«S)Ncó(•—t|‰«‰i‰¤ŽSrxrr©s €€€rVr«zBDataFrameGroupBy._define_paths.<locals>.<lambda>.<locals>.<lambda>sø€Ð*œ' ! TÓ*¨DÐ;°FÑ;€rUrê©rzrÄ©rñr|r{r}ras €€€€rVr«z0DataFrameGroupBy._define_paths.<locals>.<lambda>sø€ e§k¡kÝ;À$Ç)Á)ð'2ó'€rUcó•—‰|g‰¢­i‰¤ŽSrxrTrBs €€€rVr«z0DataFrameGroupBy._define_paths.<locals>.<lambda>"sø€¡d¨5Ð&B°4Ò&B¸6Ñ&B€rUcóH•—|jˆˆˆfd„‰j¬«S)Ncó•—‰|g‰¢­i‰¤ŽSrxrTr©s €€€rVr«zBDataFrameGroupBy._define_paths.<locals>.<lambda>.<locals>.<lambda>$sø€™$˜qÐ2 4Ò2¨6Ñ2€rUrêrErFs €€€€rVr«z0DataFrameGroupBy._define_paths.<locals>.<lambda>#sø€ e§k¡kÝ2¸¿¹ð'2ó'€rU)r‹rŒ)rar{r|r}r:r;s````  rVr2zDataFrameGroupBy._define_pathssBû€Ü dœCÔ  ÝKˆIöˆIð˜)Ð#Ð#õ    CˆIöˆIð˜)Ð#Ð#rUcó —|}||«}|jdk(r||fS    ||«}t|t«r)|j
j |j
«sA||fSt|t«r)|jj |j
«s||fS||fS|j |«r|}||fS#t$r‚t$r||fcYSwxYwró)    r–rÚ    Exceptionr‹r)rÚequalsr6r†)rar:r;rñr<r³Úres_fasts       rVr3zDataFrameGroupBy._choose_path(s݀ØˆÙ˜Óˆà <‰<˜1Ò ð˜9Ð ð    Ù  Ó'ˆHô h¤    Ô *Ø×#Ñ#×*Ñ*¨5¯=©=Ô9ؘSyÐ Ü ˜¤&Ô )Ø—>‘>×(Ñ(¨¯©Ô7ؘSyÐ à˜9Ð à ?‰?˜3Ô ØˆDàSˆyÐøô-ò    Ø Üò    ð˜9Ò ð    úsŸB4Â4C à C Tcó—g}|j}|jj||j¬«}|D]«\}}    tj |    d|«||    g|¢­i|¤Ž}
    |
j «}
t|
«st|
«r;t|
«r0t|
«sŒg|
sŒj|j|j|««Œ‹tdt|
«j ›d«‚|j#||«S#t$rYŒ‘wxYw)a7
        Filter elements from groups that don't satisfy a criterion.
 
        Elements from groups are filtered if they do not satisfy the
        boolean criterion specified by func.
 
        Parameters
        ----------
        func : function
            Criterion to apply to each group. Should return True or False.
        dropna : bool
            Drop groups that do not pass the filter. True by default; if False,
            groups that evaluate False are filled with NaNs.
 
        Returns
        -------
        DataFrame
 
        Notes
        -----
        Each subframe is endowed the attribute 'name' in case you need to know
        which group you are working on.
 
        Functions that mutate the passed object can produce unexpected
        behavior or errors and are not supported. See :ref:`gotchas.udf-mutation`
        for more details.
 
        Examples
        --------
        >>> df = pd.DataFrame({'A' : ['foo', 'bar', 'foo', 'bar',
        ...                           'foo', 'bar'],
        ...                    'B' : [1, 2, 3, 4, 5, 6],
        ...                    'C' : [2.0, 5., 8., 1., 2., 9.]})
        >>> grouped = df.groupby('A')
        >>> grouped.filter(lambda x: x['B'].mean() > 3.)
             A  B    C
        1  bar  2  5.0
        3  bar  4  1.0
        5  bar  6  9.0
        rêr_zfilter function returned a z, but expected a scalar bool)r r˜rërÄrìríÚsqueezeÚAttributeErrorrrr!r"rrrlrmrOr) rar{rr|r}rr]r9r_rñr³s            rVrzDataFrameGroupBy.filterLs€ðRˆà× Ñ ˆØm‰m×(Ñ(¨°4·9±9Ð(Ó=ˆàò    ‰KˆD%ô × Ñ ˜u f¨dÔ 3áuÐ.˜tÒ. vÑ.ˆCð Ø—k‘k“mô
sŒ|¤    ¨#¤´4¸´9ܘ•:¢#Ø—N‘N 4§?¡?°4Ó#8Õ9ô Ø1´$°s³)×2DÑ2DÐ1EðF1ð1óðð%    ð.×!Ñ! '¨6Ó2Ð2øô"ò Ùð úsÁ"C8Ã8    DÄDc󨕗|jdk(r td«‚t|t«rt    |«dkDr td«‚t
‰||«S)Nr‡z'Cannot subset columns when using axis=1zRCannot subset columns with a tuple with more than one element. Use a list instead.)rÄrr‹r¸ráryÚ __getitem__)rarÇr~s  €rVrRzDataFrameGroupBy.__getitem__“sTø€Ø 9‰9˜Š>äÐFÓGÐ Gä cœ5Ô !¤c¨#£h°¢lôð&óð ô‰wÑ" 3Ó'Ð'rUcó@—|dk(r‰|€ |j}t||j|j|j|j
|j ||j|j|j|j|j¬« S|dk(r|€|j|}t||j|j|j
|j ||j|j|j|j|j¬« Std«‚)a
        sub-classes to define
        return a sliced object
 
        Parameters
        ----------
        key : string / list of selections
        ndim : {1, 2}
            requested ndim of result
        subset : object, default None
            subset to act on
        é)
rÄÚlevelÚgrouperÚ
exclusionsÚ    selectionr‘r!Ú
group_keysÚobservedrr‡)    rUrVrWrXr‘r!rYrZrzinvalid ndim for _gotitem)r]rrÅrÄrUr˜rWr‘r!rYrZrrXr)rarÇÚndimÚsubsets    rVÚ_gotitemzDataFrameGroupBy._gotitem¡sí€ð 1Š9؈~ØŸ™Ü#ØØ—    ‘    Ø—Y‘YØ—j‘jØŸ ™ ØŸ?™?ØØŸ™Ø—Y‘YØŸ?™?ØŸ™Ø—{‘{ô ð ðQŠY؈~ØŸ™ #™Ü ØØ—    ‘    Ø—j‘jØŸ ™ ØŸ?™?ØØŸ™Ø—Y‘YØŸ?™?ØŸ™Ø—{‘{ô ð ôÐ8Ó9Ð9rUrecó¦—|j}|jdk(r|jj}n |j}|r|j    «}|Sró)rirÄr rjÚget_numeric_data)rarfr_r]rbs     rVrqz'DataFrameGroupBy._get_data_to_aggregateÒsF€ð×'Ñ'ˆØ 9‰9˜Š>Ø—%‘%—*‘*‰Cà—(‘(ˆCá Ø×&Ñ&Ó(ˆC؈
rUcóP—|jj||j¬«SrZ)r]r^r\)rarbs  rVrdz$DataFrameGroupBy._wrap_agged_managerßs €Øx‰x×-Ñ-¨c¸¿¹Ð-ÓAÐArUc ó(—ddlm}|j}|j}t    |j«Dcgc]D\}}t |j dd…|f||j|j|j¬«‘ŒF}}}|Dcgc]
}||«‘Œ }    }t|    «s#tg||jj¬«}
n ||    |d¬«}
|js*tt|
««|
_|j!|
«}
|
Scc}}wcc}w)NrrÂ)rXrVrWrZ©rr†r‡)rÅrÄ)rrÃrirrÎrXrr˜rWrZrár)r™r‘r5r†rå) rar{rÃr]rÚiÚcolnameÚsgbsÚsgbrÕr×s            rVÚ_apply_to_column_groupbysz*DataFrameGroupBy._apply_to_column_groupbysâsï€Ý5à×'Ñ'ˆØ—+‘+ˆô(¨¯ © Ó4÷    
ñ7ô Ø—‘š˜A˜‘Ø!ØŸ ™ ØŸ?™?ØŸ™ö  ð    
ˆñ    
ð)-Ö- ‘4˜•9Ð-ˆÐ-ä7Œ|ä˜r¨7¸$¿-¹-×:TÑ:TÔU‰Fá˜G¨'¸Ô:ˆFà}Š}Ü(¬¨V«Ó5ˆFŒLØ×0Ñ0°Ó8ˆF؈ ùó+    
ùò.s ·A    D    ÂDc󌇗|jdk7r!|jˆfd„|jd¬«S|jˆfd„«S)aÍ
        Return DataFrame with counts of unique elements in each position.
 
        Parameters
        ----------
        dropna : bool, default True
            Don't include NaN in the counts.
 
        Returns
        -------
        nunique: DataFrame
 
        Examples
        --------
        >>> df = pd.DataFrame({'id': ['spam', 'egg', 'egg', 'spam',
        ...                           'ham', 'ham'],
        ...                    'value1': [1, 5, 5, 2, 5, 5],
        ...                    'value2': list('abbaxy')})
        >>> df
             id  value1 value2
        0  spam       1      a
        1   egg       5      b
        2   egg       5      b
        3  spam       2      a
        4   ham       5      x
        5   ham       5      y
 
        >>> df.groupby('id').nunique()
              value1  value2
        id
        egg        1       1
        ham        1       2
        spam       2       1
 
        Check for rows with the same id but conflicting values:
 
        >>> df.groupby('id').filter(lambda g: (g.nunique() > 1).any())
             id  value1 value2
        0  spam       1      a
        3  spam       2      a
        4   ham       5      x
        5   ham       5      y
        rcó&•—|j‰«Srx©r3©rfrs €rVr«z*DataFrameGroupBy.nunique.<locals>.<lambda>.sø€˜CŸK™K¨Ó/€rUTr    có&•—|j‰«Srxrjrks €rVr«z*DataFrameGroupBy.nunique.<locals>.<lambda>1sø€¸#¿+¹+ÀfÓ:M€rU)rÄr²rirg)rars `rVr3zDataFrameGroupBy.nuniqueþsKø€ðZ 9‰9˜Š>à×-Ñ-Û/°×1JÑ1JÐSWð.óð ð×-Ñ-Ó.MÓNÐNrUcó,—|jd|||¬«S)aÈ
        Return index of first occurrence of maximum over requested axis.
 
        NA/null values are excluded.
 
        Parameters
        ----------
        axis : {{0 or 'index', 1 or 'columns'}}, default None
            The axis to use. 0 or 'index' for row-wise, 1 or 'columns' for column-wise.
            If axis is not provided, grouper's axis is used.
 
            .. versionchanged:: 2.0.0
 
            .. deprecated:: 2.1.0
                For axis=1, operate on the underlying object instead. Otherwise
                the axis keyword is not necessary.
 
        skipna : bool, default True
            Exclude NA/null values. If an entire row/column is NA, the result
            will be NA.
        numeric_only : bool, default False
            Include only `float`, `int` or `boolean` data.
 
            .. versionadded:: 1.5.0
 
        Returns
        -------
        Series
            Indexes of maxima along the specified axis.
 
        Raises
        ------
        ValueError
            * If the row/column is empty
 
        See Also
        --------
        Series.idxmax : Return index of the maximum element.
 
        Notes
        -----
        This method is the DataFrame version of ``ndarray.argmax``.
 
        Examples
        --------
        Consider a dataset containing food consumption in Argentina.
 
        >>> df = pd.DataFrame({'consumption': [10.51, 103.11, 55.48],
        ...                    'co2_emissions': [37.2, 19.66, 1712]},
        ...                   index=['Pork', 'Wheat Products', 'Beef'])
 
        >>> df
                        consumption  co2_emissions
        Pork                  10.51         37.20
        Wheat Products       103.11         19.66
        Beef                  55.48       1712.00
 
        By default, it returns the index for the maximum value in each column.
 
        >>> df.idxmax()
        consumption     Wheat Products
        co2_emissions             Beef
        dtype: object
 
        To return the index for the maximum value in each row, use ``axis="columns"``.
 
        >>> df.idxmax(axis="columns")
        Pork              co2_emissions
        Wheat Products     consumption
        Beef              co2_emissions
        dtype: object
        r¾©rÄrfršr¹©rarÄršrfs    rVr¾zDataFrameGroupBy.idxmax3ó&€ð\×"Ñ"Ø ˜4¨lÀ6ð#ó
ð    
rUcó,—|jd|||¬«S)aË
        Return index of first occurrence of minimum over requested axis.
 
        NA/null values are excluded.
 
        Parameters
        ----------
        axis : {{0 or 'index', 1 or 'columns'}}, default None
            The axis to use. 0 or 'index' for row-wise, 1 or 'columns' for column-wise.
            If axis is not provided, grouper's axis is used.
 
            .. versionchanged:: 2.0.0
 
            .. deprecated:: 2.1.0
                For axis=1, operate on the underlying object instead. Otherwise
                the axis keyword is not necessary.
 
        skipna : bool, default True
            Exclude NA/null values. If an entire row/column is NA, the result
            will be NA.
        numeric_only : bool, default False
            Include only `float`, `int` or `boolean` data.
 
            .. versionadded:: 1.5.0
 
        Returns
        -------
        Series
            Indexes of minima along the specified axis.
 
        Raises
        ------
        ValueError
            * If the row/column is empty
 
        See Also
        --------
        Series.idxmin : Return index of the minimum element.
 
        Notes
        -----
        This method is the DataFrame version of ``ndarray.argmin``.
 
        Examples
        --------
        Consider a dataset containing food consumption in Argentina.
 
        >>> df = pd.DataFrame({'consumption': [10.51, 103.11, 55.48],
        ...                    'co2_emissions': [37.2, 19.66, 1712]},
        ...                   index=['Pork', 'Wheat Products', 'Beef'])
 
        >>> df
                        consumption  co2_emissions
        Pork                  10.51         37.20
        Wheat Products       103.11         19.66
        Beef                  55.48       1712.00
 
        By default, it returns the index for the minimum value in each column.
 
        >>> df.idxmin()
        consumption                Pork
        co2_emissions    Wheat Products
        dtype: object
 
        To return the index for the minimum value in each row, use ``axis="columns"``.
 
        >>> df.idxmin(axis="columns")
        Pork                consumption
        Wheat Products    co2_emissions
        Beef                consumption
        dtype: object
        r·rnr¹ros    rVr·zDataFrameGroupBy.idxmin…rprUcó,—|j|||||«S)a(
        Return a Series or DataFrame containing counts of unique rows.
 
        .. versionadded:: 1.4.0
 
        Parameters
        ----------
        subset : list-like, optional
            Columns to use when counting unique combinations.
        normalize : bool, default False
            Return proportions rather than frequencies.
        sort : bool, default True
            Sort by frequencies.
        ascending : bool, default False
            Sort in ascending order.
        dropna : bool, default True
            Don't include counts of rows that contain NA values.
 
        Returns
        -------
        Series or DataFrame
            Series if the groupby as_index is True, otherwise DataFrame.
 
        See Also
        --------
        Series.value_counts: Equivalent method on Series.
        DataFrame.value_counts: Equivalent method on DataFrame.
        SeriesGroupBy.value_counts: Equivalent method on SeriesGroupBy.
 
        Notes
        -----
        - If the groupby as_index is True then the returned Series will have a
          MultiIndex with one level per input column.
        - If the groupby as_index is False then the returned DataFrame will have an
          additional column with the value_counts. The column is labelled 'count' or
          'proportion', depending on the ``normalize`` parameter.
 
        By default, rows that contain any NA values are omitted from
        the result.
 
        By default, the result will be in descending order so that the
        first element of each group is the most frequently-occurring row.
 
        Examples
        --------
        >>> df = pd.DataFrame({
        ...     'gender': ['male', 'male', 'female', 'male', 'female', 'male'],
        ...     'education': ['low', 'medium', 'high', 'low', 'high', 'low'],
        ...     'country': ['US', 'FR', 'US', 'FR', 'FR', 'FR']
        ... })
 
        >>> df
                gender  education   country
        0       male    low         US
        1       male    medium      FR
        2       female  high        US
        3       male    low         FR
        4       female  high        FR
        5       male    low         FR
 
        >>> df.groupby('gender').value_counts()
        gender  education  country
        female  high       FR         1
                           US         1
        male    low        FR         2
                           US         1
                medium     FR         1
        Name: count, dtype: int64
 
        >>> df.groupby('gender').value_counts(ascending=True)
        gender  education  country
        female  high       FR         1
                           US         1
        male    low        US         1
                medium     FR         1
                low        FR         2
        Name: count, dtype: int64
 
        >>> df.groupby('gender').value_counts(normalize=True)
        gender  education  country
        female  high       FR         0.50
                           US         0.50
        male    low        FR         0.50
                           US         0.25
                medium     FR         0.25
        Name: proportion, dtype: float64
 
        >>> df.groupby('gender', as_index=False).value_counts()
           gender education country  count
        0  female      high      FR      1
        1  female      high      US      1
        2    male       low      FR      2
        3    male       low      US      1
        4    male    medium      FR      1
 
        >>> df.groupby('gender', as_index=False).value_counts(normalize=True)
           gender education country  proportion
        0  female      high      FR        0.50
        1  female      high      US        0.50
        2    male       low      FR        0.50
        3    male       low      US        0.25
        4    male    medium      FR        0.25
        )rY)rar\r<r!r=rs      rVr]zDataFrameGroupBy.value_countsÙs€ð^×!Ñ! &¨)°T¸9ÀfÓMÐMrUc    óê—tjt|«j›dt|j«j›dt
t «¬«|jd||||||¬«}|S)a)
        Fill NA/NaN values using the specified method within groups.
 
        .. deprecated:: 2.2.0
            This method is deprecated and will be removed in a future version.
            Use the :meth:`.DataFrameGroupBy.ffill` or :meth:`.DataFrameGroupBy.bfill`
            for forward or backward filling instead. If you want to fill with a
            single value, use :meth:`DataFrame.fillna` instead.
 
        Parameters
        ----------
        value : scalar, dict, Series, or DataFrame
            Value to use to fill holes (e.g. 0), alternately a
            dict/Series/DataFrame of values specifying which value to use for
            each index (for a Series) or column (for a DataFrame).  Values not
            in the dict/Series/DataFrame will not be filled. This value cannot
            be a list. Users wanting to use the ``value`` argument and not ``method``
            should prefer :meth:`.DataFrame.fillna` as this
            will produce the same result and be more performant.
        method : {{'bfill', 'ffill', None}}, default None
            Method to use for filling holes. ``'ffill'`` will propagate
            the last valid observation forward within a group.
            ``'bfill'`` will use next valid observation to fill the gap.
        axis : {0 or 'index', 1 or 'columns'}
            Axis along which to fill missing values. When the :class:`DataFrameGroupBy`
            ``axis`` argument is ``0``, using ``axis=1`` here will produce
            the same results as :meth:`.DataFrame.fillna`. When the
            :class:`DataFrameGroupBy` ``axis`` argument is ``1``, using ``axis=0``
            or ``axis=1`` here will produce the same results.
        inplace : bool, default False
            Broken. Do not set to True.
        limit : int, default None
            If method is specified, this is the maximum number of consecutive
            NaN values to forward/backward fill within a group. In other words,
            if there is a gap with more than this number of consecutive NaNs,
            it will only be partially filled. If method is not specified, this is the
            maximum number of entries along the entire axis where NaNs will be
            filled. Must be greater than 0 if not None.
        downcast : dict, default is None
            A dict of item->dtype of what to downcast if possible,
            or the string 'infer' which will try to downcast to an appropriate
            equal type (e.g. float64 to int64 if possible).
 
        Returns
        -------
        DataFrame
            Object with missing values filled.
 
        See Also
        --------
        ffill : Forward fill values within a group.
        bfill : Backward fill values within a group.
 
        Examples
        --------
        >>> df = pd.DataFrame(
        ...     {
        ...         "key": [0, 0, 1, 1, 1],
        ...         "A": [np.nan, 2, np.nan, 3, np.nan],
        ...         "B": [2, 3, np.nan, np.nan, np.nan],
        ...         "C": [np.nan, np.nan, 2, np.nan, np.nan],
        ...     }
        ... )
        >>> df
           key    A    B   C
        0    0  NaN  2.0 NaN
        1    0  2.0  3.0 NaN
        2    1  NaN  NaN 2.0
        3    1  3.0  NaN NaN
        4    1  NaN  NaN NaN
 
        Propagate non-null values forward or backward within each group along columns.
 
        >>> df.groupby("key").fillna(method="ffill")
             A    B   C
        0  NaN  2.0 NaN
        1  2.0  3.0 NaN
        2  NaN  NaN 2.0
        3  3.0  NaN 2.0
        4  3.0  NaN 2.0
 
        >>> df.groupby("key").fillna(method="bfill")
             A    B   C
        0  2.0  2.0 NaN
        1  2.0  3.0 NaN
        2  3.0  NaN 2.0
        3  3.0  NaN NaN
        4  NaN  NaN NaN
 
        Propagate non-null values forward or backward within each group along rows.
 
        >>> df.T.groupby(np.array([0, 0, 1, 1])).fillna(method="ffill").T
           key    A    B    C
        0  0.0  0.0  2.0  2.0
        1  0.0  2.0  3.0  3.0
        2  1.0  1.0  NaN  2.0
        3  1.0  3.0  NaN  NaN
        4  1.0  1.0  NaN  NaN
 
        >>> df.T.groupby(np.array([0, 0, 1, 1])).fillna(method="bfill").T
           key    A    B    C
        0  0.0  NaN  2.0  NaN
        1  0.0  2.0  3.0  NaN
        2  1.0  NaN  2.0  2.0
        3  1.0  3.0  NaN  NaN
        4  1.0  NaN  NaN  NaN
 
        Only replace the first NaN element within a group along rows.
 
        >>> df.groupby("key").fillna(method="ffill", limit=1)
             A    B    C
        0  NaN  2.0  NaN
        1  2.0  3.0  NaN
        2  NaN  NaN  2.0
        3  3.0  NaN  2.0
        4  3.0  NaN  NaN
        r‡rˆrˆr‰rŠrr’s        rVr‰zDataFrameGroupBy.fillnaJ    s‚€ô|     ‰ ܐD‹z×"Ñ"Ð#ð$!ô"& d§h¡h£×!8Ñ!8Р9¸ð Jô Ü'Ó)õ     
ð×#Ñ#Ø ØØØØØØð$ó
ˆðˆ rUc ó0—|jd||dœ|¤Ž}|S)a 
        Return the elements in the given *positional* indices in each group.
 
        This means that we are not indexing according to actual values in
        the index attribute of the object. We are indexing according to the
        actual position of the element in the object.
 
        If a requested index does not exist for some group, this method will raise.
        To get similar behavior that ignores indices that don't exist, see
        :meth:`.DataFrameGroupBy.nth`.
 
        Parameters
        ----------
        indices : array-like
            An array of ints indicating which positions to take.
        axis : {0 or 'index', 1 or 'columns', None}, default 0
            The axis on which to select elements. ``0`` means that we are
            selecting rows, ``1`` means that we are selecting columns.
 
            .. deprecated:: 2.1.0
                For axis=1, operate on the underlying object instead. Otherwise
                the axis keyword is not necessary.
 
        **kwargs
            For compatibility with :meth:`numpy.take`. Has no effect on the
            output.
 
        Returns
        -------
        DataFrame
            An DataFrame containing the elements taken from each group.
 
        See Also
        --------
        DataFrame.take : Take elements from a Series along an axis.
        DataFrame.loc : Select a subset of a DataFrame by labels.
        DataFrame.iloc : Select a subset of a DataFrame by positions.
        numpy.take : Take elements from an array along an axis.
 
        Examples
        --------
        >>> df = pd.DataFrame([('falcon', 'bird', 389.0),
        ...                    ('parrot', 'bird', 24.0),
        ...                    ('lion', 'mammal', 80.5),
        ...                    ('monkey', 'mammal', np.nan),
        ...                    ('rabbit', 'mammal', 15.0)],
        ...                   columns=['name', 'class', 'max_speed'],
        ...                   index=[4, 3, 2, 1, 0])
        >>> df
             name   class  max_speed
        4  falcon    bird      389.0
        3  parrot    bird       24.0
        2    lion  mammal       80.5
        1  monkey  mammal        NaN
        0  rabbit  mammal       15.0
        >>> gb = df.groupby([1, 1, 2, 2, 2])
 
        Take elements at positions 0 and 1 along the axis 0 (default).
 
        Note how the indices selected in the result do not correspond to
        our input indices 0 and 1. That's because we are selecting the 0th
        and 1st rows, not rows whose indices equal 0 and 1.
 
        >>> gb.take([0, 1])
               name   class  max_speed
        1 4  falcon    bird      389.0
          3  parrot    bird       24.0
        2 2    lion  mammal       80.5
          1  monkey  mammal        NaN
 
        The order of the specified indices influences the order in the result.
        Here, the order is swapped from the previous example.
 
        >>> gb.take([1, 0])
               name   class  max_speed
        1 3  parrot    bird       24.0
          4  falcon    bird      389.0
        2 1  monkey  mammal        NaN
          2    lion  mammal       80.5
 
        Take elements at indices 1 and 2 along the axis 1 (column selection).
 
        We may take elements using negative integers for positive indices,
        starting from the end of the object, just like with Python lists.
 
        >>> gb.take([-1, -2])
               name   class  max_speed
        1 3  parrot    bird       24.0
          4  falcon    bird      389.0
        2 0  rabbit  mammal       15.0
          1  monkey  mammal        NaN
        r”r•r–r—s     rVr_zDataFrameGroupBy.takeÜ    s&€ðD$×#Ñ#ÐQ°GÀ$ÑQÈ&ÑQˆØˆ rUc óš—|tjurd}|dk7r|j    d|||dœ|¤Ž}|Sd„}|j    d|||dœ|¤ŽS)a
        Return unbiased skew within groups.
 
        Normalized by N-1.
 
        Parameters
        ----------
        axis : {0 or 'index', 1 or 'columns', None}, default 0
            Axis for the function to be applied on.
 
            Specifying ``axis=None`` will apply the aggregation across both axes.
 
            .. versionadded:: 2.0.0
 
            .. deprecated:: 2.1.0
                For axis=1, operate on the underlying object instead. Otherwise
                the axis keyword is not necessary.
 
        skipna : bool, default True
            Exclude NA/null values when computing the result.
 
        numeric_only : bool, default False
            Include only float, int, boolean columns.
 
        **kwargs
            Additional keyword arguments to be passed to the function.
 
        Returns
        -------
        DataFrame
 
        See Also
        --------
        DataFrame.skew : Return unbiased skew over requested axis.
 
        Examples
        --------
        >>> arrays = [['falcon', 'parrot', 'cockatoo', 'kiwi',
        ...            'lion', 'monkey', 'rabbit'],
        ...           ['bird', 'bird', 'bird', 'bird',
        ...            'mammal', 'mammal', 'mammal']]
        >>> index = pd.MultiIndex.from_arrays(arrays, names=('name', 'class'))
        >>> df = pd.DataFrame({'max_speed': [389.0, 24.0, 70.0, np.nan,
        ...                                  80.5, 21.5, 15.0]},
        ...                   index=index)
        >>> df
                        max_speed
        name     class
        falcon   bird        389.0
        parrot   bird         24.0
        cockatoo bird         70.0
        kiwi     bird          NaN
        lion     mammal       80.5
        monkey   mammal       21.5
        rabbit   mammal       15.0
        >>> gb = df.groupby(["class"])
        >>> gb.skew()
                max_speed
        class
        bird     1.628296
        mammal   1.669046
        >>> gb.skew(skipna=False)
                max_speed
        class
        bird          NaN
        mammal   1.669046
        rr™có2—td|j›«‚rœrržs rVrŸz"DataFrameGroupBy.skew.<locals>.alt˜
r rUr¡r¢r¤r§s       rVr£zDataFrameGroupBy.skewA
s…€ðT ”3—>‘>Ñ !؈Dà 1Š9Ø'T×'Ñ'ØðàØØ)ñ    ð
ñ ˆFðˆMò    Nð
(ˆt×'Ñ'Ø ð
Ø F¸ñ
ØIOñ
ð    
rUcó—t|«}|Srxr©rªs  rVr«zDataFrameGroupBy.plot¡
r¬rUròcó0—|jd|||¬«}|S)NrÀ)rŒrÂrfr–)rarŒrÂrfr¥s     rVrÀzDataFrameGroupBy.corr§
s)€ð×#Ñ#Ø ˜6¨{Èð$ó
ˆðˆ rUcó0—|jd|||¬«}|S)NrÄ)rÂrÅrfr–)rarÂrÅrfr¥s     rVrÄzDataFrameGroupBy.cov³
s)€ð×#Ñ#Ø ˜{°ÀLð$ó
ˆðˆ rUc óL—|j    d|||||||||    |
| | | ||dœ|¤Ž}|S)N)rLrÒrÔrÕrÖr×rØrÓÚsharexÚshareyrÙÚlayoutr@rÚrÛrÜr–)rarLrÒrÔrÕrÖr×rØrÓr{r|rÙr}r@rÚrÛr}r¥s                  rVrÝzDataFrameGroupBy.hist¿
s\€ð($×#Ñ#Ø ð
àØØØ!ØØ!ØØØØØØØØØñ!
ð"ñ#
ˆð&ˆ rUcó°—tjt|«j›dtt «¬«|j d„|j«S)Nzj.dtypes is deprecated and will be removed in a future version. Check the dtypes on the base object insteadrˆcó—|jSrx)r)Údfs rVr«z)DataFrameGroupBy.dtypes.<locals>.<lambda>õ
s
€r—y‘y€rU)ržrŸrmrOr rr²r rÌs rVrzDataFrameGroupBy.dtypesè
sU€ô     ‰ ܐD‹z×"Ñ"Ð#ð$Lð Lä Ü'Ó)õ        
ð×)Ñ)Ù   $×"4Ñ"4ó
ð    
rUcó4—|jd|||||¬«}|S)NÚcorrwith)rÁrÄÚdroprŒrfr–)rarÁrÄrƒrŒrfr¥s       rVr‚zDataFrameGroupBy.corrwithø
s2€ð×#Ñ#Ø ØØØØØ%ð $ó
ˆðˆ rUrxrärå)ràr)rÐr¹rÞrrßr)
rÐz list[Series]rÞrrz Index | Nonerßrrrærç)rrŒrfrrÄr?rr))r:r    r;r    rñr)rèré)rz DataFrameGroupBy | SeriesGroupBy)r[rñ)rfrr_rârrD)rbrDrr))rrrr))rÄrìršrrfrrr))NFTFT) r\zSequence[Hashable] | Noner<rr!rr=rrrrræ) r‹z.Hashable | Mapping | Series | DataFrame | NonerŒrërÄrìrrrŽrírzDataFrame | None)rrFrÄrìrr)rï)ròr‡F)rŒz/str | Callable[[np.ndarray, np.ndarray], float]rÂrñrfrrr))Nr‡F)rÂrírÅrírfrrr))NNTNNNNNFFNNrôNF)rLzIndexLabel | NonerÔrrÕrírÖrõr×rírØrõr{rr|rrÙrör}rör@r÷rÚrârÛrrã) rÁrærÄrîrƒrrŒr@rfrrr))1rOrPrQrrørr.r¦rúr›rrèrrr Ú)_DataFrameGroupBy__examples_dataframe_docrrr1rùr2r3rrRr]rqrdrgr3rr¥r¾r·r9Úboxplotr]r‰r_r£rür)r«rRrÀrÄrÝrr‚rýrþs@rVrr1s“ø„ÙðV    óXÐñt    Ð    Ð'8À ÔLðT°ÀTóTóMðTðl €Cò1ó<ð."'Ø"ð DàðDððDðð    Dð
ó DðL/,àð/,ðð/,ð
 ð /,ð ð /,ð
ó/,ðh#Øð    à ððððð    ð
ó ò@/<ñb &ð2    ó4 Ðñl˜ Ð-EÔFÙ Ð!Ó"Ø,0Àó
ó#óGð
ò
$ó"ôHE3õN (ô/:ðd',Àñ Ø#ð Ø3=ð à    ó óBóô83Oðn-0¯N©NØØ"ð    P
à)ðP
ððP
ðð    P
ð
 
ó P
ðh-0¯N©NØØ"ð    P
à)ðP
ððP
ðð    P
ð
 
ó P
ðd$€Gð-1ØØØØð oNà)ðoNððoNðð    oNð
ð oNð ð oNð
óoNðfAEØ'+Ø,/¯N©NØØ Ø—‘ðPà=ðPð%ðPð*ð    Pð
ð Pð ð Pð
óPðj-0¯N©Nðcàðcð*ðcð
 
ó cðN-0¯N©NØØ"ð    ^
à)ð^
ðð^
ðð    ^
ð
ó ^
ð@Ùˆ‰×    Ñ    Ó òó!óðñ    ˆ‰×    Ñ    Ó ðCLØØ"ð        à?ð    ðð    ðð        ð
 
ò     ó!ð    ñ    ˆ‰×    Ñ    Óð#'ØØ"ð        àð    ðð    ðð        ð
 
ò     ó ð    ñ    ˆ‰×    Ñ    Ó ð%)Ø ØØ!%Ø!Ø!%Ø!Ø ØØØ*.Ø)-Ø$&Ø"Øð!&à!ð&ðð    &ð
ð &ð ð &ðð&ðð&ðð&ðð&ð(ð&ð'ð&ð"ð&ðð&ð ò!&ó!ð&ðPوנ   Ñ    ×    !Ñ    !Ó"ò 
ó#óð 
ñ    ˆ×    Ñ    ×    #Ñ    #Ó$ð&)§^¡^ØØ$-Ø"ð à!ðð#ððð    ð
"ð ð ð ð
òó%ôrUrcót—ddlm}t|t«rØ|jj |j«rD||gt |j«zd¬«}|j|_|j|_n[|jtj|jt |j«df«|j|j¬«}t|t«sJ‚|St|t«r9|jj |j«s|j|«dS|S)NrrÂr‡rêrb)rÑrÃr‹r6r†Úis_rárr—r
rqrÐr)Ú _align_frame)r]rñr³rÃÚ    res_frames     rVr5r5 sí€õä#”vÔð 9‰9=‰=˜Ÿ™Ô #Ù ˜u¤s¨5¯=©=Ó'9Ñ9ÀÔBˆIØ %§ ¡ ˆIÔ Ø#Ÿk™kˆIOà×(Ñ(Ü—‘˜Ÿ
™
¤S¨¯©Ó%5°qÐ$9Ó:ØŸ ™ Ø—k‘kð)óˆIô
˜)¤YÔ/Ð/Ð/ØÐÜ    CœÔ    #¨C¯I©I¯M©M¸%¿+¹+Ô,FØ×Ñ Ó& qÑ)Ð)àˆ
rU)r]r)rñr)r³rærr))qrRÚ
__future__rÚ collectionsrÚ    functoolsrÚtextwraprÚtypingrrr    r
r r r rržÚnumpyr
Ú pandas._libsrrÚpandas._libs.hashtablerÚ pandas.errorsrÚpandas.util._decoratorsrrrÚpandas.util._exceptionsrÚpandas.core.dtypes.commonrrrrrrrÚpandas.core.dtypes.dtypesrrÚpandas.core.dtypes.inferencer Úpandas.core.dtypes.missingr!r"Ú pandas.corer#Úpandas.core.applyr$r%r&r'r(Úpandas.core.commonÚcoreÚcommonr“Úpandas.core.framer)Úpandas.core.groupbyr*r+Úpandas.core.groupby.groupbyr,r-r.r/r0r1Úpandas.core.indexes.apir2r3r4r5Úpandas.core.seriesr6Úpandas.core.sortingr7Úpandas.core.util.numba_r8Úpandas.plottingr9Úcollections.abcr:r;r<Úpandas._typingr=r>r?r@rArBrCrDrErFrÑrGÚpandas.core.genericrHrŒrMrIrKrXrr5rTrUrVú<module>r©sLðñõ#åÝÝ÷    ÷    ó    óã÷õ.Ý,÷ñõ
5÷÷ñ÷õ5÷õ
#÷õ÷!РÝ'÷÷÷÷óõ &Ý/Ý3å1á÷ñ÷ ÷ ÷ õ#Ý+ð #x  S Ñ)Ð)Ñ *€    ñ~Ó&€ ôˆzôô<TG˜F‘OôTôn$Xw˜yÑ)ôXðv.Ø    ðØ$ðØ+=ðàôrU