Ë
    ômxiÔ\  ã                   ó`  — d dl Z d dlZd dlZd dlZd dlmZmZmZm	Z	 d dl
mZ d dlmZ  ej                  ddgddg ed¬«      d„ g d¢ ej                   g d¢«       e e ed	«      g d¢«      «       e	g d
¢«       e	g d
¢«       e	g d¢«      gg
¬«      d„ «       Z ej                  ddg¬«      d„ «       Zej                  d„ «       Zej                  d„ «       Zej                  d„ «       Zej                  d„ «       Zd)d„Zej6                  j9                  dg d¢«      d„ «       Zej6                  j9                  dddg«      d„ «       Zej6                  j9                  dddg«      ej6                  j9                  dej>                  ej@                  g«      d„ «       «       Z!ej6                  j9                  dg d¢«      d„ «       Z"ej6                  j9                  dddg«      d„ «       Z#ej6                  j9                  dddg«      ej6                  j9                  dej>                  ej@                  g«      d „ «       «       Z$ej6                  j9                  d!g d"¢«      d#„ «       Z%ej6                  j9                  dg d¢«      d$„ «       Z&ej6                  j9                  dddg«      d%„ «       Z'ej6                  j9                  dddg«      ej6                  j9                  dej>                  ej@                  g«      d&„ «       «       Z(ej6                  j9                  dg d¢«      d'„ «       Z)d(„ Z*y)*é    N)ÚCategoricalÚ	DataFrameÚGrouperÚSeries)Úget_groupby_method_argsÚaÚb)Úkeyc                 ó   — | dz  S )Né   © ©Úxs    úW/home/htdocs/ttos/venv/lib/python3.12/site-packages/pandas/tests/groupby/test_raises.pyú<lambda>r      s
   € �!�a‘%€ ó    )	r   r   r   é   r   r   r   é   r   é	   ©	r   r   r   r   r   r   r   r   r   ©	r   r   é   r   r   r   r   r   r   )Úparamsc                 ó   — | j                   S ©N©Úparam©Úrequests    r   Úbyr       s   € ð �=‰=Ðr   TFc                 ó   — | j                   S r   r   r   s    r   Úgroupby_seriesr"   '   s   € à�=‰=Ðr   c                  óR   — t        g d¢g d¢t        d«      t        d«      dœ«      } | S )Nr   r   r   Ú	xyzwtyuio©r   r	   ÚcÚd)r   ÚrangeÚlist©Údfs    r   Údf_with_string_colr,   ,   s-   € ä	â,Ú,Ü�q“Ü�kÓ"ñ		
ó
€Bð €Ir   c                  ór   — t        g d¢g d¢t        d«      t        j                  ddddddd	«      d
œ«      } | S )Nr   r   r   iÕ  r   é
   é   é   i`= r%   )r   r(   Údatetimer*   s    r   Údf_with_datetime_colr2   9   s?   € ä	â,Ú,Ü�q“Ü×"Ñ" 4¨¨A¨r°2°r¸6ÓBñ		
ó
€Bð €Ir   c                  óh   — t        g d¢g d¢t        d«      t        j                  d¬«      dœ«      } | S )Nr   r   r   r   )Údaysr%   )r   r(   r1   Ú	timedeltar*   s    r   Údf_with_timedelta_colr6   F   s3   € ä	â,Ú,Ü�q“Ü×#Ñ#¨Ô+ñ		
ó
€Bð €Ir   c            
      ó`   — t        g d¢g d¢t        d«      t        g d¢g d¢d¬«      dœ«      } | S )Nr   r   r   ©	r   r   r   r   r	   r	   r	   r	   r&   r%   T©Ú
categoriesÚordered)r   r(   r   r*   s    r   Údf_with_cat_colr<   S   s6   € ä	â,Ú,Ü�q“ÜÚ=Ú/Øôñ			
ó
€Bð €Ir   c                 óØ  — |dk(  rd nt         }t        j                  ||¬«      5  | €B|dk(  r t        ||«      |Ž  nŽ|dk(  r |j                  |g|¢­Ž  nu |j
                  |g|¢­Ž  nat        j                  | |¬«      5  |dk(  r t        ||«      |Ž  n,|dk(  r |j                  |g|¢­Ž  n |j
                  |g|¢­Ž  d d d «       d d d «       y # 1 sw Y   ŒxY w# 1 sw Y   y xY w)NÚ ©ÚmatchÚmethodÚagg)ÚFutureWarningÚtmÚassert_produces_warningÚgetattrrB   Ú	transformÚpytestÚraises)ÚklassÚmsgÚhowÚgbÚgroupby_funcÚargsÚwarn_msgÚ
warn_klasss           r   Ú_call_and_checkrR   d   së   € Ø! Rš‘¬]€JÜ	×	#Ñ	# J°hÔ	?ñ 6Øˆ=Ø�hŠØ)”˜˜LÓ)¨4Ò0Ø˜’Ø�—‘�|Ð+ dÔ+à�—‘˜\Ð1¨DÔ1ä—‘˜u¨CÔ0ñ 6Ø˜(’?Ø-”G˜B Ó-¨tÒ4Ø˜E’\Ø�B—F‘F˜<Ð/¨$Ô/à �B—L‘L Ð5°Ó5÷6÷6ð 6÷6ð 6ú÷6ð 6ús%   ¥AC ÂACÃC ÃC	ÃC Ã C)rL   )rA   rB   rG   c           	      ó  — |}t        ||«      }|j                  |¬«      }|r|d   }|dk(  rt        |d«      rJ ‚y i dd“dd“dd“dt        df“d	d“d
d“dt        t        fdf“dt        t        fdf“dt        t        fdf“dt        t        fdf“dt        df“dd“dd“dd“dd“dd“dd“i dd“dt        t        j                  d«      f“dt        t        j                  d«      f“d d“d!d“d"d“d#t        df“d$t        t        j                  d%«      f“d&t        d'f“d(d“d)t        d*f“d+d“d,d“d-t        d*f“d.t        d*f“d/d“d0t        t        j                  d1«      f“¥|   \  }	}
|r{|d2v rd3|› d4�}
|d5v rmt        }	nf|d#k(  r|d   j                  j                  d6k(  rd7}
nB|dk(  r|d   j                  j                  d6k(  rd8}
n|d9v r|
j                  d:d;«      }
n|dk(  rd<}
|dk(  r|rd=nd>}|› d?�}nd@}t        |	|
| ||||«       y )AN©r    r'   ÚcorrwithÚall©Nr>   ÚanyÚbfillzCould not convertÚcountÚcumcountÚcummaxzH(function|cummax) is not (implemented|supported) for (this|object) dtypeÚcumminzH(function|cummin) is not (implemented|supported) for (this|object) dtypeÚcumprodzI(function|cumprod) is not (implemented|supported) for (this|object) dtypeÚcumsumzH(function|cumsum) is not (implemented|supported) for (this|object) dtypeÚdiffúunsupported operand typeÚffillÚfillnaÚfirstÚidxmaxÚidxminÚlastÚmaxÚmeanz-agg function failed [how->mean,dtype->object]Úmedianz/agg function failed [how->median,dtype->object]ÚminÚngroupÚnuniqueÚ
pct_changeÚprodz-agg function failed [how->prod,dtype->object]Úquantilez4dtype 'object' does not support operation 'quantile'ÚrankÚsemz!could not convert string to floatÚshiftÚsizeÚskewÚstdÚsumÚvarz%agg function failed [how->var,dtype->)
ro   ri   rj   r_   r^   rv   rr   rx   ru   rp   z(dtype 'str' does not support operation 'ú')rr   rv   ru   ÚpyarrowzBoperation 'truediv' not supported for dtype 'str' with dtype 'str'z>operation 'sub' not supported for dtype 'str' with dtype 'str')r]   r\   ÚobjectÚstrz1Cannot perform reduction 'mean' with string dtyper   r   úGroupBy.fillna is deprecatedr>   )r   ÚgroupbyÚhasattrÚ	TypeErrorÚNotImplementedErrorÚreÚescapeÚ
ValueErrorÚdtypeÚstorageÚreplacerR   )rL   r    r"   rN   r,   Úusing_infer_stringr+   rO   rM   rJ   rK   ÚkindrP   s                r   Útest_groupby_raises_stringrŠ   x   s›  € ð 
€BÜ" <°Ó4€DØ	�‰�rˆÓ	€BáØ�‰Wˆà˜:Ò%Ü˜r :Ô.Ð.Ð.Øð;Øˆzð;àˆzð;ð 	�ð;ð 	”YÐ 3Ð4ð	;ð
 	�ð;ð 	�Jð;ð 	Ü ¤)Ð,ØVð
ð;ð 	Ü ¤)Ð,ØVð
ð;ð 	Ü ¤)Ð,ØWð
ð;ð& 	Ü ¤)Ð,ØVð
ð';ð. 	”Ð6Ð7ð/;ð0 	�ð1;ð2 	�*ð3;ð4 	�ð5;ð6 	�*ð7;ð8 	�*ð9;ð: 	�
ñ;;ð< 	ˆzð=;ð> 	ÜÜ�I‰IÐEÓFð
ð?;ðF 	ÜÜ�I‰IÐGÓHð
ðG;ðN 	ˆzðO;ðP 	�*ðQ;ðR 	�:ðS;ðT 	”yÐ"<Ð=ðU;ðV 	ÜÜ�I‰IÐEÓFð
ðW;ð^ 	”YÐ VÐWð_;ð` 	�
ða;ðb 	”
Ð?Ð@ðc;ðd 	�ðe;ðf 	�
ðg;ðh 	”Ð@ÐAði;ðj 	”
Ð?Ð@ðk;ðl 	ˆzðm;ðn 	ÜÜ�I‰IÐ=Ó>ð
ño;ðv ñw;�J€Eˆ3ñz Øð 
ñ 
ð =¸\¸NÈ!ÐLˆCØÐ5Ñ5ä!‘Ø˜\Ò)¨b°©g¯m©m×.CÑ.CÀyÒ.Pð W‰CØ˜VÒ#¨¨3©¯©×(=Ñ(=ÀÒ(Jð S‰CàÐ1Ñ1Ø—+‘+˜h¨Ó.‰CØ˜ZÒ'ØEˆCà�xÒÙ)‰x¨{ˆØ�VÐ7Ð8‰àˆÜ�E˜3  R¨°t¸XÕFr   rB   rG   c                 óÄ   — |}|j                  |¬«      }|r|d   }d„ }t        j                  t        d¬«      5   t	        || «      |«       d d d «       y # 1 sw Y   y xY w)NrT   r'   c                 ó   — t        d«      ‚©NúTest error message©r€   r   s    r   Úfuncz,test_groupby_raises_string_udf.<locals>.funcó   ó   € ÜÐ,Ó-Ð-r   rŽ   r?   ©r~   rH   rI   r€   rF   )rL   r    r"   r,   r+   rM   r�   s          r   Útest_groupby_raises_string_udfr“   ë   s_   € à	€BØ	�‰�rˆÓ	€BáØ�‰Wˆò.ô 
�‰”yÐ(<Ô	=ñ ØŒ��CÓ˜Ô÷÷ ñ úó   ºAÁAÚgroupby_func_npc           	      ó   — |}|j                  |¬«      }|r|d   }t        j                  dt        j                  t        dfi|   \  }}	|r|t        j                  u rt        }d}	|rd}
nd}
t        ||	| ||d|
¬	«       y )
NrT   r'   rW   zEagg function failed|Cannot perform reduction 'mean' with string dtypez-dtype 'str' does not support operation 'mean'úusing SeriesGroupBy.[sum|mean]ú!using DataFrameGroupBy.[sum|mean]r   ©rP   )r~   Únprw   ri   r€   rR   )rL   r    r"   r•   r,   rˆ   r+   rM   rJ   rK   rP   s              r   Útest_groupby_raises_string_npr›   ú   s“   € ð 
€BØ	�‰�rˆÓ	€BáØ�‰Wˆô 	�‰�
Ü
�‰ÜØSð
ðð ñ�J€Eˆ3ñ ØœbŸg™gÑ%ÜˆEØ=ˆáØ3‰à6ˆÜ�E˜3  R¨¸"ÀxÖPr   c           	      ó<  — |}t        ||«      }|j                  |¬«      }|r|d   }|dk(  rt        |d«      rJ ‚y i dd“dd“dd“dt        df“d	d“d
d“dd“dd“dt        df“dt        df“dd“dd“dd“dd“dd“dd“dd“i dd“dd“dd“dd“dd“dd“dt        df“d t        d!f“d"d“d#d“d$d“d%d“d&d“d't        d(j	                  d)d*g«      f“d+d“d,t        d-f“d.t        d/f“¥|   \  }}	|d0v rd1|› d2�}
n|dk(  r|rd3nd4}|› d5�}
nd6}
t        ||	| ||||
¬7«       y )8NrT   r'   rU   rV   rW   rX   rY   z+cannot perform __mul__ with this index typerZ   r[   r\   r]   r^   z3datetime64 type does not support cumprod operationsr_   z2datetime64 type does not support cumsum operationsr`   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   z/cannot perform __truediv__ with this index typero   z%datetime64 type does not support prodrp   rq   rr   rs   rt   ru   ú|z1dtype datetime64\[ns\] does not support reductionz0datetime64 type does not support skew operationsrv   rw   ú/datetime64 type does not support sum operationsrx   z/datetime64 type does not support var operations)rX   rV   ry   z&' with datetime64 dtypes is deprecatedr   r   r}   r>   r™   )r   r~   r   r€   ÚjoinrR   )rL   r    r"   rN   r2   r+   rO   rM   rJ   rK   rP   r‰   s               r   Útest_groupby_raises_datetimer      s•  € ð 
€BÜ" <°Ó4€DØ	�‰�rˆÓ	€BáØ�‰Wˆà˜:Ò%Ü˜r :Ô.Ð.Ð.Øð+Øˆzð+àˆzð+ð 	�ð+ð 	”YÐ MÐNð	+ð
 	�ð+ð 	�Jð+ð 	�*ð+ð 	�*ð+ð 	”IÐTÐUð+ð 	”9ÐRÐSð+ð 	�
ð+ð 	�ð+ð 	�*ð+ð 	�ð+ð 	�*ð+ð  	�*ð!+ð" 	�
ñ#+ð$ 	ˆzð%+ð& 	�
ð'+ð( 	�*ð)+ð* 	ˆzð++ð, 	�*ð-+ð. 	�:ð/+ð0 	”yÐ"SÐTð1+ð2 	”ÐCÐDð3+ð4 	�Jð5+ð6 	�
ð7+ð8 	ˆzð9+ð: 	�ð;+ð< 	�
ð=+ð> 	ÜØ�H‰HàHØFðóð
ð?+ðP 	ˆzðQ+ðR 	”	ÐLÐMðS+ðT 	”	ÐLÐMñU+ðV ñW+�J€Eˆ3ðZ �~Ñ%Ø�|�nÐ$JÐK‰Ø	˜Ò	!Ù)‰x¨{ˆØ�VÐ7Ð8‰àˆÜ�E˜3  R¨°tÀhÖOr   c                 óÄ   — |}|j                  |¬«      }|r|d   }d„ }t        j                  t        d¬«      5   t	        || «      |«       d d d «       y # 1 sw Y   y xY w)NrT   r'   c                 ó   — t        d«      ‚r�   r�   r   s    r   r�   z.test_groupby_raises_datetime_udf.<locals>.funcm  r‘   r   rŽ   r?   r’   )rL   r    r"   r2   r+   rM   r�   s          r   Ú test_groupby_raises_datetime_udfr£   e  s_   € à	€BØ	�‰�rˆÓ	€BáØ�‰Wˆò.ô 
�‰”yÐ(<Ô	=ñ ØŒ��CÓ˜Ô÷÷ ñ úr”   c           	      óÈ   — |}|j                  |¬«      }|r|d   }t        j                  t        dft        j                  di|   \  }}|rd}	nd}	t        ||| ||d|	¬«       y )	NrT   r'   rž   rW   r—   r˜   r   r™   ©r~   rš   rw   r€   ri   rR   )
rL   r    r"   r•   r2   r+   rM   rJ   rK   rP   s
             r   Útest_groupby_raises_datetime_npr¦   t  sw   € ð 
€BØ	�‰�rˆÓ	€BáØ�‰Wˆô 	�‰”ÐMÐNÜ
�‰�ðð ñ�J€Eˆ3ñ
 Ø3‰à6ˆÜ�E˜3  R¨¸"ÀxÖPr   r�   )ro   r^   ru   rx   c                 óT   — |}|j                  d¬«      }t        t        dd|| g «       y )Nr   rT   z/timedelta64 type does not support .* operationsrA   )r~   rR   r€   )r�   r6   r+   rM   s       r   Útest_groupby_raises_timedeltar¨   Œ  s1   € à	€BØ	�‰�sˆÓ	€BäÜØ9ØØ
ØØ
õr   c           	      ór  — |}t        ||«      }|j                  |¬«      }|r|d   }|dk(  rt        |d«      rJ ‚y i dd“dd“dd“dt        df“d	d“d
d“dt        t        fdf“dt        t        fdf“dt        t        fdf“dt        t        fdf“dt        df“dd“d|st        dfnd“dd“dd“dd“dd“i dd“dt        dj                  dd g«      f“d!t        dj                  d"d#g«      f“d$d“d%d“d&d“d't        d(f“d)t        d*f“d+t        d,f“d-d“d.t        dj                  d/d0g«      f“d1d“d2d“d3t        dj                  d4d5g«      f“d6t        dj                  d7d8g«      f“d9t        d:f“d;t        dj                  d<d=g«      f“¥|   \  }	}
|dk(  r|rd>nd?}|› d@�}ndA}t        |	|
| ||||«       y )BNrT   r'   rU   rV   rW   rX   rY   ú=unsupported operand type\(s\) for \*: 'Categorical' and 'int'rZ   r[   r\   zz(category type does not support cummax operations|category dtype not supported|cummax is not supported for category dtype)r]   zz(category type does not support cummin operations|category dtype not supported|cummin is not supported for category dtype)r^   z|(category type does not support cumprod operations|category dtype not supported|cumprod is not supported for category dtype)r_   zz(category type does not support cumsum operations|category dtype not supported|cumsum is not supported for category dtype)r`   zDunsupported operand type\(s\) for -: 'Categorical' and 'Categorical'rb   rc   úSCannot setitem on a Categorical with a new category \(0\), set the categories firstrd   re   rf   rg   rh   ri   r�   z2'Categorical' .* does not support reduction 'mean'ú2category dtype does not support aggregation 'mean'rj   z4'Categorical' .* does not support reduction 'median'ú4category dtype does not support aggregation 'median'rk   rl   rm   rn   zDunsupported operand type\(s\) for /: 'Categorical' and 'Categorical'ro   ú.category type does not support prod operationsrp   úNo matching signature foundrq   rr   ú1'Categorical' .* does not support reduction 'sem'ú1category dtype does not support aggregation 'sem'rs   rt   ru   ú0dtype category does not support reduction 'skew'ú.category type does not support skew operationsrv   ú1'Categorical' .* does not support reduction 'std'ú1category dtype does not support aggregation 'std'rw   ú-category type does not support sum operationsrx   ú1'Categorical' .* does not support reduction 'var'ú1category dtype does not support aggregation 'var'r   r   r}   r>   )r   r~   r   r€   r�   rŸ   rR   )rL   r    r"   rN   Úusing_copy_on_writer<   r+   rO   rM   rJ   rK   r‰   rP   s                r   Útest_groupby_raises_categoryrº   ›  s·  € ð
 
€BÜ" <°Ó4€DØ	�‰�rˆÓ	€BáØ�‰Wˆà˜:Ò%Ü˜r :Ô.Ð.Ð.ØðvØˆzðvàˆzðvð 	�ðvð 	ÜØLð
ð	vð 	�ðvð 	�Jðvð 	Ü ¤)Ð,ð:ð
ðvð  	Ü ¤)Ð,ð:ð
ð!vð, 	Ü ¤)Ð,ð;ð
ð-vð8 	Ü ¤)Ð,ð:ð
ð9vðD 	ÜØSð
ðEvðL 	�ðMvðN 	ñ
 #ô	 ð'ñ
ð ð[vð\ 	�ð]vð^ 	�*ð_vð` 	�*ðavðb 	�
ñcvðd 	ˆzðevðf 	ÜØ�H‰HàHØHðóð
ðgvðx 	ÜØ�H‰HàJØJðóð
ðyvðJ 	ˆzðKvðL 	�*ðMvðN 	�:ðOvðP 	ÜØSð
ðQvðX 	”ÐLÐMðYvðZ 	”YÐ =Ð>ð[vð\ 	�
ð]vð^ 	ÜØ�H‰HàGØGðóð
ð_vðp 	�ðqvðr 	�
ðsvðt 	ÜØ�H‰HàFØDðóð
ðuvðF 	ÜØ�H‰HàGØGðóð
ðGvðX 	”	ÐJÐKðYvðZ 	ÜØ�H‰HàGØGðóð
ñ[vðl ñmv�J€Eˆ3ðp �xÒÙ)‰x¨{ˆØ�VÐ7Ð8‰àˆÜ�E˜3  R¨°t¸XÕFr   c                 óÄ   — |}|j                  |¬«      }|r|d   }d„ }t        j                  t        d¬«      5   t	        || «      |«       d d d «       y # 1 sw Y   y xY w)NrT   r'   c                 ó   — t        d«      ‚r�   r�   r   s    r   r�   z.test_groupby_raises_category_udf.<locals>.func4  r‘   r   rŽ   r?   r’   )rL   r    r"   r<   r+   rM   r�   s          r   Ú test_groupby_raises_category_udfr½   +  sa   € ð 
€BØ	�‰�rˆÓ	€BáØ�‰Wˆò.ô 
�‰”yÐ(<Ô	=ñ ØŒ��CÓ˜Ô÷÷ ñ úr”   c           	      óÔ   — |}|j                  |¬«      }|r|d   }t        j                  t        dft        j                  t        dfi|   \  }}|rd}	nd}	t        ||| ||d|	¬«       y )	NrT   r'   r¶   r¬   r—   r˜   r   r™   r¥   )
rL   r    r"   r•   r<   r+   rM   rJ   rK   rP   s
             r   Útest_groupby_raises_category_npr¿   ;  s€   € ð 
€BØ	�‰�rˆÓ	€BáØ�‰Wˆô 	�‰”ÐKÐLÜ
�‰ÜØ@ð
ðð ñ�J€Eˆ3ñ Ø3‰à6ˆÜ�E˜3  R¨¸"ÀxÖPr   c           	      ó\  — |}t        g d¢g d¢d¬«      |d<   t        ||«      }|j                  ||¬«      }	|r|	d   }	|dk(  rt        |	d«      rJ ‚y | xr* t	        d	„ |	j
                  j                  «       D «       «      }
|s5| d
k7  r0t        |t        «      r t        |d   t        «      r|ddgk(  r|
rJ ‚d}
| d
k(  rd}
i dd“dd“dd“dt        df“dd“dd“dt        t        fdf“dt        t        fdf“dt        t        fdf“dt        t        fdf“dt        df“dd“d |st        d!fnd“d"d“d#|
rt        d$fnd“d%|
rt        d$fnd“d&d“i d'd“d(t        d)f“d*t        d+f“d,d“d-d“d.d“d/t        df“d0t        d1f“d2t        d3f“d4d“d5t        d6j                  d7d8g«      f“d9d“d:d“d;t        d6j                  d<d=g«      f“d>t        d6j                  d?d@g«      f“dAt        dBf“dCt        d6j                  dDdEg«      f“¥|   \  }}|d k(  r|rdFndG}|› dH�}ndI}t        ||| |	|||«       y )JNr8   r%   Tr9   r   )r    Úobservedr'   rU   c              3   ó4   K  — | ]  }|j                   –— Œ y ­wr   )Úempty)Ú.0Úgroups     r   ú	<genexpr>z;test_groupby_raises_category_on_category.<locals>.<genexpr>q  s   è ø€ Ò'T¸¨¯­Ñ'Tùs   ‚rG   r   r	   FrV   rW   rX   rY   rª   rZ   r[   r\   zz(cummax is not supported for category dtype|category dtype not supported|category type does not support cummax operations)r]   zz(cummin is not supported for category dtype|category dtype not supported|category type does not support cummin operations)r^   z|(cumprod is not supported for category dtype|category dtype not supported|category type does not support cumprod operations)r_   zz(cumsum is not supported for category dtype|category dtype not supported|category type does not support cumsum operations)r`   ra   rb   rc   r«   rd   re   z(empty group due to unobserved categoriesrf   rg   rh   ri   r¬   rj   r­   rk   rl   rm   rn   ro   r®   rp   r¯   rq   rr   r�   r°   r±   rs   rt   ru   r³   r²   rv   r´   rµ   rw   r¶   rx   r·   r¸   r   r   r}   r>   )r   r   r~   r   rX   ÚgroupsÚvaluesÚ
isinstancer)   r|   r€   r�   r„   rŸ   rR   )rL   r    r"   rN   rÁ   r¹   r<   r+   rO   rM   Úempty_groupsrJ   rK   r‰   rP   s                  r   Ú(test_groupby_raises_category_on_categoryrË   V  s.  € ð 
€BÜÚ5Ú'Øô€B€s�Gô
 # <°Ó4€DØ	�‰�r HˆÓ	-€BáØ�‰Wˆà˜:Ò%Ü˜r :Ô.Ð.Ð.Øà�<ÒT¤CÑ'TÀÇÁ×AQÑAQÓASÔ'TÓ$T€LáØ�;ÒÜ�rœ4Ô Ü�r˜!‘uœcÔ"Ø�3˜�*ÒáÐÐàˆØ
ˆkÒàˆðdØˆzðdàˆzðdð 	�ðdð 	ÜØLð
ð	dð 	�ðdð 	�Jðdð 	Ü ¤)Ð,ð@ð
ðdð  	Ü ¤)Ð,ð@ð
ð!dð, 	Ü ¤)Ð,ðAð
ð-dð8 	Ü ¤)Ð,ð@ð
ð9dðD 	”Ð6Ð7ðEdðF 	�ðGdðH 	ñ
 #ô	 ð'ñ
ð ðUdðV 	�ðWdðX 	Ùô ÐIÑJàð]dð^ 	Ùô ÐIÑJàðcdðd 	�
ñedðf 	ˆzðgdðh 	”ÐPÐQðidðj 	”9ÐTÐUðkdðl 	ˆzðmdðn 	�*ðodðp 	�:ðqdðr 	”yÐ"<Ð=ðsdðt 	”ÐLÐMðudðv 	”YÐ =Ð>ðwdðx 	�
ðydðz 	ÜØ�H‰HàGØGðóð
ð{dðL 	�ðMdðN 	�
ðOdðP 	ÜØ�H‰HàDØFðóð
ðQdðb 	ÜØ�H‰HàGØGðóð
ðcdðt 	”	ÐJÐKðudðv 	ÜØ�H‰HàGØGðóð
ñwdðH ñId�J€Eˆ3ðL �xÒÙ)‰x¨{ˆØ�VÐ7Ð8‰àˆÜ�E˜3  R¨°t¸XÕFr   c                  ó  — t        dgdgdgdœ«      } d}t        j                  t        |¬«      5  | j	                  dd¬«      }d d d «       t        j                  t        d	¬«      5  d
    d d d «       y # 1 sw Y   Œ3xY w# 1 sw Y   y xY w)Nr   r   r   )r   r	   r&   z+DataFrame.groupby with axis=1 is deprecatedr?   r   )Úaxisz'Cannot subset columns when using axis=1r	   )r   rD   rE   rC   r~   rH   rI   r„   )r+   rK   rM   s      r   Ú%test_subsetting_columns_axis_1_raisesrÎ   î  s…   € ä	˜!˜ A 3¨a¨SÑ1Ó	2€BØ
7€CÜ	×	#Ñ	#¤M¸Ô	=ñ %Ø�Z‰Z˜ !ˆZÓ$ˆ÷%ä	�‰”zÐ)RÔ	Sñ Ø
ˆ3Š÷ð ÷%ð %ú÷ð ús   °A6Á'BÁ6A?ÂB)r>   )+r1   r‚   Únumpyrš   rH   Úpandasr   r   r   r   Úpandas._testingÚ_testingrD   Úpandas.tests.groupbyr   ÚfixtureÚarrayÚdictÚzipr(   r    r"   r,   r2   r6   r<   rR   ÚmarkÚparametrizerŠ   r“   rw   ri   r›   r    r£   r¦   r¨   rº   r½   r¿   rË   rÎ   r   r   r   ú<module>rÚ      s‚  ðó
 Û 	ã Û ÷ó õ Ý 8ð €‡�àØ	ˆØ	ˆcˆ
Ù�CÔÙÚ#Øˆ�‰Ò,Ó-Ù‰S‘�q“Ò6Ó7Ó8ÙÒ*Ó+Ù	Ò+Ó	,©fÒ5PÓ.QÐRðôñóðð €‡�˜˜e�}Ô%ñó &ðð ‡�ñ	ó ð	ð ‡�ñ	ó ð	ð ‡�ñ	ó ð	ð ‡�ñó ðó 6ð( ‡�×Ñ˜Ò >Ó?ñoGó @ðoGðd ‡�×Ñ˜ ¨Ð 4Ó5ñó 6ðð ‡�×Ñ˜ ¨Ð 4Ó5Ø‡�×ÑÐ*¨R¯V©V°R·W±WÐ,=Ó>ñ Qó ?ó 6ð QðF ‡�×Ñ˜Ò >Ó?ñBPó @ðBPðJ ‡�×Ñ˜ ¨Ð 4Ó5ñó 6ðð ‡�×Ñ˜ ¨Ð 4Ó5Ø‡�×ÑÐ*¨R¯V©V°R·W±WÐ,=Ó>ñQó ?ó 6ðQð, ‡�×Ñ˜Ò!CÓDñó Eðð ‡�×Ñ˜Ò >Ó?ñLGó @ðLGð^ ‡�×Ñ˜ ¨Ð 4Ó5ñó 6ðð ‡�×Ñ˜ ¨Ð 4Ó5Ø‡�×ÑÐ*¨R¯V©V°R·W±WÐ,=Ó>ñQó ?ó 6ðQð2 ‡�×Ñ˜Ò >Ó?ñTGó @ðTGónr   