hyb
2025-11-18 7539e6f48c75dcaeb808359cccfd1c0d0d182ce8
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
Ë
nñúhç ãóP—ddlmZddlZddlmZddlmZmZm    Z                                    dd„Z
y)é)Ú annotationsN)Úunique1d)Ú CategoricalÚCategoricalDtypeÚrecode_for_categoriescó —|r t|j«}||dk7}|rtj|«}|jj |«}t |j|j|«}t||j¬«}tj||¬«|fS|r|dfStj|jj««}t|j|jdk7«}    |rtj|    «}    t|«t|    «kDr0tj||    d¬«}
tj|    |
f«}n|    }t||j!«jj |««dfS)a=
    Code the categories to ensure we can groupby for categoricals.
 
    If observed=True, we return a new Categorical with the observed
    categories only.
 
    If sort=False, return a copy of self, coded with categories as
    returned by .unique(), followed by any categories not appearing in
    the data. If sort=True, return self.
 
    This method is needed solely to ensure the categorical index of the
    GroupBy result has categories in the order of appearance in the data
    (GH-8868).
 
    Parameters
    ----------
    c : Categorical
    sort : bool
        The value of the sort parameter groupby was called with.
    observed : bool
        Account only for the observed values
 
    Returns
    -------
    Categorical
        If sort=False, the new categories are set to the order of
        appearance in codes (unless ordered=True, in which case the
        original order is preserved), followed by any unrepresented
        categories in the original order.
    Categorical or None
        If we are observed, return the original categorical, otherwise None
    éÿÿÿÿ)Úordered)ÚdtypeNT)Ú assume_unique)rÚcodesÚnpÚsortÚ
categoriesÚtakerrr
rÚ _simple_newÚarangeÚnuniqueÚlenÚ    setdiff1dÚ concatenateÚunique) ÚcrÚobservedÚ unique_codesÚ
take_codesrr r Ú    all_codesÚunique_notnan_codesÚ missing_codess            úRH:\Change_password\venv_build\Lib\site-packages\pandas/core/groupby/categorical.pyÚrecode_for_groupbyr! sP€ñHô  §¡Ó(ˆ à! ,°"Ñ"4Ñ5ˆ
Ù ÜŸ™ Ó,ˆJð—\‘\×&Ñ& zÓ2ˆ
Ü% a§g¡g¨q¯|©|¸ZÓHˆô! °Q·Y±YÔ?ˆÜ×&Ñ& u°EÔ:¸AÐ=Ð=ñ ؐ$ˆwˆô
—    ‘    ˜!Ÿ,™,×.Ñ.Ó0Ó1€Iä" 1§7¡7¨1¯7©7°b©=Ñ#9Ó:ÐÙ Ü Ÿg™gÐ&9Ó:ÐÜ
ˆ9ƒ~œÐ/Ó0Ò0äŸ ™  YÐ0CÐSWÔXˆ Ü—^‘^Ð%8¸-Ð$HÓI‰
à(ˆ
ä q˜!Ÿ(™(›*×/Ñ/×4Ñ4°ZÓ@Ó AÀ4Ð GÐGó)rrrÚboolrr#Úreturnz&tuple[Categorical, Categorical | None]) Ú
__future__rÚnumpyrÚpandas.core.algorithmsrÚpandas.core.arrays.categoricalrrrr!©r"r ú<module>r*sGðÝ"ãå+÷ñðJHØðJHØðJHØ*.ðJHà+ôJHr"