+
    xȇiJ                         R t ^ RIHtHt ^ RIt^ RIt^ RIHtH	t	 ^ RI
t^ RI
HtHtHtHtHtHtHtHtHt ^ RIHt ^ RIHt  ! R R4      t ! R R	4      t ! R
 R4      t ! R R4      tR tR tR# )zG
test where we are determining what we are grouping, or getting groups
)date	timedeltaN)Pandas4WarningSpecificationError)	CategoricalIndex	DataFrameGrouperIndex
MultiIndexSeries	Timestamp
date_rangeperiod_range)Groupingc                      a  ] tR t^%t o R tR tR tR tR tR t	R t
]P                  P                  RR	 R
 .4      R 4       tR tRtV tR# )TestSelectionc                x   \        ^^..RR.R7      pVP                  R4      p\        P                  ! \        RR7      ;_uu_ 4        VR.,           RRR4       \        P                  ! \        RR7      ;_uu_ 4        VRR.,           RRR4       R#   + '       g   i     LJ; i  + '       g   i     R# ; i)	   ABcolumnsz"Columns not found: 'C'"matchCNz^[^A]+$)r   groupbypytestraisesKeyError)selfdfgs   &  r/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/groupby/test_grouping.pytest_select_bad_cols"TestSelection.test_select_bad_cols&   s    Ax#s4JJsO]]8+GHHseH I ]]8955 sCjM 65 IH 655s   B?B(B%	(B9	c           
     h   \        . RO\        ^4      \        ^^4      \        ^ ^^4      .R7      pRp\        P                  ! \        VR7      ;_uu_ 4        VP                  R 4       RRR4       \        P                  ! \        VR7      ;_uu_ 4        VP                  R R.4       RRR4       VP                  R4      pVP                  4       pVP                  P                  ^8X  g   Q hVP                  P                  ^8X  g   Q hR#   + '       g   i     L; i  + '       g   i     L; i)r   r   )r   dataz!Grouper for 'A' not 1-dimensionalr   N)r   r   r   r   )
r   ranger   r   
ValueErrorr   countr   nlevelssize)r   r    msggroupedcs   &    r"   'test_groupby_duplicated_column_errormsg5TestSelection.test_groupby_duplicated_column_errormsg1   s    (a%1+uQPQST~/V
 2]]:S11JJsO 2]]:S11JJSz" 2 **S/MMOyy  A%%%yy~~""" 2111s   DD!D	!D1	c                   VP                  R 4      P                  P                  4       pVP                  R 4      R,          P                  4       p\        P                  ! W#4       RVR&   VP                  R 4      P                  RR7      pVP                  R 4      . RO,          P                  R4      p\        P                  ! W#4       R# )r   r   g      ?meanTnumeric_onlyN)r   Dr2   )r   r   sumtmassert_series_equalr2   aggassert_frame_equalr   r    resultexpecteds   &&  r"   test_column_select_via_attr)TestSelection.test_column_select_via_attrB   s    C""&&(::c?3'++-
v06
C%%4%8::c?#56::6B
f/    c                   \        R . ROR. R	OR\        P                  P                  ^4      P	                  ^4      R\        P                  P                  ^4      P	                  ^4      R\        P                  P                  ^4      P	                  ^4      /4      pVP                  R 4      RR.,          P                  4       pVP                  R 4      VP                  R,          ,          P                  4       pVP                  R. R
O3,          P                  R 4      P                  4       p\        P                  ! W$4       \        P                  ! W44       R# )r   r   r   r5   E:      NNNNNfoobarrG   rH   rG   rH   rG   rG   onerJ   twothreerK   rK   rJ   rL   )r   r   r5   )r   nprandomdefault_rngstandard_normalr   r2   r   locr7   r:   r   r    r<   result2r=   s   &    r"   test_getitem_list_of_columns*TestSelection.test_getitem_list_of_columnsL   s   MQRYY**1-==a@RYY**1-==a@RYY**1-==a@
 C#s,113**S/"**S/277966!_,-55c:??A
f/
g0r@   c                   \        ^ \        R4      ^,          ^\        P                  P	                  ^4      P                  ^4      ^\        P                  P	                  ^4      P                  ^4      ^\        P                  P	                  ^4      P                  ^4      /4      pVP                  ^ 4      VP                  R,          ,          P                  4       pVP                  ^ 4      ^^.,          P                  4       pVP                  R. RO3,          P                  ^ 4      P                  4       p\        P                  ! W$4       \        P                  ! W44       \        P                  ! \        RR7      ;_uu_ 4        VP                  ^ 4      R,          P                  4        RRR4       R#   + '       g   i     R# ; i)	    abcd:r      NrE   "Cannot subset columns with a tupler   N)rW   rC   rD   )rC   rD   )r   listrM   rN   rO   rP   r   r   r2   rQ   r7   r:   r   r   r(   rR   s   &    r"   !test_getitem_numeric_column_names/TestSelection.test_getitem_numeric_column_names_   s?   4<!#299((+;;A>299((+;;A>299((+;;A>	
 Arzz#/446**Q-A',,.66!Y,'//2779
f/
g0 ]]:-QRRJJqM$$$& SRRRs   'F<<G	c                    \         P                  ! \        R R7      ;_uu_ 4        VP                  R4      R,          P	                  4        RRR4       R#   + '       g   i     R# ; i)rZ   r   r   N)r   r5   )r   r   r(   r   r2   r   r    s   &&r"   +test_getitem_single_tuple_of_columns_raises9TestSelection.test_getitem_single_tuple_of_columns_raisesu   s=    ]]:-QRRJJsOH%**, SRRRs   'AA'	c                J   \        R . ROR. ROR\        P                  P                  ^4      P	                  ^4      R\        P                  P                  ^4      P	                  ^4      R\        P                  P                  ^4      P	                  ^4      /4      pVP                  R 4      R,          P                  4       pVP                  RR R.3,          P                  R 4      P                  4       pVP                  R	,          pTp\        P                  ! W%4       R# )
r   r   r   r5   rB   rE   NrF   rI   )rE   rW   )r   rM   rN   rO   rP   r   r2   rQ   ilocr7   r8   )r   r    r<   as_frame	as_seriesr=   s   &     r"   test_getitem_single_column(TestSelection.test_getitem_single_columnz   s    MQRYY**1-==a@RYY**1-==a@RYY**1-==a@
 C%**,66!c3Z-(005::<MM$'	
v0r@   funcc                "    V P                  4       # Nr6   xs   &r"   <lambda>TestSelection.<lambda>   s
    1557r@   c                &    V P                  R  4      # )c                 "    V P                  4       # rj   rk   )ys   &r"   rn   (TestSelection.<lambda>.<locals>.<lambda>   s
    aeegr@   )r9   rl   s   &r"   rn   ro      s    aee4E.Fr@   c           
        \        R . ROR^R^R^/4      pVP                  R R.4      R R.,          p\        P                  ! RR	.R R.R7      p\        R ^^.R^^./VR7      pV! V4      p\        P
                  ! We4       R# )
abr.   dnamesindexNr   r   rC   )r   rY   rC   rY   )r   r   r
   from_tuplesr7   r:   )r   rh   r    gbidxr=   r<   s   &&     r"   test_getitem_from_grouper'TestSelection.test_getitem_from_grouper   s    
 YQQQ?@ZZc
#S#J/$$ff%5c3ZHcAq63A7sCb
f/r@   c                   a \        R R R 4       /4      oSP                  R 4      pSP                  V3R l4      pVP                  pVP                  p\        P                  ! WC4       R# )Tuplesc              3      "   T F?  p\         P                  P                  ^4      P                  ^^^4       F  pW3x  K
  	  KA  	  R# 5irC   NrM   rN   rO   integers.0rm   rr   s   &  r"   	<genexpr>JTestSelection.test_indices_grouped_by_tuple_with_lambda.<locals>.<genexpr>   D      #YY2215>>q!QG FG #   AA	c                 .   < SP                   V ^ 3,          # rW   rc   rm   r    s   &r"   rn   ITestSelection.test_indices_grouped_by_tuple_with_lambda.<locals>.<lambda>       Ar@   NrW   r   )r   r   indicesr7   assert_dict_equalr   r   	gb_lambdar=   r<   r    s   &    @r"   )test_indices_grouped_by_tuple_with_lambda7TestSelection.test_indices_grouped_by_tuple_with_lambda   sc     #
 ZZ!JJ67	::""
V.r@    N)__name__
__module____qualname____firstlineno__r#   r/   r>   rT   r\   r`   rf   r   markparametrizer   r   __static_attributes____classdictcell____classdict__s   @r"   r   r   %   sa     	#"01&',-
1& [["$FG	0	0/ /r@   r   c                      a ] tR t^t o]P
                  P                  R]! ]! R4      4      ]! ]	P                  ! ^4      4      ]! ]	P                  ! ^]R7      4      ]! R^R7      ]! R^R7      .4      R 4       tR tR tR	 tR
 t]P
                  P                  RRR.4      R 4       tR tR tR tR tR tR tR tR t]P
                  P                  R. R9O. R:O]! ^4       U u. uF  p \;        R^^V ,           4      NK  	  up .4      R 4       tR tR t R t!R t"R t#R t$R t%R  t&R! t'R" t(R# t)R$ t*]P
                  P                  R%R. R;O.R. R<O..4      R& 4       t+R' t,R( t-]P
                  P                  R)R*].! ^]	P^                  R+7      3R,].! ^]	P^                  ]! . ]	P^                  ^R-7      R.7      3R/].! ^]	P^                  ]! . ]	P^                  ^R-7      R.7      3.4      R0 4       t0R1 t1R2 t2R3 t3R4 t4R5 t5R6 t6R7t7Vt8R8# u up i )=TestGroupingr{   abcdedtypez
2020-01-01periodsc                b   \        \        P                  ! ^
4      P                  ^^4      \	        R4      VR7      pVP                  \	        R4      RR7      P                  R 4       VP                  RRR	1,          Vn        VP                  \	        R4      RR7      P                  R 4       R# )

   AB)r   r{   r   F
group_keysc                     V # rj   r   rl   s   &r"   rn   7TestGrouping.test_grouper_index_types.<locals>.<lambda>       Ar@   Nc                     V # rj   r   rl   s   &r"   rn   r      r   r@   )r   rM   arangereshaper[   r   applyr{   )r   r{   r    s   && r"   test_grouper_index_types%TestGrouping.test_grouper_index_types   s|     ryy},,Q2DJeT


4=U
399+F88DbD>


4=U
399+Fr@   c                    \         P                  ! 4       \        ^R7      ,
          p\        V\         P                  ! 4       4      p\        P
                  ! W".RR.R7      p\        \        P                  P                  ^4      P                  ^ ^d^4      VR7      pVP                  4       P                  \        RRR7      \        RRR7      .4      P                  4       p\        ^ .RR	7      Vn        VP                  \        RRR
7      \        RRR
7      .4      P                  4       p\"        P$                  ! We4       VP                  \        ^ RR
7      \        ^RR
7      .4      P                  4       p\"        P$                  ! We4       R# )   )daysrG   rH   rx   rz   Wkeyfreqint64r   levelr   N)r   todayr   r   r
   from_productr   rM   rN   rO   r   reset_indexr   r   r6   r	   r   r7   r:   )r   d0dates
date_indexr    r=   r<   s   &      r"   test_grouper_multilevel_freq)TestGrouping.test_grouper_multilevel_freq   s3    ZZ\I2..2tzz|,,,e^E5>R
ryy,,Q/88CEZX NNWg%c2GC4PQRSU 	 !!G45s+W5s-KL

#% 	 	f/ 13'qs)CD

#% 	 	f/r@   c                @   \        R . ROR. RO/4      pVP                  R 4      pVP                  4       pVP                  \        R R7      4      pVP                  4       p\        P
                  ! WC4       VP                  R 4      p\        P
                  ! WC4       R# )r   r   r   c                 "    V P                  4       # rj   rk   rl   s   &r"   rn   8TestGrouping.test_grouper_creation_bug.<locals>.<lambda>   s
    1557r@   N)rW   rW   r   r   rC   rC   r   rC   rY   rD         )r   r   r6   r   r7   r:   r   )r   r    r!   r=   r<   s   &    r"   test_grouper_creation_bug&TestGrouping.test_grouper_creation_bug   sx    /6HIJJJsO557JJw3'(
f/*+
f/r@   c           	        \        R . ROR. ROR. RO/4      pVP                  R 4      P                  4       pVP                  \        R R7      .4      pVP                  4       p\        P
                  ! WB4       VP                  R R.4      P                  4       pVP                  \        R R7      \        RR7      .4      pVP                  4       p\        P
                  ! WB4       VP                  R \        RR7      .4      pVP                  4       p\        P
                  ! WB4       VP                  \        R R7      R.4      pVP                  4       p\        P
                  ! WB4       R# )r   r   r   r   N)rW   rW   rW   r   r   r   )r   r   rC   rC   rY   rY   r   )r   r   r6   r   r7   r:   )r   r    r=   r!   r<   s   &    r"   test_grouper_creation_bug2'TestGrouping.test_grouper_creation_bug2   s#    $c+=sDVW
 ::c?&&(JJC()*
f/ ::sCj)--/ JJC('c*:;<
f/ JJW-./
f/ JJC(#./
f/r@   c                   \        R ^VR7      p\        P                  ! \        R4      \	        ^4      V.. ROR7      p\        \        P                  ! ^RR7      VR7      pVP                  \        RR	R
7      4      P                  4       p\        P                  ! \        R4      .R	RR7      P                  V4      p\        ^.VR7      p\        P                   ! WW4       VP                  \        RR7      4      P                  4       pVP                  RR7      P                  4       p\        P                   ! WW4       R# )20130101)r   unitabrJ   rL   rx   r   r   rz   MEr   z
2013-01-31)r   namer   N)rJ   rK   rL   )r   r
   r   r[   r'   r   rM   r   r   r   r6   pdDatetimeIndexr   as_unitr7   r8   )r   r   dtimiserr<   exp_dtir=   s   &&      r"   test_grouper_creation_bug3'TestGrouping.test_grouper_creation_bug3  s   QT:$$$Zq3')
 IIaw'
 W7>?CCE""|$%Dw

'$- 	 D
 	v0 W512668;;U;+//1
v0r@   rh   FTc                r  a \        R . ROR. R	O/4      p\        \        \        ^4      R
R.^,          RR7      4      oV'       d   VP	                  V3R lRR7      pMVP	                  SRR7      p\        \        V4      4      w  rEVR
8X  g   Q hVP                  V4      p\        P                  ! We4       R# )XYT)strictc                    < SV ,          # rj   r   )r   mappings   &r"   rn   <TestGrouping.test_grouper_returning_tuples.<locals>.<lambda>2  s	    73<r@   F)bysortNr   r   r   r   )r   rD   rY   rC   )r   r   )r5   r   )
r   dictzipr'   r   nextiter	get_groupr7   r:   )r   rh   r    r   r   r=   r<   r   s   &&     @r"   test_grouper_returning_tuples*TestGrouping.test_grouper_returning_tuples+  s     13EFs58h%9A%=dKL7eDBwU3Bd2hxd#
f/r@   c                X   \         P                  ! . R
O4      pRR.Vn        \        R\        P
                  ! ^4      R. RO/VR7      pVP                  R\        RR7      .4      P                  RR7      pVP                  4       P                  RR.4      P                  RR7      p\        P                  ! W44       VP                  \        RR7      R.4      P                  RR7      pVP                  4       P                  RR.4      P                  RR7      p\        P                  ! W44       VP                  R4      pVP                  R\        RR7      .4      P                  RR7      pVP                  4       P                  RR.4      P                  RR7      p\        P                  ! W44       VP                  \        RR7      R.4      P                  RR7      pVP                  4       P                  RR.4      P                  RR7      p\        P                  ! W44       R	# )ru   outerinnerr   r   rz   r   Tr3   N)ru   r   )ru   rC   )ru   rY   rv   r   rv   rC   )rv   rY   )rJ   rJ   rK   rK   rJ   rJ   )r
   r~   ry   r   rM   r   r   r   r2   r   r7   r:   )r   r   df_multir<   r=   	df_singles   &     r"   test_grouper_column_and_index*TestGrouping.test_grouper_column_and_index<  s	   
 $$H
 g&	"))A,%OP
 !!3g(>"?@EESWEX  "**C>:??T?R 	 	f/ !!7#93"?@EESWEX  "**GS>:??T?R 	 	f/ ((1	""Cw)?#@AFF G 
 !!#++S'N;@@d@S 	 	f/ ""G'$:C#@AFF G 
 !!#++WcN;@@d@S 	 	f/r@   c                   R R.p\         P                  ! . ROVR7      p\        \        P                  ! ^4      P                  R^4      VR7      pVP                  VR7      P                  4       pVP                  4       P                  V4      P                  4       pVP                  P                  \        P                  4      Vn	        \        P                  ! WE4       R# )rm   rr   rx   rz   r   N))r   r   r   rC   )rY   rD   )r   r   r   )r
   r~   r   rM   r   r   r   r2   r   r   astyper   r7   r:   )r   	idx_namesr   r    	by_levels
by_columnss   &     r"   test_groupby_levels_and_columns,TestGrouping.test_groupby_levels_and_columnsj  s    #J	$$%EYWryy},,R33?JJYJ/446	^^%--i8==?
 (//66rxx@

i4r@   c                   . ROpRR .p\         P                  ! . R	O. R	O. R	O. R	O. R	O.\        4      p\        W#RR7      p\         P                  ! ^^.^^.^^.^^.^^..\        4      p\        W3RR7      p\	        VP
                  VR7      pVP                  ^ VR7      P                  4       p	\	        VP
                  VR7      p
\        P                  ! W4       R# )
r   r   T)
categoriesorderedrz   )r   observed)r&   r{   Nr   )r   rC   r   rC   )
rM   arrayintr   r   Tr   r6   r7   r:   )r   r  r   r  r&   cat_columnsexpected_dataexpected_columnsr    r<   r=   s   &&         r"   *test_groupby_categorical_index_and_columns7TestGrouping.test_groupby_categorical_index_and_columnsx  s    &3Z
xx<|\RTW
 'wtT1a&1a&1a&1a&1a&!I3O+t

 tvv[1!h7;;=-//9IJ
f/r@   c                   \        R ^/\        P                  ! \        R4      \	        R^PR7      .RR.R7      R7      pVP                  \        RR7      \        RR	R
7      .4      P                  4       p\        R . RO/\        P                  ! \        R4      \	        RR	^R7      .RR.R7      R7      p\        P                  ! W#4       R# )r   r   r   r   rJ   rK   rx   rz   r   r   r   )r   r   N)         r  r  r  )
r   r
   r   r[   r   r   r   r6   r7   r:   r;   s   &   r"   #test_grouper_getting_correct_binner0TestGrouping.test_grouper_getting_correct_binner  s     !H))dZ
B?@PU
 5!7T#BC

#% 	 *+))dZ
qIJen
 	f/r@   c                n    VP                  R 4      pVP                  p\        V4      pRR.pWE8X  g   Q hR# )r   rH   rG   N)r   _groupersorted)r   r    r   grouperr<   r=   s   &&    r"   test_grouper_iterTestGrouping.test_grouper_iter  s6    ZZ_++5>!!!r@   c                    \         P                  ! \        R R7      ;_uu_ 4        VP                  . 4       RRR4       R#   + '       g   i     R# ; i)zNo group keys passed!r   N)r   r   r(   r   r_   s   &&r"   test_empty_groupsTestGrouping.test_empty_groups  s/    ]]:-DEEJJrN FEEEs   AA	c                    VP                  R 4      pVP                  pVP                  V4      P                  RR7      pVP                  RR7      p\        P                  ! WE4       R# )r   Tr3   N)r   r!  r2   r7   r:   )r   r    r-   r#  r<   r=   s   &&    r"   test_groupby_grouper!TestGrouping.test_groupby_grouper  sT    **S/""G$))t)<<<T<2
f/r@   c                   \        R ^/4      pVP                  R R/4      P                  R4      pVP                  R.4      P                  R4      p\        P                  ! W#4       \        . RO\        R4      R7      pR^ R^ R^R^/pVP                  V4      P                  4       pVP                  V4      P                  R	4      p\        P                  ! . RO\        P                  R
7      pVP                  V4      P                  4       pVP                  V4      P                  4       p\        P                  ! W#4       \        P                  ! W%4       \        P                  ! W'4       R# )T1T2r6   rX   rz   ru   rv   r.   rw   r2   r   N)      ?       @g      @g      @)rW   rW   r   r   )
r   r   r9   r7   r8   r[   r2   rM   r  r   )r   sr<   r=   r   rS   exp_key	expected2s   &       r"   test_groupby_dict_mapping&TestGrouping.test_groupby_dict_mapping  s   D!9D$<(,,U399dV$((/
v0'tF|<33327#((*))G$((0((<rxx899W%**,IIg&++-	
v0
v/
v1r@   i  c                    V! . ROVR7      p\        . ROVRR7      pVP                  V4      P                  4       pV! ^^.4      pRVP                  n        \
        P                  ! WV4       R# )r   rz   )r{   r   Nr   rC   rY   rD   )r   rW   r   rW   )ru   ru   )r   r   lastr{   r   r7   assert_equal)r   frame_or_seriesr{   objgroupsr<   r=   s   &&&    r"   $test_groupby_series_named_with_tuple1TestGrouping.test_groupby_series_named_with_tuple  s[     l%8E
CV$))+"Aq6*(
)r@   c                   \        R ^RR7      p\        \        P                  P	                  ^4      P                  ^4      VR7      pRp\        P                  ! \        VR7      ;_uu_ 4        VP                  R 4       RRR4       VP                  R 4      P                  4       pVP                  VP                  4      P                  4       pRVP                  n        \        P                  ! WE4       R#   + '       g   i     L; i)	z01-Jan-2013MSr   r   rz   z''Timestamp' object is not subscriptabler   c                     V R ,          # ):rW   r   Nr   r   s   &r"   rn   DTestGrouping.test_groupby_grouper_f_sanity_checked.<locals>.<lambda>  s    3s8r@   Nc                     V # rj   r   rl   s   &r"   rn   rC    s    ar@   )r   r   rM   rN   rO   rP   r   r   	TypeErrorr   r6   r{   r   r7   r8   )r   r   tsr,   r<   r=   s   &     r"   %test_groupby_grouper_f_sanity_checked2TestGrouping.test_groupby_grouper_f_sanity_checked  s    ="4@BII))!,<<R@N 8]]9C00JJ+, 1 K(,,.::bhh'++-"
v0 10s   .C;;D	c                   \        R RR.^,          R\        RRRR7      /4      p\        RRR7      pVP                  VR .4      p\	        R4      R3^ ^.\	        R4      R3^.\	        R	4      R3^.\	        R	4      R3^^./p\
        P                  ! VP                  V4       \        VP                  P                  4       4      ^8X  g   Q hR
# )idru   rv   z
2000-01-01z
2000-01-039hr   r5   r   z
2000-01-02N)
r   r   r   r   r   r7   r   r<  lenkeys)r   r    r#  r   r=   s   &    r"   test_groupby_with_datetime_key+TestGrouping.test_groupby_with_datetime_key  s    sCj1nZlF
 c,ZZ$( |$c*QF|$c*QC|$c*QC|$c*QF	
 	RYY1 299>>#$)))r@   c                    R p\         P                  ! \        VR7      ;_uu_ 4        \        VP                  VRR.,          4       RRR4       R#   + '       g   i     R# ; i)z:Grouper for '<class 'pandas.DataFrame'>' not 1-dimensionalr   r   N)r   r   r(   r   r{   r   r    r,   s   && r"   %test_grouping_error_on_multidim_input2TestGrouping.test_grouping_error_on_multidim_input  s=    J]]:S11RXXr3*~. 2111s    AA"	c                   VP                  RR7      P                  4       pVP                  RR7      P                  4       p\        P                  ! W#4       VP                  RR7      P                  4       pVP                  RR7      P                  4       p\        P                  ! W#4       VP                  RR.R7      P                  4       pVP	                  4       p\        P                  ! W#4       VP                  RR.R7      P                  4       pVP                  RR.R7      P                  4       p\        P                  ! W#4       R# )r   r   secondfirstNr   )r   r6   r7   r:   
sort_index)r    multiindex_dataframe_random_datar<   r=   s   &&  r"   test_multiindex_negative_level+TestGrouping.test_multiindex_negative_level  s!   1999CGGI3;;(;KOOQ
f/1999CGGI3;;';JNNP
f/199R9IMMO3>>@
f/199W9NRRT3;;W% < 

#% 	 	f/r@   c                Z   \         P                  ! \        VP                  4      4      Vn        R p\        P
                  ! \        VR7      ;_uu_ 4        VP                  ^RR7      ^,          P                  R\         P                  /4       RRR4       R#   + '       g   i     R# ; i)znested renamer is not supportedr   Fas_indexQN)
rM   r   rM  r   r   r   r   r   r9   r2   rR  s   && r"   test_agg_with_dict_raises&TestGrouping.test_agg_with_dict_raises  sh    YYs2::/
/]]-S99JJq5J)!,00#rww@ :999s   :BB*	c                    R R.RR..p\         P                  ! V4      p\        ^R..VR7      pRpVP                  R4      P                  pVR,          ^ .8X  g   Q h\
        P                  ! \        VR7      ;_uu_ 4        VP                  R
.4      P                  pRRR4       VR,          ^ .8X  g   Q h\        ^R.^R	..VR7      pVP                  R4      P                  p\
        P                  ! \        VR7      ;_uu_ 4        VP                  R
.4      P                  pRRR4       XV8X  g   Q h\        ^R.^R..VR7      pVP                  R4      P                  p\
        P                  ! \        VR7      ;_uu_ 4        VP                  R
.4      P                  pRRR4       \
        P                  ! Wv4       R#   + '       g   i     EL1; i  + '       g   i     L; i  + '       g   i     LO; i)r)   values	to filter r   r   In a future version, the keysr   Nr   )re  rf  )	r
   r~   r   r   r<  r7   assert_produces_warningr   r   )r   lstmidxr    r,   r-   r=   r<   s   &       r"   #test_multiindex_columns_empty_level0TestGrouping.test_multiindex_columns_empty_level  s   "["$56%%c*Cz40-**[)00s|s"""''cBBjj"3!45<<G Cs|s"""C1c(+T:::k*11''cBBZZ!2 34;;F C!!!C1c(+T:::k*11''cBBZZ!2 34;;F C
V.! CBB CB CBs$   G	G	G-G	G*	-G=	c                P   \        . RO. RO. RO.\        P                  ! . RO. R	O.4      R7      pRp\        P                  ! \
        VR7      ;_uu_ 4        VP                  R
.4      P                  pRRR4       VP                  R
4      P                  p\        P                  ! XV4       \        VP                  \        P                  ! . RO. RO.4      R7      p\        P                  ! \
        VR7      ;_uu_ 4        VP                  R.4      P                  pRRR4       VP                  R
4      P                  p\        P                  ! W44       \        VP                  . ROR7      p\        P                  ! \
        VR7      ;_uu_ 4        VP                  R.4      P                  pRRR4       VP                  R
4      P                  p\        P                  ! W44       R#   + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     Lj; i)r   r   rg  r   Nr7  rY   rD   r   r   r   rD   rC   rY   ru   rv   rv   r.   r   r   rC   rC   r   )rw   rw   err  rv   rw   ))ru   rw   rs  )rv   rr  r.   )
r   r
   from_arraysr7   rh  r   r   r<  r   rd  )r   r    r,   r=   r<   df2df3s   &      r"   test_groupby_multiindex_tuple*TestGrouping.test_groupby_multiindex_tuple9  s   <6**,@,+OP

 .''cBBzz8*-44H CH%,,
Xv.II**%';<
 ''cBB{{J<077H CH%,,
X.		+TU''cBB{{J<077H CH%,,
X.- CBB CB CBs$   G.HH.G?	H	H%	c                   \        . RO. RO. RO.\        P                  ! . R	O. R
O.4      R7      pVP                  R.4      RR.,          P	                  4       pVP                  R.4      R,          P	                  4       p\
        P                  ! W#4       VP                  R.4      RR.,          P                  4       pVP                  R.4      R,          P                  4       p\
        P                  ! WE4       VP                  R.4      RR.,          P                  4       pVP                  R.4      R,          P                  4       p\
        P                  ! Wg4       VP                  R.4      RR.,          P                  4       pVP                  R.4      R,          P                  4       p	\
        P                  ! W4       VP                  R.4      RR.,          P                  4       p
VP                  R.4      R,          P                  4       p\
        P                  ! W4       Rp\
        P                  ! \        VR7      ;_uu_ 4        VP                  R.4      RR.,          P                  pVP                  R.4      R,          P                  pRRR4       \
        P                  ! XX4       R#   + '       g   i     L); i)r   rv   r   rg  r   Nr7  rn  ro  rp  rq  r   r   r  )r   r
   rt  r   r2   r7   r:   r6   r)   minmaxrh  r   r<  r   )r   r    expected_meanresult_meanexpected_sum
result_sumexpected_countresult_countexpected_min
result_minexpected_max
result_maxr,   expected_groupsresult_groupss   &              r"   4test_groupby_multiindex_partial_indexing_equivalenceATestGrouping.test_groupby_multiindex_partial_indexing_equivalenceY  s,   <6**,@,+OP

 

H:.(/CDIIKjj(,S1668
m9zz8*-x.BCGGIZZ
+C0446

l7XJ/80DEKKMzz8*-c288:
n;zz8*-x.BCGGIZZ
+C0446

l7zz8*-x.BCGGIZZ
+C0446

l7-''cBB jj(4h5IJQQOJJz237>>M C 	_m< CBs   A	J??K	c                   TpVP                  4       pVP                  ^ VR7      P                  4       pVP                  ^VR7      P                  4       pVP                  VR,          P                  VR7      P                  4       pVP                  VR,          P                  VR7      P                  4       p	RVP                  n        RV	P                  n        VP                  P
                  R8X  g   Q hVP                  P
                  R8X  g   Q h\        P                  ! Wh4       \        P                  ! Wy4       VP                  P
                  VP                  P                  ^ ,          8X  g   Q hVP                  P
                  VP                  P                  ^,          8X  g   Q hVP                  RVR7      P                  4       pVP                  RVR7      P                  4       p\        P                  ! Wh4       \        P                  ! Wy4       Rp
\        P                  ! \        V
R7      ;_uu_ 4        VP                  ^R7       RRR4       R#   + '       g   i     R# ; i)	rW   r   r   rW  )r   rV  z2level > 0 or level < -1 only valid with MultiIndexr   r   N)r   r   r6   rd  r{   r   r7   r:   ry   r   r   r(   )r   r   rZ  r    frame	deleveledresult0result1	expected0	expected1r,   s   &&&&       r"   test_groupby_levelTestGrouping.test_groupby_levelz  s   0%%'	--ad-3779--ad-3779MM)G"4";";$MGKKM	MM)H"5"<"<4MHLLN	&	'	}}!!W,,,}}!!X---
g1
g1}}!!U[[%6%6q%9999}}!!U[[%6%6q%9999 --gD-9==?--hT-:>>@
g1
g1 C]]:S11JJQJ 2111s   I""I3	c                P   \        R R.^,          R.^,          ,           R\        ^4      /4      P                  R 4      pVP                  R R7       Rp\        P
                  ! \        VR7      ;_uu_ 4        VP                  RR7       RRR4       R#   + '       g   i     R# ; i)	expr   r   var1r   z+level name foo is not the name of the indexr   rG   N)r   r'   	set_indexr   r   r   r(   rR  s   &  r"   test_groupby_level_index_names+TestGrouping.test_groupby_level_index_names  s{    uqyC5194feAhGHRR
 	


;]]:S11JJUJ# 2111s   7BB%	c                   \        ^^ .. RO.. RO. RO.R7      p\        \        P                  ! R4      VR7      pVP	                  ^ VR7      P                  4       p\        RR.^ ^.R7      p\        P                  ! WE4       \        ^^ .. RO.. RO. RO.R7      p\        \        P                  ! R4      VR7      pVP	                  ^ VR7      P                  4       p\        RR.RR	.R7      p\        P                  ! WE4       R
# )r   )levelscodesg       @rz   r  g      @g      6@g      2@g        r/  NrW   r   rC   rY   )r   r   r   r   rW   rW   rW   rW   )rW   r   rC   rY   rW   r   rC   rY   )r   r   r   r   r   rW   rW   rW   )r
   r   rM   r   r   r6   r7   r8   )r   r   r{   r1  r<   r=   s   &&    r"   test_groupby_level_with_nas(TestGrouping.test_groupby_level_with_nas  s    FL)+-EF
 299S>/.2243+aV4
v0FL),.FG
 299S>/.2243+c3Z8
v0r@   c                Z   TpR p\         P                  ! \        VR7      ;_uu_ 4        VP                  4        RRR4       R p\         P                  ! \        VR7      ;_uu_ 4        VP                  RRR7       RRR4       R#   + '       g   i     LT; i  + '       g   i     R# ; i)z*You have to supply one of 'by' and 'level'r   N)r   r   )r   r   rE  r   )r   rZ  r  r,   s   &&  r"   test_groupby_argsTestGrouping.test_groupby_args  sp    0:]]9C00MMO 1 ;]]9C00MMTM. 10	 10 100s   B(BB	B*	zsort,labelsc                    VP                  ^ VR7      p\        P                  ! V\        P                  4      p\        P
                  ! VP                  P                  V4       R# )rW   r  N)r   rM   r  intpr7   assert_almost_equalr!  ids)r   r   labelsrZ  r-   
exp_labelss   &&&&  r"   test_level_preserve_order&TestGrouping.test_level_preserve_order  sI     3:::NXXfbgg.

w//33Z@r@   c                   VP                  VP                  P                  ^ 4      4      p\        P                  ! . RO\        P
                  R7      p\        P                  ! VP                  P                  ^ ,          V4       R# )rW   r   N
rC   rC   rC   rW   rW   r   r   rY   rY   rY   )
r   r{   get_level_valuesrM   r  r  r7   r  r!  r  )r   rZ  r-   r  s   &&  r"   test_grouping_labels!TestGrouping.test_grouping_labels  s^    2::,22CCAF
 XX<BGGL

w//55a8*Er@   c           	     H   \        R \        RRRR7      /4      p\        P                  VP                  R&   \        R RR7      pRpVP                  V.4      p\        R4      \        \        \        R	4      4      4      /p\        P                  ! \        VR
7      ;_uu_ 4        VP                  pRRR4       \        P                  ! XV4       VP                  V4      p\        R4      R/p\        P                  ! VP                  V4       R#   + '       g   i     Lh; i)r   z1/1/2011im  r5   rA  YSr   rg  z
2011-01-01il  r   Nr   )r   r   r   NaTrc   r   r   r   r	   r[   r'   r7   rh  r   r<  r   )r   r    r#  r,   r   r=   r<   s   &      r"   test_list_grouper_with_nat'TestGrouping.test_list_grouper_with_nat  s    
:s MNOfff40- ZZ	"l+U4c
3C-DE''cBBYYF C
VX. G$l+S1
V]]H5 CBs   $DD!	zfunc,expected	transformr   r   r9   r   r   )r   r   r{   r   c                    \        ^. ^. /4      pVP                  ^RR7      p\        V^,          V4      ! R 4      p\        P                  ! WR4       R# )r   Tr   c                     V # rj   r   rl   s   &r"   rn   >TestGrouping.test_evaluate_with_empty_groups.<locals>.<lambda>  s    qr@   N)r   r   getattrr7   r8   )r   rh   r=   r    r!   r<   s   &&&   r"   test_evaluate_with_empty_groups,TestGrouping.test_evaluate_with_empty_groups  sK    4 2q"~&JJqTJ*1t$[1
v0r@   c                    \        R . R. R. /4      pVP                  R RR7      pVP                  R 4      p\        R. R. /RR7      p\        P                  ! W44       R# )r   r   r   Fr   c                 .    W P                  4       ,          # rj   rk   rl   s   &r"   rn   MTestGrouping.test_groupby_apply_empty_with_group_keys_false.<locals>.<lambda>  s    1uuw;r@   Nrz   )r   r   r   r7   r:   )r   r    r!   r<   r=   s   &    r"   .test_groupby_apply_empty_with_group_keys_false;TestGrouping.test_groupby_apply_empty_with_group_keys_false  s_    
 Rb#r23JJsuJ-./c2sB/t<
f/r@   c           	        \        . R RR7      pVP                  . 4      pVP                  4       pVP                  \	        . \
        P                  R7      4      p\        P                  ! W44       \        VP                  P                  4      ^8X  g   Q h\        P                  ! VP                  P                  \
        P                  ! . \
        P                  ! \
        P                  4      R7      4       VP                  P                   ^ 8X  g   Q hVP                  V4      pVP                  pVP"                  pR .pW48X  g   Q hR# )r   float64r  r   N)r   r   r2   set_axisr	   rM   r  r7   r8   rM  r!  	groupingsassert_numpy_array_equalr  r  r   ngroupsry   )r   r1  grr<   r=   r   r#  s   &      r"   test_groupby_emptyTestGrouping.test_groupby_empty  s    2F)4YYr]::eBbgg67
v0 2;;(()Q...
##KKOORXXb0AB	
 {{""a''' YYq\++8!!!r@   c                p   \        R \        P                  ^
.R\        P                  ^... ROR7      P                  RR.4      pVP	                  RR.R7      P                  4       p\        . \        \        R .RR7      \        . R	R7      .. . .RR.R
7      R.RR7      p\        P                  ! W#4       R# )rm   Nr   r   r   r   r   strr   r  )r  r  ry   r   )r&   r{   r   r   )r   r   r   )
r   rM   nanr  r   r6   r
   r	   r7   r:   r;   s   &   r"   %test_groupby_level_index_value_all_na2TestGrouping.test_groupby_level_index_value_all_na2  s    2662rvvr 23_

)S#J
 	 3*-113se51593MN2hCj
 E	
 	f/r@   c           
     <   \        . R	O. R
O.. ROR7      pVP                  RR.4      pWP                  ^ 8  ,          pVP                  R4      P	                  4       p\        RR.\        . \        P                  RR7      R7      p\        P                  ! W44       R# ){   rJ  categoryvaluer   r  r  )r   r   r{   N)r  ru   r/  )r  rv   r0  )rJ  r  r  )
r   r  r  r   r6   r	   rM   r   r7   r:   )r   r    emptyr<   r=   s   &    r"   #test_groupby_multiindex_level_empty0TestGrouping.test_groupby_multiindex_level_emptyD  s    o.8S
 \\4,-88a< t$((*I"((6

 	f/r@   c                .   \        R . ROR. ROR. ROR. ROR\        R4      /4      pVP                  RR .R7      pVP                  R4      P	                  R 4      pW#P
                  ,          p\        P                  ! VP                  RR	7      V4       R
# )num1num2num3category_tuplecategory_string
aaabbbbcder   c                 &    V P                  R R7      # )r  r  )sort_valuesrl   s   &r"   rn   HTestGrouping.test_groupby_tuple_keys_handle_multiindex.<locals>.<lambda>j  s    ammvm>Vr@   T)dropN)
rW      	   rD   rY   rY   r   r  rY   r   )
rY   r  r   rD   r  rC   r      rW   r  )
r   r   r  r  r   r   r   r   r  r  )
r   r   r   )rW   rD   r}   r}   r}   r}   )r   )r   )	r   r[   r  r   r   r   r7   r:   r   )r   r    r=   r<   s   &   r"   )test_groupby_tuple_keys_handle_multiindex6TestGrouping.test_groupby_tuple_keys_handle_multiindexS  s    667  # "4#5!
( >>&6%?>@,-334VWNN+
f00d0;XFr@   c                    \        R .R..R.R7      P                  R R7      p\        R.R7      P                  R R7      p\        RRR7      .pVP                  V4      P	                  4        VP                  V4      P	                  4        R	# )
z
05/29/2019z
05/28/2019r   r   c                 <    \         P                  ! V R ,          4      # r   r   to_datetimer    s   &r"   rn   GTestGrouping.test_groupby_grouper_immutable_list_item.<locals>.<lambda>r      BNN2f:6r@   r  c                 <    \         P                  ! V R ,          4      # r  r  r  s   &r"   rn   r  u  r  r@   1Dr   N)r   assignr   r   head)r   df1ru  grouperss   &   r"   (test_groupby_grouper_immutable_list_item5TestGrouping.test_groupby_grouper_immutable_list_itemn  s     ,,86(KRR6 S 
 )006 1 
 T23H""$H""$r@   r   Nr  )ru   rv   r.   rw   r  )
rW   rW   rW   r   r   rC   rC   rY   rY   rY   )9r   r   r   r   r   r   r   r	   r[   rM   r   floatr   r   r   r   r   r   r   r   r  r  r  r  r$  r'  r*  r4  r'   r   r=  rG  rO  rS  r[  ra  rk  rw  r  r  r  r  r  r  r  r  r   r  r  r  r  r  r  r  r  r   r   )ir   s   0@r"   r   r      sz    [[$w- "))A,"))AU+,|Q/q1	
	G	G0800>14 [[VeT]30 40 ,0\50&0,"
02& [[ 16q:AYtQQ':	
**1*./
0(A/8/@=B B$10
/ [[1223	
AAF6& [[ ARZZ0
 "**E"BJJUV4W "**E"BJJUV4W	
*1+*1	0"00$0G6% %E ;s   )Hr   c                   J   a  ] tR tRt o R tR tR tR tR tR t	R t
R	tV tR
# )TestGetGroupi  c           	     l   \        R \        P                  ! . RO4      R. R	OR. R
O/4      pVP                  R 4      p\	        \        VP                  4      4      pVP                  V4      pVP                  \        V4      P                  4       4      pVP                  \        \        V4      4      4      p\        P                  ! WE4       \        P                  ! WF4       VP                  R R.4      p\	        \        VP                  4      4      pVP                  V4      pVP                  \        V^ ,          4      P                  4       V^,          34      pVP                  \        \        V^ ,          4      4      V^,          34      p\        P                  ! WE4       \        P                  ! WF4       Rp\        P                  ! \        VR7      ;_uu_ 4        VP                  R4       RRR4       \        P                  ! \        VR7      ;_uu_ 4        VP                  R4       RRR4       Rp\        P                  ! \        VR7      ;_uu_ 4        VP                  R4       RRR4       R#   + '       g   i     L; i  + '       g   i     Le; i  + '       g   i     R# ; i)DATElabelrG   VALz<must supply a tuple to get_group with multiple grouping keysr   NzHmust supply a same-length tuple to get_group with multiple grouping keys)10-Oct-2013r  r  11-Oct-2013r  r  )rG   rG   rH   rG   rG   rH   r   )rG   rH   baz)r   r   r  r   r   r   r<  r   r   to_pydatetimer  r7   r:   r   r   r(   )r   r    r!   r   r  rS   result3r,   s   &       r"   test_get_groupTestGetGroup.test_get_group  s    	 C)
" JJv4>"++c"++in::<=++c)C.12
g/
g/JJ()4>"++c"++yQ0>>@#a&IJ++s9SV#45s1v>?
g/
g/ M]]:S11KK 2]]:S11KK 2X]]:S11KK-. 21 2111 211s$   "I< J J"<J	J	"J3	c                   \        . RO4      p. ROpVP                  \        P                  ! V^ ,          V4      VR7      pVP	                  \        P
                  ! ^ ^4      4      p\        ^^.^ ^.R7      p\        P                  ! WV4       Rp\        P                  ! \        VR7      ;_uu_ 4        VP	                  \        P
                  ! ^
^4      4       RRR4       R#   + '       g   i     R# ; i)rY   )r  rz   z"Interval\(10, 15, closed='right'\)r   N)rY   r   r  r   )rW   r   r      )r   r   r   cutr   Intervalr7   r:   r   r   r   )r   r  rw   binsr!   r<   r=   r,   s   &&      r"   test_get_group_empty_bins&TestGetGroup.test_get_group_empty_bins  s    l#IIbffQqT4(8I< R[[A./aVAq62
f/3]]83//KKB+, 0///s   4'C%%C6	c                   \        . RO.R.R7      P                  pVP                  R4      p\        RRR./^ ^.R7      pVP                  R4      p\        P
                  ! WC4       \        P                  ! . RO4      p\        RV Uu. uF  qf3NK  	  up/4      pVP                  R4      pVP                  R4      p\        RV^ ,          3V^ ,          3./^ ^.R7      p\        P
                  ! WC4       R# u upi )r   r  rz   Nr   )r  r  r  r  )
2010-01-01
2010-01-02r  r  )r  )r   r  r   r   r7   r:   r   r  )r   r    r  r=   r<   dtrm   s   &      r"   test_get_group_grouped_by_tuple,TestGetGroup.test_get_group_grouped_by_tuple  s    45eWEGGZZedD\21a&Ad#
f/^^TUb1bb123ZZo.er!uhA%9:1a&I
f/	  2s   	C9
c                  a \        R R R 4       /4      oSP                  R 4      pSP                  V3R l4      pVP                  \        \	        VP
                  P                  4       4      4      4      pVP                  \        \	        VP
                  P                  4       4      4      4      p\        P                  ! WC4       R# )r   c              3      "   T F?  p\         P                  P                  ^4      P                  ^^^4       F  pW3x  K
  	  KA  	  R# 5ir   r   r   s   &  r"   r   KTestGetGroup.test_get_group_grouped_by_tuple_with_lambda.<locals>.<genexpr>  r   r   c                 .   < SP                   V ^ 3,          # r   r   r   s   &r"   rn   JTestGetGroup.test_get_group_grouped_by_tuple_with_lambda.<locals>.<lambda>  r   r@   Nr   )	r   r   r   r   r   r<  rN  r7   r:   r   s   &    @r"   +test_get_group_grouped_by_tuple_with_lambda8TestGetGroup.test_get_group_grouped_by_tuple_with_lambda  s     #
 ZZ!JJ67	<<T"))..*:%; <=$$T$y/?/?/D/D/F*G%HI
f/r@   c                    \         P                  ! R4      pRp\        W!\        R 7      p\	        RR7      pVP                  V4      p\        \        V4      R4      e   Q hR# )r   r5   rL  Nr   )r   r   r   objectr   r   r   r   )r   r{   r&   seriesr#  r-   s   &     r"   test_groupby_with_empty$TestGetGroup.test_groupby_with_empty  sR      $62s#..)DM4(000r@   c                p   \        R \        R4      /4      p\        P                  ! VP	                  R 4      P                  R 4      VP                  ^ ^.,          4       \        \        . ROR R7      \        . RR7      R7      p\        P                  ! VP	                  R 4      P                  4       V4       \        P                  ! VP	                  R 4      P                  4       V4       VP                  . RO,          p\        P                  ! VP	                  R 4      P                  ^4      V4       R# )	ru   abssbab)r   r  r   )r{   r   N)ru   rv   r1  rY   rD   r   )r   r[   r7   r:   r   r   rc   r	   r)   r6   nth)r   r    r  s   &  r"   test_groupby_with_single_column,TestGetGroup.test_groupby_with_single_column  s    T)_-.
bjjo77<bggq!foNc2E"E<R
 	bjjo335s;
bjjo113S9ggi 
bjjo11!4c:r@   c                   \        . RO. RO. RO.. ROR7      pVP                  RR.4      pVP                  . R	O4      P                  4       pVP                  R
,          ^8X  g   Q hVP                  R,          ^8X  g   Q hR# )rG   rW  rV  r   N)rG   rH   r   r   )rG   rH   r   rC   )rG   r  r   rY   )rW  rV  thirdrJ   )rW  rV  r)  )rG   rH   r   )rG   r  r   )r   r  r   r+   rQ   r_   s   & r"   test_gb_key_len_equal_axis_len+TestGetGroup.test_gb_key_len_equal_axis_len  sz     #%;=ST7
 \\7H-.ZZ45::<vv)*a///vv)*a///r@   r   N)r   r   r   r   r  r  r  r  r   r&  r*  r   r   r   s   @r"   r  r    s.     -/^-00(1;0 0r@   r  c                   J   a  ] tR tRt o R tR tR tR tR tR t	R t
R	tV tR
# )TestIterationi  c                   VP                  R .4      pRp\        P                  ! \        VR7      ;_uu_ 4        VP                  pWBP                  J g   Q h RRR4       XP                  4        F8  w  rVVP                  V,          R ,          V8H  P                  4       '       d   K8  Q h	  VP                  R R.4      pVP                  pWBP                  J g   Q hVP                  4        Fy  w  rVVP                  V,          R ,          V^ ,          8H  P                  4       '       g   Q hVP                  V,          R,          V^,          8H  P                  4       '       d   Ky  Q h	  R#   + '       g   i     EL; i)r   rg  r   Nr   )r   r7   rh  r   r<  itemsrQ   all)r   r    r-   r,   r<  kvs   &&     r"   test_groupsTestIteration.test_groups  s#   **cU#-''cBB^^F^^+++ C LLNDAFF1IcNa',,.... # **c3Z('''LLNDAFF1IcNad*//1111FF1IcNad*//1111 # CBBs   E++E<	c                x    VP                  R  R .4      pVP                  P                  ^ ,           F  pK  	  R# )c                 "    V P                  4       # rj   )weekdayrl   s   &r"   rn   9TestIteration.test_grouping_is_iterable.<locals>.<lambda>#  s
    QYY[r@   c                     V P                   # rj   )yearrl   s   &r"   rn   r8  #  s    AFFr@   N)r   r!  r  )r   tsframer-   r!   s   &&  r"   test_grouping_is_iterable'TestIteration.test_grouping_is_iterable   s<     //#8:J"KL !!++A..A /r@   c                   \        \        P                  ! ^4      4      p\        P                  ! . RO4      p\        P                  ! . RO4      pVP	                  W#.4      p\        V4      pRRV^ ^.,          3RRV^.,          3RRV^.,          3RRV^^.,          3.p\        V4       F<  w  pw  w  rp
Wg,          w  rpW8X  g   Q hW8X  g   Q h\        P                  ! W4       K>  	  R# )r   ru   rv   12N)ru   ru   ru   rv   rv   rv   r?  r@  r?  r@  r?  r@  )	r   rM   r   r  r   r[   	enumerater7   r8   )r   r1  k1k2r-   iteratedr=   r  rJ   rK   rL   e1e2e3s   &             r"   test_multi_iterTestIteration.test_multi_iter)  s    299Q< XX45XX45))RH%=#q!Qy!#q!v#q!v#q!Qy!	
 '0&9"A"
E!JBB9999""5-	 ':r@   c           
        \         P                  ! . R
O4      p\         P                  ! . RO4      p\        R\         P                  P	                  ^4      P                  ^4      R\         P                  P	                  ^4      P                  ^4      RVRV/. ROR7      pVP                  RR.4      p\        V4      pVP                  pRRVP                  V^.,          ,          3RRVP                  V^^.,          ,          3R RVP                  V^ ^.,          ,          3R RVP                  V^.,          ,          3.p\        V4       F<  w  p	w  w  rpW,          w  rpW8X  g   Q hW8X  g   Q h\        P                  ! W4       K>  	  \         P                  ! . R
O4      VR&   \         P                  ! . RO4      VR&   VP                  RR.4      pV UUu/ uF	  w  ppVVbK  	  ppp\        V4      ^8X  g   Q hR	# u uppi )rv   ru   r?  r@  v1v2rC  rD  rz   N)rv   rv   rv   ru   ru   ru   rA  )rJ   rK   rL   fourfivesix)r?  r?  r?  r@  r@  r@  )rM   r  r   rN   rO   rP   r   r[   r{   rQ   rB  r7   r:   rM  )r   three_grouprC  rD  r    r-   rE  r   r=   r  rJ   rK   rL   rF  rG  rH  r   gpr<  s   &&                 r"   test_multi_iter_frame#TestIteration.test_multi_iter_frame=  s   XX45XX45bii++A.>>qAbii++A.>>qAbb	 A
 **dD\* =hh#rvvc1#h'(#rvvc1a&k*+#rvvc1a&k*+#rvvc1#h'(	
 '0&9"A"
E!JBB9999!!%,	 ': 88:;488:;4**dD\* *11gc2#r'16{a 2s   Hc           	        \        \        VP                  R 4      4      4       \        \        VP                  R R.4      4      4       \        \        VR,          P                  VR ,          4      4      4       \        \        VR,          P                  VR ,          VR,          .4      4      4       \        \        VP                  R 4      R,          4      4       \        \        VP                  R R.4      R,          4      4       R# )r   r   r   N)r   r   r   r_   s   &&r"   test_dictifyTestIteration.test_dictifyd  s    T"**S/"#T"**c3Z()*T"S'//"S'*+,T"S'//2c7BsG"4567T"**S/#&'(T"**c3Z(-./r@   c                J   \        R RR.RRR./\        P                  ! RR.4      R7      pVP                  \	        RR	7      R .4      p\        VP                  4      ^8X  g   Q hVP                  ^8X  g   Q h\        R
4      R3VP                  9   g   Q h\        R4      R3VP                  9   g   Q hVP                  \        R
4      R34      p\        P                  ! W1P                  ^ .R3,          4       VP                  \        R4      R34      p\        P                  ! W1P                  ^.R3,          4       \        R . ROR. RO/\        P                  ! . RO4      R7      pVP                  \	        RR	7      R .4      p\        VP                  4      ^8X  g   Q hVP                  ^8X  g   Q h\        R
4      R3VP                  9   g   Q h\        R4      R3VP                  9   g   Q hVP                  \        R
4      R34      p\        P                  ! W1P                  ^ ^.R3,          4       VP                  \        R4      R34      p\        P                  ! W1P                  ^.R3,          4       \        R . ROR. RO/\        P                  ! . RO4      R7      pVP                  \	        RR	7      R .4      p\        VP                  4      ^8X  g   Q hVP                  ^8X  g   Q h\        R
4      R3VP                  9   g   Q h\        R4      R3VP                  9   g   Q h\        R4      R3VP                  9   g   Q hVP                  \        R
4      R34      p\        P                  ! W1P                  ^ .R3,          4       VP                  \        R4      R34      p\        P                  ! W1P                  ^.R3,          4       VP                  \        R4      R34      p\        P                  ! W1P                  ^.R3,          4       R# )eventstartchange  .  
2014-09-10
2013-10-10rz   r   rL  z
2014-09-30z
2013-10-31rE   z
2014-08-31N)rZ  rZ  rZ  )r\  r]  i#  )r^  r_  z
2014-09-15)r^  r_  z
2014-08-05)r   r   r   r   r   rM  r<  r  r   r   r7   r:   rc   )r   r    r-   ress   &   r"   test_groupby_with_small_elem*TestIteration.test_groupby_with_small_eleml  s    w((T4LA""L,#?@
 **g40':;7>>"a'''!###,'1W^^CCC,'1W^^CCC<!8' BC
c77A36?3<!8' BC
c77A36?318=OP""#MN
 **g40':;7>>"a'''!###,'1W^^CCC,'1W^^CCC<!8' BC
c77Aq619#56<!8' BC
c77A36?3 18=OP""#MN
 **g40':;7>>"a'''!###,'1W^^CCC,'1W^^CCC,'1W^^CCC<!8' BC
c77A36?3<!8' BC
c77A36?3<!8' BC
c77A36?3r@   c                   \         P                  ! \        R 4      \        R4      .4      p\        . RO.VR7      pVP	                  VR,          4      pVP
                  P                  ^ ,          P                  4       pRpWE8X  g   Q hR# )AABabar   zGrouping(('A', 'a'))N)r   rC   rY   )r   ru   )r
   rt  r[   r   r   r!  r  __repr__)r   r   r    r  r<   r=   s   &     r"   test_grouping_string_repr'TestIteration.test_grouping_string_repr  sm    ##T%[$u+$>?	{B/ZZ:'&&q)224)!!!r@   r   N)r   r   r   r   r3  r<  rI  rS  rV  ra  rg  r   r   r   s   @r"   r-  r-    s/     2&.(% N024h" "r@   r-  c            	         \        R . ROR. ROR. R	O/4      P                  R 4      p V P                  \        R R7      \        RR7      .RR7      pVP                  P
                  ^ ,          P                  '       d   Q hVP                  P
                  ^,          P                  '       g   Q hVP                  4       p\        R ^^.R^^.R^^./4      p\        P                  ! W#4       R# )
ru   rv   r.   r   r   Fr^  Nr|   r$  )
r   r  r   r   r!  r  in_axisr6   r7   r:   )r    r   r<   r=   s       r"   test_grouping_by_key_is_in_axisrk    s    	CCCC	D	N	Ns	SB	W3'S)9:U	KB{{$$Q'/////;;  #+++++VVXF#1vsQFC!Q@AH&+r@   c                     \        R \        P                  ! ^4      \        P                  ./4      p V P	                  \
        P                  ! ^ ^.\
        P                  R7      4      R ,          P                  4       p\        ^ R^R/R \        R7      pVP                  P                  \
        P                  4      Vn        \        P                  ! W4       R# )r  r   TFr  N)r   r   	Timedeltar  r   rM   r  r   anyr   boolr{   r  r7   r8   )r    r<   r=   s      r"   test_groupby_any_with_timedeltarp    s    	Gbll1orvv67	8BZZ!Qrxx89'BFFHFq$5)tDH^^**2884HN6,r@   ) __doc__datetimer   r   numpyrM   r   pandas.errorsr   r   pandasr   r   r   r   r	   r
   r   r   r   r   pandas._testing_testingr7   pandas.core.groupby.grouperr   r   r   r  r-  rk  rp  r   r@   r"   <module>ry     sv   
  
 
 
 
  0H/ H/^H% H%^B0 B0R\" \"~	,	-r@   