+
    yȇi$             	       ,   R t ^ RIHt ^ RIt^ RIHtHtHtHt ^ RIt^ RI	H
t
 ^ RIt^ RIt^ RIHt ^ RIHt ^ RIHu 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!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	I0H1t1 ^ R
I2H3t3 ]Ph                  Pk                  R]Pl                  ]Pl                  R.R]Pl                  ]Pl                  .. RJO.]Pl                  R.R]Pl                  .RR...4      R 4       t7R t8 ! R R4      t9 ! R R4      t: ! R R4      t; ! R R4      t< ! R R4      t= ! R R4      t> ! R R4      t? ! R  R!4      t@ ! R" R#4      tA ! R$ R%4      tB ! R& R'4      tC]Ph                  Pk                  R(. RKOR)R*.^ ^.3. RLOR)R*.^ ^.3. RLOR)R+.^ ^.3.4      R, 4       tDR- tER. tFR/ tGR0 tHR1 tIR2 tJR3 tKR4 tLR5 tMR6 tNR7 tO]Ph                  Pk                  R8R9]P                  ! R94      ]P                  ! R94      .4      R: 4       tR]Ph                  Pk                  R;]&! R<4      R=3]&! R>R?R@7      RA3.4      RB 4       tSRC tT]Ph                  P                  RD4      ]Ph                  P                  RE4      RF 4       4       tVRG tW ! RH RI4      tXR# )Mz"test label based indexing with loc)
namedtupleN)datedatetimetime	timedelta)gettzindex)IndexingError)CategoricalCategoricalDtypeCategoricalIndex	DataFrameDatetimeIndexIndex
IndexSlice
MultiIndexPeriodPeriodIndexSeriesSparseDtype	Timedelta	Timestamp
date_rangetimedelta_rangeto_datetimeto_timedelta)	is_scalar)_one_ellipsis_message)"check_indexing_smoketest_or_raisesz series, new_series, expected_serbaFTc                     \        R V /4      pWP                  R&   \        R V/4      p\        P                  ! VP	                  4       V4       \        P                  ! VP                  4       V( 4       R# )AN)NNNr#   )r   loctmassert_frame_equalisnanotna)series
new_seriesexpected_serdfexpecteds   &&&  n/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/indexing/test_loc.pytest_not_change_nan_locr0   0   sZ     
C=	!BFF6N#|,-H"'')X."((*xi0    c                      \        . RO. RO.4      p V P                  ^ ^^.3,          p\        RR.^^.\        ^ R7      p\        P
                  ! W4       R# )r!         ?       @r	   dtypenameN)r!   r3   r4   )r          @      @)r   r%   r   floatr&   assert_series_equal)r-   resultr.   s      r/   test_loc_dtyper=   @   sM    	O_5	6BVVA1vIFsCjAe!DH6,r1   c                     a  ] tR t^Ht o R tR tR t]P                  P                  RR^.4      ]P                  P                  R]
! ]! R4      ]R7      ]
! . R"O]R7      ]! R	^R
7      ]
! ]! ^ ^^4      ]P                   R7      ]
! . 4      .4      R 4       4       t]P                  P                  R. R#O. R$O.4      ]P                  P                  R]P$                  ]P&                  ]P                   .4      R 4       4       t]P                  P                  RR]
! . R#O]P$                  R7      ]
! . R#O]P&                  R7      ]
! . R#O]P                   R7      ]P,                  ! ]! ^4      ]! ^4      .4      .4      ]P                  P                  R. R#O. R%O. R&O. R'O.4      R 4       4       t]P                  P                  R]P$                  ]P&                  .4      R 4       tR t]P                  P                  R]! ^^4      ]
! ]! R4      ]R7      ]
! . R"O]R7      R]! R	^R
7      ]
! ]! ^ ^^4      ]P                   R7      .R].]! RR4      ]! R	^R
7      .^].]! ^^4      ]
! . R"O]R7      .^ ].]! ^^4      ]
! . R"O]R7      .^].]! ^^^4      ]
! . R"O]R7      .^ ]..4      R 4       tR tR t]P                  P                  R] ! ^..]
! R.4      R7      ]!R(,          ]"! ^.RR7      3]"! ^.]
! R.4      R7      R^.3] ! ^..]
! R.4      R7      R]"! ^.RR7      3.4      R 4       t#]P                  P                  R]$! R^
^4      .]%! R^
^4      .^,          ]&! ^4      .]&! ^4      ]&! ^4      ..4      R  4       t'R!t(V t)R# ))TestLocc                    \        . ROR.\        R7      pVP                  R,          e   Q h\        . ROR.RR7      pV'       d2   \        P                  ! VP                  R,          4      '       g   Q hR# VP                  R,          e   Q hR# )1Nr!   columnsr6   str)rA   2N)   r!   )r   objectr%   npisnan)selfusing_infer_stringr-   s   && r/   "test_none_values_on_string_columns*TestLoc.test_none_values_on_string_columnsI   sl    '#fEvvf~%%%'#eD88BFF6N++++66&>)))r1   c                    V! \        ^4      \        \        R4      \        R7      R7      p\	        VR^\
        R7       R# )   abcr6   r   r%   failsN)ranger   listrG   r   KeyErrorrJ   frame_or_seriesobjs   && r/   test_loc_getitem_intTestLoc.test_loc_getitem_intT   s+    eAheDKv.NO*3qIr1   c                :    V! 4       p\        VR R\        R7       R# )r%   crR   N)r   rV   rW   s   && r/   test_loc_getitem_labelTestLoc.test_loc_getitem_labelY   s    *3s(Kr1   keyfr	   abcdrQ   20130101periodsc                d    V! \        \        V4      4      VR 7      p\        VRV\        R7       R# )r   r%   rR   NrT   lenr   rV   rJ   r`   r	   rX   rY   s   &&&& r/   #test_loc_getitem_label_out_of_range+TestLoc.test_loc_getitem_label_out_of_range^   s'     eCJ/u=*3s(Kr1   r6   c                l    V! \        ^4      \        . ROVR7      R7      p\        VRV\        R7       R# )rO   rQ   r   r%   rR   N       rF   rT   r   r   rV   )rJ   r`   r6   rX   rY   s   &&&& r/   test_loc_getitem_label_list#TestLoc.test_loc_getitem_label_listn   s)     eAheIU.KL*3s(Kr1   Nc                |    Vf	   V! 4       pMV! \        \        V4      4      VR7      p\        VRV\        R7       R # )Nr   r%   rR   rg   ri   s   &&&& r/   (test_loc_getitem_label_list_with_missing0TestLoc.test_loc_getitem_label_list_with_missingu   s4     =!#C!%E
"35AC*3s(Kr1   c                p    V! \        ^4      \        . ROVR7      4      p\        VR. RO^\        R7       R# )rO   rQ   r%   axesrS   Nrm   )      (   rp   )rJ   r6   rX   rY   s   &&& r/   !test_loc_getitem_label_list_fails)TestLoc.test_loc_getitem_label_list_fails   s.     eAhiu(EF*1H	
r1   c                B    V! 4       p. ROp\        VRV\        R7       R# )Tr%   rR   NTFTF)r   
IndexError)rJ   rX   rY   r    s   &&  r/   test_loc_getitem_boolTestLoc.test_loc_getitem_bool   s    &*3q
Kr1   zslc, indexes, axes, fails2013010220130104c           	         V F;  pVf	   V! 4       pMV! \        \        V4      4      VR7      p\        VRVVVR7       K=  	  R # )Nr   r%   rw   )rT   rh   r   )rJ   slcindexesrx   rS   rX   r	   rY   s   &&&&&&  r/   test_loc_getitem_label_slice$TestLoc.test_loc_getitem_label_slice   sH    @ E}%'%eCJ&7uE. r1   c                    \        ^R.^R.^R..RR.. ROR7      p\        P                  ! ^4      VP                  R&   \        ^R.^ R.^R..RR.. ROR7      p\        P
                  ! W4       R# )ry   r!   col1col2rC   r	   N)
   ro   ro   )ro   r   )r   rH   aranger%   r&   r'   rJ   r-   r.   s   &  r/    test_setitem_from_duplicate_axis(TestLoc.test_setitem_from_duplicate_axis   s~    #Yc
S#J/V$

 IIaLy#YC1c(+ff5EZ
 	b+r1   c                   \        R . R
ORR\        P                  R.R\        R4      \        P
                  \        R4      ./R7      p\        RR.R\        R4      ./R7      pVP                  VP                  VR,          P                  4       RR.3&   \        R . R
OR. ROR\        R4      \        R4      \        R4      ./R7      p\        P                  ! W4       R	# )channelr#   String 1String 2Bz2019-06-11 11:00:00z2019-06-11 12:00:00)dataString 3Nro   rF   rO   )r   r   r   )r   rH   nanr   pdNaTvaluesr%   r(   r&   r'   )rJ   r-   df2r.   s   &   r/   test_column_types_consistent$TestLoc.test_column_types_consistent   s    9j"&&*534FF34

 
|S95J+K*LM
 .1ZZr#w||~Sz)*99343434

 	b+r1   zobj, key, expFrC   r7   r   c                    VP                   V,          p\        V\        \        34      '       d   \        P
                  ! WC4       R # WC8X  g   Q hR # N)r%   
isinstancer   r   r&   assert_equal)rJ   rY   r`   express   &&&& r/   #test_loc_getitem_single_boolean_arg+TestLoc.test_loc_getitem_single_boolean_arg   s9     ggclcIv.//OOC%::r1   r   i  c                    R .\        V4      ,          p\        VR.R7      pVP                  4       pW3P                  V&   \        P
                  ! W44       R# )Fr#   r   rC   N)rh   r   copyr%   r&   r'   )rJ   r   maskr-   r.   s   &&   r/   -test_loc_empty_slice_assignment_with_datetime5TestLoc.test_loc_empty_slice_assignment_with_datetime  sF     wT"D3%0779t
b+r1    )rF      null   rm   )ro   r8   r#   )rn   rF   r   )rO         ))ro   rO   )ro   r   )rF      )r$   F)*__name__
__module____qualname____firstlineno__rL   rZ   r^   pytestmarkparametrizer   rU   rG   r   rT   rH   float64rj   int64uint64rq   r   from_arraysrt   r|   r   slice	TypeErrorrV   r   r   r   r   r   r   r   r   r   r   r   __static_attributes____classdictcell____classdict__s   @r/   r?   r?   H   s    	*J
L
 [[US"I.[[$v,f-#62z1-%1a.

3"I	
	L	 /L
 [[UY$>?[[WrxxBJJ&GHL I @L
 [[)288,)299-)2::.""E!HeAh#78	
	 [[	:y2JKL	L [[Wrxx&;<
 =
L [[# a$v,f5+6:z15%2q/<  j*-J23	 1a[5!2&ABAyQ1a[5!2&ABAxP1a^e$5VDEq)T+	
454&,,> [[ A3%w88$s'
 QCueW~.s;uE5'N3UFA3U<ST	
 [[dB#$tR$%)q\Nq\9Q<(		
,,r1   r?   c                   6  a  ] tR tRt o R t]P                  P                  RR]! R4      RR33R]! R4      R	R33R
]! R4      RR33R]! R4      ]! R4      R33R]! R4      RR	33R]! R4      R]! R4      33R]! R4      RR33.4      R 4       t	R t
R tR tR tR tR tR t]P                  P                  RRR.. RO.4      R 4       tR  tR! tR" tR# tR$ tR% tR& t]P2                  R' 4       t]P                  P                  R(^ ]P8                  ! ^ ]P:                  R)7      ]P8                  ! . RO]P:                  R)7      .4      R* 4       tR+ tR, t R- t!R. t"R/ t#]P                  P                  R0. RO4      R2 4       t$R3 t%]P                  P                  R4RR.4      R5 4       t&R6 t'R7 t(]P                  P                  R4RR.4      R8 4       t)]P                  P                  R4RR.4      R9 4       t*R: t+R; t,R< t-]P                  P                  R=R>.].! R?R>R?4      ]P8                  ! R>.4      .4      ]P                  P                  R@RA.]P8                  ! RA.4      .4      RB 4       4       t/]P                  P                  RC^ ^.. RO3^]0! . RO^^]Pb                  ]Pb                  .. RO.. RORE7      3^RDR1.3^^.]0! ^^]Pb                  ]Pb                  .. RO^^]Pb                  ]Pb                  ... RORE7      3^. RO3]P8                  ! . RO]P:                  R)7      ]0! ^^]Pb                  .. RO^^]Pb                  ... RORE7      3].! ^^R?4      . RO3. RO. RO.]0! ^^]Pb                  ]Pb                  .. RO. RO.. RORE7      3].! ^^R?4      . RO3]P8                  ! . RO. RO.]P:                  R)7      ]0! ^^]Pb                  ]Pb                  .. RO. RO.. RORE7      3].! R?R?R?4      R>RD.3]0! ^^.^	^
.^^..R>RD.RE7      ]0! . RO. RO. RO.. RORE7      3.4      RF 4       t2RG t3RH t4RI t5RJ t6RK t7]P                  Pp                  ]P                  Pr                  ]P                  P                  RLRM^d.RNRO..4      RP 4       4       4       t:RQ t;RR t<RS t=RT t>RU t?RV t@RW tARX tBRY tCRZ tDR[ tER\ tFR] tGR^ tHR_ tI]P                  P                  R`. RO4      ]P                  P                  Ra]P                  ]P                  ]P:                  ]L.4      Rb 4       4       tMRc tNRd tORe tP]P                  P                  R=RfRg.4      Rh 4       tQ]P                  P                  Ri]R]P8                  ]S]T.4      Rj 4       tURk tV]P                  P                  RlRR.4      Rm 4       tWRn tX]P                  P                  Ro^ . RO3].! ^^4      . RO3^^.. RO3.4      Rp 4       tYRq tZRr t[Rs t\]P                  P                  RtRuRu..4      Rv 4       t]Rw t^]P                  P                  RxR>R>.R>].! R?4      3.4      Ry 4       t_Rz t`R{ taR| tbR} tcR~ td]P                  P                  RRR.4      R 4       teR tfR tgR thR tiR tjR tkR tlRtmV tnR?# )TestLocBaseIndependenti  c                    \        \        R R4      R7      pVP                  \        P                  ! R.4      ^ ,          R pVP
                  R,          p\        P                  ! W#4       R# )20212022r   z2021/6/1N:   NN)r   r   r%   rH   arrayilocr&   r'   rJ   r-   r<   r.   s   &   r/   test_loc_npstr%TestLocBaseIndependent.test_loc_npstr  sO    Z78*.q134774=
f/r1   zmsg, keyz'Period\('2019', 'Y-DEC'\), 'foo', 'bar'  foobarz&Period\('2019', 'Y-DEC'\), 'y1', 'bar'y1z&Period\('2019', 'Y-DEC'\), 'foo', 'z1'z1z;Period\('2018', 'Y-DEC'\), Period\('2016', 'Y-DEC'\), 'bar'    z&Period\('2018', 'Y-DEC'\), 'foo', 'y1'z;Period\('2017', 'Y-DEC'\), 'foo', Period\('2015', 'Y-DEC'\)    z&Period\('2017', 'Y-DEC'\), 'z1', 'bar'c                n   \        R\        R4      RR.R\        R4      \        R4      R.R	\        R
4      R\        R4      .R. ROR. RO/4      P                  . RO4      p\        P                  ! \
        VR7      ;_uu_ 4        VP                  V,           RRR4       R#   + '       g   i     R# ; i)z
parse_datetime_string_with_reso return parameter if type not matched.
PeriodIndex.get_loc takes returned value from parse_datetime_string_with_reso
as a tuple.
If first argument is Period and a tuple has 3 items,
process go on not raise exception
r#   r   x1x2r   r   r   r   Cr   r   r   V1V2matchNr   r   ry   rz   r#   r   r   )r   r   	set_indexr   raisesrV   r%   )rJ   msgr`   r-   s   &&& r/   ;test_contains_raise_error_if_period_index_is_in_multi_indexRTestLocBaseIndependent.test_contains_raise_error_if_period_index_is_in_multi_index"  s    6 fTlD$/fTlF4L$7fTlD&,7il
 )O
$ 	 ]]83//FF3K 0///s   B##B4	c                    \        R ^./4      p\        P                  ! \        RR7      ;_uu_ 4        VP                  R,           RRR4       R#   + '       g   i     R# ; i)r!      אr   N)r$   r   )r   r   r   rV   r%   rJ   r-   s   & r/   $test_loc_getitem_missing_unicode_key;TestLocBaseIndependent.test_loc_getitem_missing_unicode_keyI  s>    aSz"]]8844FF; 5444s   AA"	c           	     j   \        \        P                  P                  ^4      P                  R4      \	        ^4       Uu. uF  pRV^,          ,          NK  	  upR7      pVP
                  R,          pVP
                  R,          P
                  R,          p\        P                  ! WC4       R# u upi )rF   ABCDEr   r#   N)ry   r   )r#   rn   r$   rn   )r   rH   randomdefault_rngrT   r%   r&   r;   )rJ   xr-   r.   r<   s   &    r/   test_loc_getitem_dups,TestLocBaseIndependent.test_loc_getitem_dupsN  s     II!!!$++G4+0959a71q5>>95
 66&>!!#&
v0	 6s    B0
c           	     &   \        ^^RR\        R4      ... RO^.R7      p\        ^^RR\        R4      .. RO^R7      pVP                  ^ ,          p\        P
                  ! W24       VP                  ^,          p\        P
                  ! W24       R# )ro   r   r   rc   r   r	   r7   Nr!   r!   r!   r!   r!   )r   r   r   r   r&   r;   r%   rJ   r-   r.   r<   s   &   r/   test_loc_getitem_dups2-TestLocBaseIndependent.test_loc_getitem_dups2Y  s     E5)J"789-#

 5%:!67+
 
v0
v0r1   c                   \        R \        R4      R\        R4      R\        P                  ! ^RR7      R,          ^,           R\        P                  ! ^RR7      R,          ^,           /4      P	                  R 4      pR	RR.3pVP                  4       pVP                  V;;,          R
,          uu&   \        P                  ! VP                  V,          R
VP                  V,          ,          4       RpVP                  4       pVP                  V;;,          R
,          uu&   VP                  V,          R
VP                  V,          ,          8X  g   Q hRRR.3pVP                  4       pVP                  V;;,          R
,          uu&   \        P                  ! VP                  V,          R
VP                  V,          ,          4       R# )mertttir   aaader   r   rQ   gq=
ףp?bar2rr4   tNg(\տ)r  r   )
r   rU   rH   r   r   r   r%   r&   r;   r'   )rJ   df_origindexerr-   s   &   r/   test_loc_setitem_dups,TestLocBaseIndependent.test_loc_setitem_dupsm  s_   d7mtG}ryy)4t;a?		!95=A	
 )D/ 	 FO
 \\^
w3
rvvggkk'6J0JK
 \\^
w3vvg#G(<"<<<< FO
 \\^
w3
bffWosW[[5I/IJr1   c           
     (   \        R . ROR\        . R	ORR7      /4      pVR ,          ^8H  pVP                  VR3,          ^,           pW1P                  VR3&   \        R . ROR\        . R
ORR7      /4      p\        P                  ! W4       \        R . ROR. R	O/RR7      pVR ,          ^8H  pVP                  VR3,          p\
        P                  ! \        RR7      ;_uu_ 4        WaP                  VR3&   RRR4       R#   + '       g   i     R# ; i)r!   r    uint32rQ   r   Invalid valuer   Nrn   ro   ro   )d      ,  )r     i-  )r   r   r%   r&   r'   r   r   r   )rJ   df1ixnewb1r.   r   newb2s   &      r/   test_loc_setitem_slice-TestLocBaseIndependent.test_loc_setitem_slice  s     if_H.UVWX]C 1$ C)S&"IJ
 	c, io>hOX]C ]]9O<<$GGBG =<<<s   %D  D	c                   \        R R.RR.RR.RR./4      p. ROpVP                  RV3,          P                  R4      VP                  RV3&   \        R R.R\        P                  ! R.R	R
7      R\        P                  ! R.R	R
7      R\        P                  ! R.R	R
7      /4      p\
        P                  ! W4       R# )idr#   r!   333333?r            r]   r$   float32r   rQ   Ng      r!   r    r]   )r   r%   astyperH   r   r&   r'   )rJ   r-   colsr.   s   &   r/   test_loc_setitem_dtype-TestLocBaseIndependent.test_loc_setitem_dtype  s    seS3%seS4&IJ&&D/00;q$w seRXXse95RXXse95RXXtfI6	
 	b+r1   c                   \        \        ^4      . ROR7      p\        P                  ! \        RR7      ;_uu_ 4        VRR.,           RRR4       \        \        ^4      4      p\        P                  ! \        RR7      ;_uu_ 4        V^ ^.,           RRR4       R#   + '       g   i     L^; i  + '       g   i     R# ; i)rO   r!   r   not in indexr   dNr  )r   rT   r   r   rV   )rJ   ss   & r/   $test_getitem_label_list_with_missing;TestLocBaseIndependent.test_getitem_label_list_with_missing  s~    58?3 ]]8>::sCjM ; 58]]8>::q!fI ;:	 ;: ;::s   B	B2B/	2C	r	   TFc                    \        . RO4      pR\        V4       R\        V4       2p\        P                  ! \        VR7      ;_uu_ 4        VP
                  V,           RRR4       R#   + '       g   i     R# ; i)ro   z Boolean index has wrong length: z instead of r   Nr   )r   rh   r   r   r   r%   )rJ   r	   r&  r   s   &&  r/   test_loc_getitem_bool_diff_len5TestLocBaseIndependent.test_loc_getitem_bool_diff_len  sS     90ULQQ]]:S11EE%L 2111s   A**A;	c                    R # r   r   rJ   s   &r/   test_loc_getitem_int_slice1TestLocBaseIndependent.test_loc_getitem_int_slice  s    r1   c                r   \        \        P                  P                  ^4      P                  R4      . RO. ROR7      pR\        P                  ! \
        4       R2p\        P                  ! \        VR7      ;_uu_ 4        VP                  ^^.^^.3,           RRR4       R#   + '       g   i     R# ; i)	rF   r	   rC   z$\"None of \[Index\(\[1, 2\], dtype='z'\)\] are in the \[columns\]\"r   NrO   rO   r  )era   g)
r   rH   r   r   r6   intr   r   rV   r%   rJ   r-   r   s   &  r/   test_loc_to_fail'TestLocBaseIndependent.test_loc_to_fail  s    II!!!$++F3!#
 4BHHSM? C$ $ 	 ]]83//FFAq6Aq6>" 0///s   B%%B6	c                   \        \        R 7      p^VP                  ^&   ^VP                  R&   \        P                  ! \
        RR7      ;_uu_ 4        VP                  R,           RRR4       R\        P                  ! \        4       R2p\        P                  ! \
        VR7      ;_uu_ 4        VP                  RR.,           RRR4       Rp\        P                  ! \
        VR7      ;_uu_ 4        VP                  \        R.\        R 7      ,           RRR4       ^VP                  R&   \        P                  ! \
        R	R7      ;_uu_ 4        VP                  RR.,           RRR4       ^VR&   R
\        P                  ! \        4       R2p\        P                  ! \
        VR7      ;_uu_ 4        VP                  R.,           RRR4       VR \        P                  ! \
        VR7      ;_uu_ 4        ^ VP                  R.&   RRR4       R#   + '       g   i     EL; i  + '       g   i     ELn; i  + '       g   i     EL0; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)rQ   r!   z^-1$r   Nz&\"None of \[Index\(\[-1, -2\], dtype=''\)\] are in the \[index\]\"zE\"None of \[Index\(\['4'\], dtype='object'\)\] are in the \[index\]\"4r$  z"\"None of \[Index\(\[-2\], dtype=')
r   rG   r%   r   r   rV   rH   r6   r5  r   rJ   r&  r   s   &  r/   test_loc_to_fail2(TestLocBaseIndependent.test_loc_to_fail2  s     ac
]]8733EE"I 4 6bhhsm_ E" " 	 ]]83//EE2r(O 0 W]]83//EE%V,- 0 b	]]8>::EE2r(O ; #1"((3- A" " 	 ]]83//EE2$K 0 cF]]83//AEE2$K 0/9 433 0// 0// ;: 0/
 0//sH   H1H,5$I I9I'=I:H)	,H=	 I	I$	'I7	:J	c                   \        R .R..^^.R.R7      pR\        P                  ! \        4       R2p\        P
                  ! \        VR7      ;_uu_ 4        VP                  ^.R3,           RRR4       \        P
                  ! \        VR7      ;_uu_ 4        VP                  ^.,           RRR4       R#   + '       g   i     LS; i  + '       g   i     R# ; i)	r!   r    valuer1  z!\"None of \[Index\(\[3\], dtype='r:  r   r$   N)r   rH   r6   r5  r   r   rV   r%   r6  s   &  r/   test_loc_to_fail3(TestLocBaseIndependent.test_loc_to_fail3  s     u~aVgYG 1# @" " 	 ]]83//FFA36N 0 ]]83//FFA3K 0/ 0/ 0//s   B:C:C
	C	c                   \        . RO4      pVP                  ^.,           Rp\        P                  ! \        \
        P                  ! V4      R7      ;_uu_ 4        VP                  ^.,           RRR4       \        P                  ! \        RR7      ;_uu_ 4        VP                  ^^.,           RRR4       R#   + '       g   i     LT; i  + '       g   i     R# ; i)ro   z@None of [RangeIndex(start=3, stop=4, step=1)] are in the [index]r   Nr$  r   )r   r%   r   r   rV   reescaper>  s   &  r/   test_loc_getitem_list_with_fail6TestLocBaseIndependent.test_loc_getitem_list_with_fail  s     9	qc
P]]8299S>::EE1#J ; ]]8>::EE1a&M ;:	 ;: ;::s   B=C=C	C!	c                :   \        \        P                  P                  ^4      P                  RR7      . ROR7      pVP                  P                  R 4      pVP                  \        P                  ! V4      ,          pVP                  V,          p\        P                  ! WC4       VP                  VP                  ,          p\        P                  ! WC4       VP                  \        P                  ! VRR7      ,          p\        P                  ! WC4       R# )	rF   sizer   c                     R V 9   # )alphar   r   s   &r/   <lambda>7TestLocBaseIndependent.test_loc_index.<locals>.<lambda>,  s    glr1   booleanrQ   N)r   r   )alpha_0alpha_1alpha_2beta_0beta_1)r   rH   r   r   r	   mapr%   r   r&   r'   r   r   )rJ   r-   r   r.   r<   s   &    r/   test_loc_index%TestLocBaseIndependent.test_loc_index#  s     II!!!$+++9G

 xx||2366"((4.)
f/$
f/Y78
f/r1   c                L   \        \        P                  P                  ^4      P                  R	4      . R
O. R
OR7      pVP                  R,          P
                  R,          pVP                  RR.8H  P                  4       '       g   Q hVP                  RR.8H  P                  4       '       g   Q h\        R\        R4      .R^./4      P
                  ^ ,          p\        \        R4      ^.RR.^ R7      p\        P                  ! W#4       VP                  \        8X  g   Q hR# )rF   r#   r   r   r!   rc   r    r   Nr   r   r#   r   r   D)r$   :r#   r   N)rn   rF   Nr$   )r   rH   r   r   r%   r   rC   allr	   r   r   r&   r;   r6   rG   r   s   &   r/   test_loc_general'TestLocBaseIndependent.test_loc_general8  s    II!!!$++F3(&
 
#((03*,113333c
*//1111 C)J"7!8#sCDII!L9Z0!4S#JQO
v0||v%%%r1   c           
     x    \        R \        RR4      R\        \        ^4      \        P
                  R7      /4      # )r   
2000-01-01	2000-01-5valrQ   )r   r   r   rT   rH   r   r-  s   &r/   frame_for_consistency,TestLocBaseIndependent.frame_for_consistencyJ  s4    
<=veAhbhh7
 	
r1   rf  rQ   c                    VP                  4       p\        P                  ! \        R R7      ;_uu_ 4        W#P                  R&   RRR4       R#   + '       g   i     R# ; i)r  r   Nr$   r   r   r   r   r   r%   )rJ   rg  rf  r-   s   &&& r/   test_loc_setitem_consistency3TestLocBaseIndependent.test_loc_setitem_consistencyS  s>     #'')]]9O<< #FF9 =<<<s   AA	c                    VP                  4       p\        P                  ! \        R R7      ;_uu_ 4        RVP                  R&   RRR4       R#   + '       g   i     R# ; i)r  r   r   Nrj  rk  rJ   rg  r-   s   && r/   (test_loc_setitem_consistency_dt64_to_str?TestLocBaseIndependent.test_loc_setitem_consistency_dt64_to_str^  s@     #'')]]9O<< %BFF9 =<<<   AA 	c                    VP                  4       p\        P                  ! \        R R7      ;_uu_ 4        RVP                  R&   RRR4       R#   + '       g   i     R# ; i)r  r   r3   Nrj  rk  ro  s   && r/   *test_loc_setitem_consistency_dt64_to_floatATestLocBaseIndependent.test_loc_setitem_consistency_dt64_to_floatf  s@     #'')]]9O<< #BFF9 =<<<rr  c                    \        R \        \        R4      .4      /4      p\        P                  ! \
        RR7      ;_uu_ 4        RVP                  R&   RRR4       R#   + '       g   i     R# ; i)r   20180101r  r   stringNrj  )r   r   r   r   r   r   r%   r   s   & r/   'test_loc_setitem_consistency_single_row>TestLocBaseIndependent.test_loc_setitem_consistency_single_rowm  sN     	*(='> ?@A]]9O<< (BFF9 =<<<s   AA0	c                   \        R R.R7      p\        R R.R7      p\        P                  ! R4      ;_uu_ 4        ^VP                  R&   RRR4       \        P                  ! W!4       \        R R.R7      p^VR &   VR ,          P                  \        P                  4      VR &   \        P                  ! W!4       R#   + '       g   i     Lz; i)r   yr   Nr$   r   )r   r&   assert_produces_warningr%   r'   r  rH   r   rJ   r.   r-   s   &  r/   "test_loc_setitem_consistency_empty9TestLocBaseIndependent.test_loc_setitem_consistency_emptyt  s     c3Z0Sz*''--BFF6N .
b+ Sz*3 ,,RXX6
b+ .-s   B==C	c                N   R .^,          . RO. RO.p\         P                  ! V. ROR7      p. RO. RO.p\         P                  ! VRR.R7      pRRRR\        P                  .. RORRR	R\        P                  .. RO.p\	        WcVR
7      p\
        P                  ! 4       pV'       d   \        P                  ! \        RR7      pV;_uu_ 4        \        VP                  R,          4      VP                  R&   RRR4       V;_uu_ 4        \        VP                  R,          4      VP                  R&   RRR4       V'       d   R# VP                  4       pVP                  R,          VP                  R,          ,
          VP                  R&   \        P                  ! \        RR7      ;_uu_ 4        VP                  R,          \        R4      ,          VP                  R&   RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)Region_1namesLevel_0Level_1r#   z5/25/2015 10:59z5/25/2015 11:22Yesz5/20/2015 8:27z5/20/2015 8:41r1  r  r   Nl    Xp7 )Site_1r  Site_2r  )l   BP[ l   _Z l   q=.Z l   <.Z )RegionSiteRespondentID)
Respondentr  r  OtherCatr  )	Something	StartDateEndDatezYes/NoSomethingElse)r#   z5/21/2015 9:40z5/21/2015 9:52r  r  )r#   z5/20/2015 8:33z5/20/2015 9:09r  No)r$   )r  r  )r$   )r  r  )r$   )r  Duration)r   r   rH   r   r   
contextlibnullcontextr   r   r   r   r%   infer_objectsr   )	rJ   rK   levelsmiclevelsr   r   r-   ctxs	   &&       r/   -test_loc_setitem_consistency_slice_column_lenDTestLocBaseIndependent.test_loc_setitem_consistency_slice_column_len  s    L14<

 ##F2TU OL
 %%gi5KL #%6rvvFC"$4eRVVDB	
 v6$$&--	ACS5@566BFF12  S3>344BFF/0 
  FF/0ff345 	,- ]]9O<<46FF-5.)5*BFF01 =</ S S& =<<s$   *G-
*H 21H-G=	 H	H$	unitr^  c                   \        R \        P                  ! R4      \        P                  ! R4      ./4      pVP                  R	,          P                  P                  RV R24      VP                  RV3&   VP                  R	,          P                  P                  RV R24      VR&   \        VP                  R
,          VR7      p\        P                  ! VP                  RV3,          V4       R# )	timestampz2017-02-11 12:41:29z1991-11-07 04:22:37r$   zdatetime64[]r.   r   N)r$   r  )r$   r.   )	r   rH   
datetime64r%   r   r  r   r&   r;   )rJ   r  r-   r.   s   &&  r/   test_loc_assign_non_ns_datetime6TestLocBaseIndependent.test_loc_assign_non_ns_datetime  s     MM"78MM"78
 &&077>>TFRS?TUq$w/66==D6QR>ST:"&&/d;
rvvag9r1   c                   \         P                  ! R . R	O/4      p\        VR ,          RRR7      P                  P	                  R4      VR&   VP
                  R
,          VP
                  R&   VP
                  ^^.R3,          VP
                  ^^.R3&   \        . RO. RO. RO. RO.. ROR7      pRR.pW#,          P                  \        4      W#&   \        P                  ! W4       R# )r   msT)r  cacheusdate_dt
date_dt_cpr   N)   CO!g   s~!g    4	8   A{?)r$   r  )r$   r  )r  2017-01-24 13:26:12.711r  )r  2017-01-24 13:52:05.110r  )r  2018-10-22 13:44:05.888r  )r  2018-10-23 08:08:41.025r  )r   r  r  )	r   	from_dictr   dtas_unitr%   applyr&   r'   )rJ   r-   r.   rC   s   &   r/   test_loc_modify_datetime/TestLocBaseIndependent.test_loc_modify_datetime  s      QR
 $BvJTFIIQQRVW9"$&&"6')vvq!fi.?'@1v|#$UUUU	 6
 l+$-33K@
b+r1   has_refc                   \        . ROR.\        R7      pV'       d
   VR,          p\        P                  ! . R	ORR7      VP                  . R
OR3&   \        . RO. RO\        R7      p\        RV/4      p\        P                  ! W%4       R# )rO   r#   r	   rC   r6   r$   r   rQ   r	   r6   NrO   r   r   r   r   rO   r   rF   rO   ro   )r   r:   rH   r   r%   r   r&   r'   )rJ   r  r-   viewserr.   s   &&    r/   #test_loc_setitem_frame_with_reindex:TestLocBaseIndependent.test_loc_setitem_frame_with_reindex  si     YUCa5D!#)7!Cy#~ Yiu=c3Z(
b+r1   c                ,   \        . R	ORR.\        R7      pRVR&   \        P                  ! . R
ORR7      VP                  . ROR3&   \        . RO. R	ORR7      p\        RVP                  \        4      /4      pRVR&   \        P                  ! W4       R# )rO   r#   r   r  rx  r   rQ   r  Nr  r   r  r  )	r   r:   rH   r   r%   r   r  r&   r'   )rJ   r-   r  r.   s   &   r/   )test_loc_setitem_frame_with_reindex_mixed@TestLocBaseIndependent.test_loc_setitem_frame_with_reindex_mixed  sy    Yc
%H3!#)7!Cy#~Yiw? c3::e#456 
b+r1   c                    \        . R	ORR.\        R7      pRVR&   \        P                  ! . R	ORR7      VP                  \        ^^ R
4      R3&   \        R. RORR/. R	OR7      p\        P                  ! W4       R# )ro   r#   r   r  rx  r   rQ   r   Nr   r<  )r8   r4   r3   )r   r:   rH   r   r%   r   r&   r'   r   s   &  r/   *test_loc_setitem_frame_with_inverted_sliceATestLocBaseIndependent.test_loc_setitem_frame_with_inverted_slice  sh    Yc
%H3')xx	'IuQ2#$ c?CB)T
b+r1   c                    \        ^4       Uu. uF  pR\        V4      ,           NK  	  pp\        P                  ! ^RR7      p\        ^4       Uu. uF  pR\        V4      ,           NK  	  pp\        P                  ! ^RR7      p\	        \        V4      P                  V4      4      p\        VR7      p\        P                  VR&   V'       d
   VR,          p	WHP                  VR3&   \        P                  VR&   WhP                  VR3&   \        WC\        P                  R7      p
\        WeR7      p\        RV
RV/\        RR.4      R	7      P                  VR7      p\        P                  ! W4       R
# u upi u upi )r   @r   rQ   r   r#   r$   r   r  r   N)rT   rD   rH   r   rU   setunionr   r   r%   r   r   r   reindexr&   r'   )rJ   r  ikeys1val1keys2val2r	   r-   r  seraserbr.   s   &&           r/   test_loc_setitem_empty_frame3TestLocBaseIndependent.test_loc_setitem_empty_frame  s9    (-Qx0x!s1vx0yy'*',Qx0x!s1vx0yy'*SZ%%e,-U#&&3a5D!ucz&&3!ucz drzz:d(c4d3UC:=NOWW X 
 	b+/ 1 1s   E6E;c                
   \        \        P                  P                  ^4      P	                  R4      \        R4      \        R4      R7      pV'       d
   VR,          pVP                  R,          p^VP                  R&   VP                  R,          pV^8X  g   Q hVP                  R,          pV^8X  g   Q h^ VP                  R	&   VP                  R	,          pVP                  R
,          p\        P                  ! WE4       R# )rF   rb   ABCDr1  r$   Nr\  rn   rn   )r!   r#   )r$   :r   r^  Nr$   ro   NN)
r   rH   r   r   standard_normalrU   r   r%   r&   r'   )rJ   r  r-   r  r<   r.   s   &&    r/   test_loc_setitem_frame-TestLocBaseIndependent.test_loc_setitem_frame(  s    II!!!$44V<v,L

 a5Dx!{{{{z66*%
f/r1   c                   \        R . ROR\        P                  /4      pVP                  VP                  VP
                  VP                  8  R3&   \        R . ROR\        P                  /4      p\        P                  ! W4       R# )r#   r   Nr   )r   rH   r   r#   r%   r   r&   r'   r   s   &  r/   /test_loc_setitem_frame_nan_int_coercion_invalidFTestLocBaseIndependent.test_loc_setitem_frame_nan_int_coercion_invalid@  sc     YRVV45#%44rttbdd{C c9c266:;
b+r1   c           	     V   \        ^^^.^^^.RRR./4      pVP                  ^ ^^.3,          p\        ^^.\        ^^.\        R7      R^ R7      p\
        P                  ! W#4       \        ^^^.^^^.RRR./4      p^^.VP                  ^ ^^.3&   \
        P                  ! W4       R# )ro   r!   r    rQ   r   r5   N)r   r%   r   r   rG   r&   r;   r'   r   s   &   r/   #test_loc_setitem_frame_mixed_labels:TestLocBaseIndependent.test_loc_setitem_frame_mixed_labelsH  s     Aq61q!fcC:>?Aq6	"F%Af5W1
 	v0a!QQFC#sDEFq1a&y
b+r1   c           
     h   \        R . ROR\        \        ^4      \        P                  R7      /4      pVP
                  R,          pVP                  R,          Vn        W!P
                  R&   \        R . ROR\        . RO\        P                  R7      /4      p\        P                  ! W4       \        R\        RRR	R
7      R\        \        ^4      \        P                  R7      /4      p\        R\        R4      \        R4      \        R4      \        R4      \        R4      .R\        . RO\        P                  R7      /4      pVR,          P                  R4      VR&   VP
                  R,          pVP                  R,          Vn        W!P
                  R&   \        P                  ! W4       R# )r#   r   rQ   ro   rF   Nr_  rn   ro   Nr   rd  re  nsr  rf  200001012000010220000103zM8[ns]:rF   r   NrF   r   NNr   r   baz)r   r  r  )ro   rF   rF   )rn   ro   rn   ro   rF   )r   r   rT   rH   r   r%   r	   r&   r'   r   r   r  )rJ   r-   rhsr.   s   &   r/    test_loc_setitem_frame_multiples7TestLocBaseIndependent.test_loc_setitem_frame_multiplesW  sZ   'fU1XRXX.NO
 ffSkHHSM	s'fYbhh.OP
 	b+ 
<4HveAhbhh7
 j)j)j)j)j) voRXX>	
 $F+228<ffSkHHSM	s
b+r1   r  r#   NrB  Zc                    \        ^^.^^..RR.R7      P                  R\        /4      pW#P                  ^ V3&   VP                  R,          p\	        V4      '       d   VR8X  g   Q hR# )ro   r#   r   r   r  N)rn   r#   )r   r  rG   r%   r   )rJ   r  rB  r-   r<   s   &&&  r/   "test_loc_setitem_with_scalar_index9TestLocBaseIndependent.test_loc_setitem_with_scalar_index}  sf     AA'#s<CCS&MR"q'z  Vs]22]r1   zindex,box,expectedr   r   c                ~    \        ^^.^^.^^..RR.R7      pW$P                  V&   \        P                  ! WC4       R# )ro   r#   r   r   Nr   r%   r&   r'   )rJ   r	   boxr.   r-   s   &&&& r/    test_loc_setitem_missing_columns7TestLocBaseIndependent.test_loc_setitem_missing_columns  sA    j AAA/#sDu
b+r1   c                \   \        R \        R4      P                  R4      \        P                  ./4      pVP
                  pVP                  ^ .,          p\        P                  ! VP
                  V4       VP                  ^.,          p\        P                  ! VP
                  V4       R# )r   rc   UTCN)	r   r   tz_localizer   r   dtypesr   r&   r;   r   s   &   r/   test_loc_coercion(TestLocBaseIndependent.test_loc_coercion  sy    :!6!B!B5!I266 RST99!
v}}h7!
v}}h7r1   c           	     <   \        R \        R^^4      \        R^^4      ./4      pVP                  pVP                  ^ .,          p\        P
                  ! VP                  V4       VP                  ^.,          p\        P
                  ! VP                  V4       R# )r     i  N)r   r   r  r   r&   r;   r   s   &   r/   test_loc_coercion2)TestLocBaseIndependent.test_loc_coercion2  sw    $1!5xa7K LMN99!
v}}h7!
v}}h7r1   c                (   \        R R.R.^	,          ,           /4      pVP                  pVP                  R,          p\        P                  ! VP                  V4       VP                  R,          p\        P                  ! VP                  V4       R# )textz
some wordsNr_  :rO   NN)r   r  r   r&   r;   r   s   &   r/   test_loc_coercion3)TestLocBaseIndependent.test_loc_coercion3  si    $! ;<=99
v}}h7
v}}h7r1   c                2   \        ^*4      P                  R4      \        R4      P                  R4      .p\        V\        RR.4      R7      p\        \        R7      pV^ ,          V! V4      R&   V^,          V! V4      R&   \
        P                  ! WC4       R# )*   r  i  r   r   r   rQ   N)r   r   r   r   rG   r&   r;   )rJ   
indexer_slvalsr.   r  s   &&   r/   test_setitem_new_key_tz.TestLocBaseIndependent.test_setitem_new_key_tz  s     O''.((/
 $eUEN&;<6"!%a
3!%a
3
s-r1   c                   \        R . ROR. RO/. ROR7      pRp\        P                  ! \        VR7      ;_uu_ 4        VP                  R,           RRR4       Rp\        P                  ! \        VR7      ;_uu_ 4        VP                  R,           RRR4       Rp\        P                  ! \        VR7      ;_uu_ 4        VP                  R	,           RRR4       \        R . ROR. RO/. ROR7      P                  ^ R
7      pVP                  R,          p\        R . ROR. RO/. ROR7      p\        P                  ! W44       VP                  R,          p\        P                  ! W14       VP                  R	,          p\        R . ROR. RO/. ROR7      p\        P                  ! W44       R#   + '       g   i     ELg; i  + '       g   i     EL9; i  + '       g   i     EL; i)r#   r   r   z5'Cannot get left slice bound for non-unique label: 1'r   r  Nz5'Cannot get left slice bound for non-unique label: 0':rn   NNr  axisro   rF   rO   r   r   r   )rO   r   r   r   r   r   )rn   ro   rn   ro   rF   rO   )rF   r   r   r   )r   r   r   r   )ro   ro   rF   rO   )rF   r   r   )r   r   r   )ro   ro   rF   )r   r   r   rV   r%   
sort_indexr&   r'   )rJ   r-   r   r<   r.   s   &    r/   test_loc_non_unique*TestLocBaseIndependent.test_loc_non_unique  sa    $c+=>FX
 F]]83//FF2J 0E]]83//FF2J 0E]]83//FF3K 0 $c+=>FX

*!*
 	 c<lC<X
f/
f)c9c9=YO
f/- 0// 0// 0//s#   F0 GG0G	G	G)	z
length, l2  i 順 c                   \        R 4      p\        P                  ! \        \        P
                  P                  ^4      P                  V\        V4      34      \        P                  ! V4      VR7      \        \        P                  ! V\        V4      34      ^ .V,          VR7      .4      pVP                  P                  RJ g   Q h\        P                  ! V4      pVP                  V,          p\        P                  ! VP                  ^ .4      \        \        P                  ! \        V4      \        V4      34      ^ .\        V4      ,          VR7      VP                  VR,          4      .4      p\        P                   ! Wg4       R# )ABCDEFGr1  Fr  N)rU   r   concatr   rH   r   r   r  rh   r   onesr	   	is_uniquer%   taker&   r'   )rJ   lengthl2rC   r-   r   r<   r.   s   &&&     r/    test_loc_non_unique_memory_error7TestLocBaseIndependent.test_loc_non_unique_memory_error  s*    y/YYII))!,<<fc'l=ST))F+#
 "''2s7|"45aS2XwW	
 xx!!U***yy}99GGSYG56#D	/#
 R!

 	f/r1   c                   \        ^^.^^..4      pRVP                  n        VP                  ^ ^.,          P                  P                  pVR8X  g   Q hVP                  ^ ^.,          P                  P                  pVR8X  g   Q hR# )ro   
index_nameN)r   r	   r7   r   r%   rJ   r-   r<   s   &  r/   test_loc_name$TestLocBaseIndependent.test_loc_name=  sz    AA'($!Q&&++%%%A%%**%%%r1   c                j   \        \        P                  ! R	4      \        \	        ^4       Uu. uF  pRV 2NK
  	  upRR7      \        \	        ^4       Uu. uF  pRV 2NK
  	  upRR7      R7      p\
        P                  ! VP                  R. 3,          VP                  R
,          RRR7       \
        P                  ! VP                  . R3,          VP                  R,          RRR7       \
        P                  ! VP                  . ,          VP                  R,          RRR7       R# u upi u upi )r   zi-r!   r   r1  r$   T)check_index_typecheck_column_typeN)r   rF   )r$   Nrn   N)r-  r$   )	r   rH   r  r   rT   r&   r'   r%   r   )rJ   r  r-   s   &  r/   !test_loc_empty_list_indexer_is_ok8TestLocBaseIndependent.test_loc_empty_list_indexer_is_okG  s    GGFO5848a2aS843?U1X6XRs8X6SA
 	FF1b5M2775>DTX	
 	FF2q5M2775>DTX	
 	FF2JQU	
 56s   D+D0c                   \        R . RO/4      pVP                  R,          pW!Jg   Q hVR,          VJg   Q hVP                  R,          VJg   Q h\        P                  ! VR ,          P                  VR ,          P                  4      '       g   Q h. ROVP                  R&   VR ,          . RO8H  P                  4       '       g   Q h\        \        P                  P                  ^4      P                  R4      4      pV^ ,          VP                  R	,          Jg   Q h\        . R
O4      pVP                  R,          pWTJg   Q hVR,          VJg   Q h. ROVR&   \        VR,          . RO8H  4      '       g   Q hR# )r!   r$   NrO   NNr   )r$   r$   )r   r   r   r$   r!   r   r   r   r  r   r   	   )
r   r%   rH   shares_memory_valuesr`  r   r   r  r   )rJ   original_df	sliced_dfr-   original_seriessliced_seriess   &     r/   &test_identity_slice_returns_new_object=TestLocBaseIndependent.test_identity_slice_returns_new_objectZ  sU     i 01OOA&	+++1~[000t$K777 C 0 8 8)C.:P:PQQQQ #,#)+002222 ryy,,Q/??HI!uBFF4L((( !!34'++A.333q!888'=$	12222r1   c                |   \        \        \        ^4      \        ^4      4      RR.R7      pVP                  4       pVP                  R,          pV^,          p\
        P                  ! W#4       VP                  4       pVP                  VP                  R3,          pV^,          p\
        P                  ! W%4       R# )rO   r!   r    r   Nr2  )r   ziprT   r   r%   r&   r'   r	   )rJ   requestr   r|  qzs   &&    r/   test_loc_copy_vs_view,TestLocBaseIndependent.test_loc_copy_vs_viewx  s    c%(E!H-SzBFFHEE&M	Q
a#FFHEE!''3,	Q
a#r1   c                   \         P                  ! R 4      P                  p\        ^^.V^,
          V.R7      pVP                  V^,
          ,          pVP
                  ^ ,          pW48X  g   Q hVP                  V^,
          .,          pVP
                  ^ .,          p\        P                  ! W44       VP                  V^,
          V.,          p\        P                  ! W24       R# )r   r   N)rH   iinfomaxr   r%   r   r&   r;   )rJ   umaxr  r<   r.   s   &    r/   test_loc_uint64&TestLocBaseIndependent.test_loc_uint64  s     xx!%%aVD1Hd#34"88A;!!!$($88QC=
v0$(D)*
v+r1   c                   \         P                  ! R 4      P                  p\        ^^.V^,
          V.R7      p\        P
                  ! \        RR7      ;_uu_ 4        VP                  R,           RRR4       \        P
                  ! \        RR7      ;_uu_ 4        VP                  R.,           RRR4       R#   + '       g   i     LS; i  + '       g   i     R# ; i)r   r   z-1r   Nr<  )rH   rF  rG  r   r   r   rV   r%   )rJ   rH  r  s   &  r/   !test_loc_uint64_disallow_negative8TestLocBaseIndependent.test_loc_uint64_disallow_negative  s    xx!%%aVD1Hd#34]]8400GGBK 1 ]]8400GGRDM 10	 10 100s   B<C<C	C 	c                   . ROp\        RVR\        P                  ! \        P                  .\	        V4      ,          \
        R7      /4      p\        RR.R7      pWP                  R&   \        P                  ! W24       R# ro   r   r|  rQ   r   Nr   r}  )	r   rH   r   r   rh   rG   r%   r&   r'   rJ   r   r.   r-   s   &   r/   *test_loc_setitem_empty_append_expands_rowsATestLocBaseIndependent.test_loc_setitem_empty_append_expands_rows  sb     $RXXrvvhT&:&IJ

 Sz*v
b+r1   c                T   . ROp\        RVR\        P                  ! \        P                  .\	        V4      ,          \
        R7      /4      p\        RR.R7      pVR,          P                  \        P                  4      VR&   WP                  R&   \        P                  ! W24       R# rO  )r   rH   r   r   rh   rG   r  r   r%   r&   r'   rP  s   &   r/   6test_loc_setitem_empty_append_expands_rows_mixed_dtypeMTestLocBaseIndependent.test_loc_setitem_empty_append_expands_rows_mixed_dtype  s|     $RXXrvvhT&:&IJ
 Sz*S'..*3v
b+r1   c                    \        R R.R\        P                  ./4      p\        R R.\        R7      pVP                  R,          VP                  R&   \
        P                  ! W!4       R# )r   r3   r|  rB   N)rn   r   )r   rH   r   r:   r%   r&   r'   r  s   &  r/   *test_loc_setitem_empty_append_single_valueATestLocBaseIndependent.test_loc_setitem_empty_append_single_value  sQ    cC5#x89Sz7!f-v
b+r1   c                   ^^.p\        RR.R7      pVP                  P                  \        P                  4      Vn        Rp\
        P                  ! \        VR7      ;_uu_ 4        WP                  ^ ^.R3&   RRR4       Rp\
        P                  ! \        VR7      ;_uu_ 4        WP                  R&   RRR4       R#   + '       g   i     LO; i  + '       g   i     R# ; i)	ro   r   r|  r   z&None of .*Index.* are in the \[index\]r   N)setting an array element with a sequence.)r_  r   )
r   r	   r  rH   r   r   r   rV   r%   
ValueError)rJ   r   r-   r   s   &   r/   $test_loc_setitem_empty_append_raises;TestLocBaseIndependent.test_loc_setitem_empty_append_raises  s     1vSz*88??288,7]]83//"&FFAq63; 0 :]]:S11#FF8 21	 0/ 211s   'C(CC	C%	c                    \        ^^.^^..4      pVP                  \        P                  ! ^ 4      ,          p\	        ^^.^ R7      p\
        P                  ! W#4       R# )ro   r   N)r   r%   rH   r   r   r&   r;   )rJ   r-   r<   r&  s   &   r/   test_indexing_zerodim_np_array5TestLocBaseIndependent.test_indexing_zerodim_np_array  sM    AA'($Aq6"
v)r1   c                    \        ^^.4      pVP                  \        P                  ! ^ 4      ,          pV^8X  g   Q hR# )ro   N)r   r%   rH   r   )rJ   r&  r<   s   &  r/   %test_series_indexing_zerodim_np_array<TestLocBaseIndependent.test_series_indexing_zerodim_np_array  s1    Aq6Nrxx{#{{r1   c                    . ROR.^,          ,           p\        V\        RR4      R7      p\        \        RR4      \        P                  R7      p. ROVP                  RRR	1&   \
        P                  ! W24       R# )
ro   Ni  i  r   r  r   r  )r   r   r   rO   rF   ro   r<  )r   rT   rH   r   r%   r&   r;   )rJ   r   r.   r<   s   &   r/   test_loc_reverse_assignment2TestLocBaseIndependent.test_loc_reverse_assignment  s^    !TFQJ.$eD$&78eD$/rzzB#5

4R< 
v0r1   c                   \        ^4       Uu. uF@  p\        \        P                  P	                  ^4      P                  4       R,          4      NKB  	  pp\        VR.R7      p\        VR.R7      p\        P                  ! WE4       V'       dc   \        P                  ! \        RR7      ;_uu_ 4        V Uu. uF  p\        V4      NK  	  upVP                  VP                  R3&   RRR4       MpV Uu. uF  p\        V4      NK  	  upVP                  VP                  R3&   \        VR.\        R7      P                  \        4      p\        P                  ! WE4       V Uu. uF  p\        V4      NK  	  upVR&   \        VR.\        R7      p\        P                  ! WE4       R# u upi u upi   + '       g   i     Lc; iu upi u upi )r   g-q=r#   r   r  r   NrB   )rT   rD   rH   r   r   r   r&   r'   r   r   r   r:   r%   r	   r  rG   )rJ   rK   _col_datar<   r.   r   s   &&     r/   3test_loc_setitem_str_to_small_float_conversion_typeJTestLocBaseIndependent.test_loc_setitem_str_to_small_float_conversion_type  sg    MRRSHUHqC		--a0779EABHU8cU3Xu5
f/ y@@CK0L8aq80L

6<<,- A@ @H,Hx!U1Xx,HFJJv||S() C5FMMfUH!!&3 *22AuQx2sXuEB
f/' V 1M A@ -I 3s0   AF+4F59F0F56G&G0F55G	c                   \        R RRR7      pVP                  ^	8H  VP                  ^8H  ,          p\        \        P
                  P                  ^4      P                  \        V4      ^34      VR7      p\        P                  ! WA4      pVP                  \        ^	^4      ,          pVP                  V,          p\        P                  ! WV4       VP                  R,          pVP                  \        ^	^4      ,          pVRR pVP                  P                  R4      Vn        VP                  P                  R4      Vn        \        P                  ! WX4       R# )1/1/2000z1/5/20005minfreqr   :z1/4/2000NNNr<  )r   hourminuter   rH   r   r   r  rh   r&   get_objr%   r   r   r	   
_with_freq)	rJ   rX   rngr   rY   r<   r   chunkr.   s	   &&       r/   test_loc_getitem_time_object3TestLocBaseIndependent.test_loc_getitem_time_object  s    Zf=A#**"23II!!!$44c#h]C3
 jj.a%ggdm
$$42;'"#; ||..t4!2248
)r1   
spmatrix_tr6   c                Z   \         P                  ! R 4      p\        W14      p^^rTV! \        P                  ! WEVR7      VR7      p\
        P                  P                  V4      p\        ^V4      p\        P                  ! VP                  V,          P                  4      p	VP                  4       V,          p
\        P                  ! W4       VP                  V,          P                  P                  p	\        P                   ! V\#        V4      4      p
\        P                  ! W4       R# )scipy.sparserQ   N)r   importorskipgetattrrH   eyer   sparsefrom_spmatrixrT   
nan_to_numr%   r   toarrayr&   assert_numpy_array_equalr  fullr   )rJ   ry  r6   	sp_sparserowsr   spmatrixr-   itr_idxr<   r.   s   &&&        r/   $test_loc_getitem_range_from_spmatrix;TestLocBaseIndependent.test_loc_getitem_range_from_spmatrix  s     ''7	Y3

 dbffTu=UK++H5 4.rvvg556##%g.
##F5 ''..774U!34
##F5r1   c           	         \        R \        P                  ! ^ ^ .\        R4      R7      /4      pVP                  ^ ^.,          p\
        P                  ! W!4       R# )r#   r   rQ   N)r   r   r   r   r%   r&   r'   r'  s   &  r/   ,test_loc_getitem_listlike_all_retains_sparseCTestLocBaseIndependent.test_loc_getitem_listlike_all_retains_sparse3  sD    RXXq!fK4HIJKA
f)r1   c                L   \         P                  ! R 4      p\        P                  P	                  VP                  ^\        P                  R7      4      pVP                  \        ^4      ,          p\        . RO. RO.\        \        P                  4      R7      p\        P                  ! W44       VP                  \        ^4      ,          P                  \        ^4      ,          p\        . RO.\        \        P                  4      R7      p\        P                  ! W44       R# )r{  rQ   N)ro   rn   rn   rn   rn   )rn   ro   rn   rn   rn   )r   r|  r   r  r  r~  rH   r   r%   rT   r   r&   r'   )rJ   r  r-   r<   r.   s   &    r/   test_loc_getitem_sparse_frame4TestLocBaseIndependent.test_loc_getitem_sparse_frame8  s    ''7	++IMM!288M,LMa!o.bhh'
 	f/a!%%eAh/o.k"((6KL
f/r1   c                   \        . RO\        RR4      R7      pVP                  \        ^4      ,          p\        R R.\        RR4      R7      p\        P
                  ! W#4       VP                  \        ^4      ,          P                  \        ^4      ,          p\        R R.\        RR4      R7      p\        P
                  ! W#4       R# )r3   r  r   rQ   N)r3   r  r  r  r  )r   r   r%   rT   r&   r;   )rJ   r&  r<   r.   s   &   r/   test_loc_getitem_sparse_series5TestLocBaseIndependent.test_loc_getitem_sparse_seriesH  s    ,K	34OPuQx3*K	3,GH
v0uQx$$U1X.3*K	3,GH
v0r1   r%   r   c                    \        . RO. RO.\        \        4      R7      p\        W!4      ^ ,          p\	        . RO\        \        4      ^ R7      p\
        P                  ! W44       R# )r3   rQ   )r6   r7   N)r3   r        ?)r  r4   r  )r   r   r:   r}  r   r&   r;   )rJ   r  r-   r<   r.   s   &&   r/   !test_getitem_single_row_sparse_df8TestLocBaseIndependent.test_getitem_single_row_sparse_dfT  sJ     9UAST%a(/U1C!L
v0r1   key_typec                    V! . RO4      pVP                   RV3,          pVP                   R. RO3,          p\        P                  ! WE4       R# )r#   r$   Nr   )r%   r&   r'   )rJ   float_framer  idxr<   r.   s   &&&   r/   test_loc_getitem_iterable0TestLocBaseIndependent.test_loc_getitem_iterable\  s?    'C(??1o#56
f/r1   c                .   \        \        P                  P                  ^4      P	                  RR7      4      p\        R^
RR7      Vn        VP                  \        R4      R1R3,          pVP                  R,          p\        P                  ! W24       R# )	rF   rK  0sr&  startre   rp  Nr$   r3  ):z0sNNr$   )r   rH   r   r   normalr   r	   r%   r   r&   r'   r   s   &   r/   #test_loc_getitem_timedelta_0seconds:TestLocBaseIndependent.test_loc_getitem_timedelta_0secondsc  so    ryy,,Q/66G6DE"rD66)D/+Q./!
f/r1   val,expectedc                    \        ^^.RR.R7      pVP                  V,          p\        V.4      pWn        \        P
                  ! WB4       R# )ro   r   N                )r   r%   r   r7   r&   r;   )rJ   rf  r.   r-   r<   s   &&&  r/   test_loc_getitem_uint64_scalar5TestLocBaseIndependent.test_loc_getitem_uint64_scalark  sE     1vi%788*%
v0r1   c                    Tp\        . RO\        . ROVR7      R7      pVP                  4       pRVP                  ^&   RVP                  ^&   \
        P                  ! W44       R# )r!   rQ   r   zooNr  )rn         ?ro   )r   r   r   r%   r   r&   r;   )rJ   float_numpy_dtyper6   r  r.   s   &&   r/   +test_loc_setitem_int_label_with_float_indexBTestLocBaseIndependent.test_loc_setitem_int_label_with_float_indext  sN    !_E+U,KL88:
 a
s-r1   zindexer, expectedc                    \        \        ^
4      RR7      p\        R\        ^
4      /RVR7      p^VP                  VP                  V,          R3&   \        VVR.RR7      p\
        P                  ! W$4       R# )r   r&  r  r   r   r6   r	   r  N)r   rT   r   r%   r	   r&   r'   )rJ   r  r.   tdir-   s   &&&  r/   /test_loc_setitem_listlike_with_timedelta64indexFTestLocBaseIndependent.test_loc_setitem_listlike_with_timedelta64index  so     593/U2Y'wcB)+rxx #%&E	
 	h+r1   c                4   \        R . ROR\        R4      /4      p\        P                  ! \        RR7      ;_uu_ 4        \        RR.R R.R7      VP                  R&   \        RR.R R.R7      VP                  R	&   RRR4       R#   + '       g   i     R# ; i)
r!   r    aaaaar  r   
categoriesNro   ro   ro   ro   ro   r  r!   ):rF   rO   Nr    )r   rU   r   r   r   r   r%   r   s   & r/   8test_loc_setitem_categorical_values_partial_column_sliceOTestLocBaseIndependent.test_loc_setitem_categorical_values_partial_column_slice  su     _c4=AB]]9O<<*C:3*MBFF8*C:3*MBFF8 =<<<s   =BB	c                p   \        R R.R^ ./4      p\        VR ,          . ROR7      pW2P                  R	&   VR ,          p\        W2P                  R R7      P                  V'       g   \        MR4      p\        P                  ! WE4       W2R &   \        P                  ! VR ,          \        VR R7      4       R# )
Alphar!   Numericr  r   rD   r   Nr  )r$   r  )	r   r   r%   r   r	   r  rG   r&   r;   )rJ   rK   r-   r  r<   r.   s   &&    r/   'test_loc_setitem_single_row_categorical>TestLocBaseIndependent.test_loc_setitem_single_row_categorical  s    #	A378 GI
 (zG*HH7CJJ,F%
 	v0 !7
r'{F:G,LMr1   c                   \        R \        R4      .^,          /4      p\        P                  ! R4      VP                  R&   \        R4      VP                  R,          8X  g   Q h\        R4      VP                  R	,          8X  g   Q h\
        P                  ! \        RR7      ;_uu_ 4        \        R^^4      VP                  R
&   RRR4       R#   + '       g   i     R# ; i)r]   z
2010-10-01z
2008-08-08r  r   i  N)r  r]   )rn   r]   )ro   r]   )rF   r]   )	r   r   rH   r  r%   r   r   r   r   r   s   & r/   "test_loc_setitem_datetime_coercion9TestLocBaseIndependent.test_loc_setitem_datetime_coercion  s    i56:;<==6x&"&&.888&"&&.888]]9O<<!$1-BFF6N =<<<s   ,CC"	idxervarc                   Tp\        R ^RVR7      p\        RVR.R7      p\        VR.\        P                  R7      pVR8X  d@   \        P
                  ! \        RR7      ;_uu_ 4        WVP                  R	V3&   R
R
R
4       R
# WVP                  R	V3&   \        P                  ! We4       R
#   + '       g   i     R
# ; i)z
2015-07-12h)r  re   rp  tzr  r  r1  r  r  r   r$   N)
r   r   rH   r   r   r   r   r%   r&   r'   )rJ   r  tz_naive_fixturer  r  r.   r<   s   &&&    r/   !test_loc_setitem_datetimeindex_tz8TestLocBaseIndependent.test_loc_setitem_datetimeindex_tz  s     |QSRHSeW= ugRZZHE>y@@'/

1e8$ A@ $,JJq%x !!&3 A@@s   )B,,B=	c                L   \        R RRR7      p\        \        P                  P	                  ^4      P                  \        V4      ^34      VR7      p\        ^^ ^ 4      p\        \        ^^ ^ 4      \        ^^ ^ 4      4      p. ROp. ROpVP                  4       p^ VP                  V&   VP                  V,          pVP                  V,          P                  4       p^ VP                  R&   \        P                  ! Wx4       VP                  4       p^ VP                  V&   VP                  V,          VP                  V&   \        P                  ! Wr4       VP                  4       p^ VP                  V&   VP                  V,          pVP                  V,          P                  4       p^ VP                  R&   \        P                  ! Wx4       VP                  4       p^ VP                  V&   VP                  V,          VP                  V&   \        P                  ! Wr4       R# )	z
2012-01-01z
2012-01-0530minro  r   r$   N)   H   x      )         J   K   L   z   {   |            )r   r   rH   r   r   r  rh   r   r   r   r%   r&   r'   r   )	rJ   r	   r-   akeybkeyaindsbindsr<   r.   s	   &        r/   test_loc_setitem_time_key0TestLocBaseIndependent.test_loc_setitem_time_key  s   <GDII!!!$44c%j!_EU
 B1~T"a^T"a^4"F

4D!66$<$$&Q
f/

4775>

4
f)

4D!66$<$$&Q
f/

4775>

4
f)r1   r`   c                   \         P                  ! . RO4      p\        . RO. R	O.VR7      pVP                  4       p\        P
                  ! R
RR7      VP                  RV3&   \        . RO. RO.VR7      p\        P                  ! WE4       VP                  ^R7      p\        P
                  ! R
RR7      VP                  RV3&   VP                  ^R7      p\        P                  ! W54       R# )r#   r   r   rQ   r$   r  N))r#   r   )r   3)r#   rE   r   r   r   r   rF   rF   )rn   rF   rn   )rn   r   rn   )
r   from_tuplesr   r   rH   zerosr%   r&   r'   r  )rJ   r`   r  r-   rY   r.   s   &&    r/   ,test_loc_setitem_unsorted_multiindex_columnsCTestLocBaseIndependent.test_loc_setitem_unsorted_multiindex_columns  s     ##$FG	9-r:ggi((693i3R@
c,]]]"&8q#v&&A&.
b+r1   c                    \        . ROVR7      p^VP                  ^ &   \        . ROVR7      p\        P                  ! W#4       R# )ro   rQ   Nr   )r   rF   rO   r   r%   r&   r;   )rJ   any_int_numpy_dtyper*   r.   s   &&  r/   test_loc_setitem_uint_drop1TestLocBaseIndependent.test_loc_setitem_uint_drop  s9     	)<=

1)+>?
v0r1   c                |   \        ^
\        P                  ! ^
R4      .,          4      p\        P                  ! ^R4      VP                  . RO&   \        ^
\        P                  ! ^
R4      .,          4      p\	        \        P                  ! ^R4      4      VP                  . RO&   \
        P                  ! W4       R# )r   mNr   )r   rH   timedelta64r%   r   r&   r;   )rJ   r  r.   s   &  r/   test_loc_setitem_td64_non_nano5TestLocBaseIndependent.test_loc_setitem_td64_non_nano  s    R2>>"c2334^^B4	"r3 7889"+BNN2s,C"DY
s-r1   c                   \         P                  P                  ^4      P                  R4      p\	        \        ^4      RR7      pRp\        P                  ! \        VR7      ;_uu_ 4        WP                  \        ^4      &   RRR4       \        P                  ! \        VR7      ;_uu_ 4        WP                  R&   RRR4       R#   + '       g   i     LM; i  + '       g   i     R# ; i)rF   r   rQ   rZ  r   Nr$   r  )
rH   r   r   r  r   rT   r   r   r[  r%   )rJ   r   r  r   s   &   r/    test_loc_setitem_2d_to_1d_raises7TestLocBaseIndependent.test_loc_setitem_2d_to_1d_raises  s    yy$$Q'77?U1XY/9]]:S11 $GGE!H 2 ]]:S11GGAJ 21 21 211s   +C/CC	C,	c                    \         P                  ! ^ ^R7      p\        . RO. RO. RO.V. ROR7      p^pVP                  R,          p\        P
                  ! WC4       R# )	rn   )r  re   r1  Nr   r  r4  r   )r  r#   )r   interval_ranger   r%   r&   assert_almost_equal)rJ   r	   r-   r.   r<   s   &    r/   test_loc_getitem_interval_index6TestLocBaseIndependent.test_loc_getitem_interval_index  sO    !!15	9-UO
 !
v0r1   c                   \         P                  ! ^ ^RR7      p\        . RO. R	O. R
O.V. ROR7      p\         P                  ! ^ ^^RR7      p\        ^^.VRR7      pVP                  R,          p\
        P                  ! WT4       R# )rn   both)r  re   closedr#   r1  )r  re   rp  r  r   Nr   r  r4  r   ro   r#   )r   r  r   r   r%   r&   r;   )rJ   r	   r-   	index_expr.   r<   s   &     r/    test_loc_getitem_interval_index27TestLocBaseIndependent.test_loc_getitem_interval_index2&  ss    !!1VD	9-UO
 %%AqqP	1a&	<
v0r1   tplc                    \        RR.RRR7      p\        VR7      pVP                  V.,          p\        V.RRR7      p\        VR7      p\        P                  ! WE4       R# )ro   r#   Fr7   tupleize_colsr   Nro   ro   rF   )r   r   r%   r&   r'   )rJ   r  r  r-   r<   r.   s   &&    r/   +test_loc_getitem_index_single_double_tuplesBTestLocBaseIndependent.test_loc_getitem_index_single_double_tuples2  s^     6N

 S!SE593'
f/r1   c                    \        R RR.4      pV! RR4      pV! RR4      p\        W#.RRR	7      p\        RR.VR
R.R7      pVP                  V! RR4      ,          R
,          pV^8X  g   Q hR# )	IndexTyper!   r    r   r   r  bofcomposite_indexFr	  r#   r   r1  Nr  )rO   r   )r   r   r   r%   )rJ   r  idx1idx2r	   r-   r<   s   &      r/   !test_loc_getitem_index_namedtuple8TestLocBaseIndependent.test_loc_getitem_index_namedtupleA  sx    {S#J7	&&tl):%P'usCjI	%/05{{r1   c                   \        \        P                  P                  ^4      P	                  R4      . RO. R	OR7      pRVR&   \        P
                  VP                  VP                  R,          R3&   \        \        P
                  R\        P
                  R\        P
                  .V'       g   \        MRR7      P                  p\        P                  ! VR,          P                  V4       R# )
rF   r1  quxrD   NNrF   rQ   Nr   rO   )r!   r    r]   r%  r3  r  )r   rH   r   r   r  r   r%   r	   r   rG   r   r&   r  )rJ   rK   r-   r.   s   &&  r/   $test_loc_setitem_single_column_mixed;TestLocBaseIndependent.test_loc_setitem_single_column_mixedK  s    II!!!$44V<+)

 5	')vvrxx}e#$VVUBFFE2662 2&
 & 	 	r%y//:r1   c                P   \        \        P                  P                  ^4      P                  R4      \	        R4      R7      p\        P
                  VR&   \        P                  ! \        RR7      ;_uu_ 4        RVP                  R	&   RRR4       R#   + '       g   i     R# ; i)
rF   ABCr   eventr  r   r   N)rz   rO   )r   r  )
r   rH   r   r   tupler   r   r   r   r%   r   s   & r/   test_loc_setitem_cast2-TestLocBaseIndependent.test_loc_setitem_cast2Y  si     ryy,,Q/66w?uVff7]]9O<<"'BFF; =<<<s   :BB%	c                   \        R \        P                  ! ^\        P                  R7      /4      p^VP                  R&   VP
                  P                  \        P                  ! \        P                  4      8X  g   Q h\        P                  ! ^4      Vn        VP
                  P                  \        P                  ! \        P                  4      8X  g   Q hR# )onerQ   N)ro   r$  )r   rH   r   int8r%   r  r$  r6   r   s   & r/   test_loc_setitem_cast3-TestLocBaseIndependent.test_loc_setitem_cast3a  s    ryy"'':;<xyy}} 1111yy}} 1111r1   c                    V! \        ^4      . ROR7      p. ROpVP                  ^8X  d	   ^	.^
.^..pW2P                  \        ^4      &   V! . ROVP                  R7      p\        P
                  ! W$4       R# )r   r   N)rO   r   ro   rn   rF   )r5  r      )rn   ro   r   r5  r)  )rT   ndimr%   r	   r&   r   )rJ   rX   rY   r   r.   s   &&   r/   test_loc_setitem_range_key1TestLocBaseIndependent.test_loc_setitem_range_keyi  sa    eAho>88q=cB4"&F"a"#4CIIF
&r1   c                    \        R . ROR. RO/4      p\        ^^.^^.R7      VP                  R&   \        R . ROR. RO/4      p\        P                  ! W4       R# )r!   r    r  Nr  r   r  )ro   rF   rF   ro   ro   r   r   r%   r&   r'   r   s   &  r/   .test_loc_setitem_numpy_frame_categorical_valueETestLocBaseIndependent.test_loc_setitem_numpy_frame_categorical_valuev  sU    _c3LMN&1v1a&Axc?C9RST
b+r1   c           	        \        R RR7      p\        R\        \        P                  V.4      R\        ^ ^.4      /4      P                  R4      pVP                  \        \        P                  W.VP                  P                  R7      R3,          p. ROpVP                  4       V8X  g   Q hVP                  \        \        P                  .VP                  P                  R7      R3,          pVP                  4       ^ .8X  g   Q hR# )z
2023-01-01T)utcr	   rB  rQ   Nr  )
r   r   r   r   r   r   r%   r	   r6   tolist)rJ   r  r-   r<   r.   s   &    r/   "test_loc_with_nat_in_tzaware_index9TestLocBaseIndependent.test_loc_with_nat_in_tzaware_index~  s    $7	 34A

 )G
 	 BFFI1H
 }}(*** BFF8288>>2
 }}1#%%%r1   r   r   )rn   rn   rn   rn   rn   )YMr^  r  r  r&  r  r  r]  )r   r   r   r   )rO   r   r   r   r   r4  )r   r   r^  r   r)     )rO   r   r   r5  )r   r   r)  r9  )r   r#   r^  )r   r   r   r5  )r)  r   r   r9  )r   rF   r   )r5  r   r   )r)  r   r9  )
coo_matrix
csc_matrix
csr_matrix)r  ro   )r  rF   )
ry   ro   rF   rO   r   r   r   r   r   r5  )
rn   ro   rF   rO   ry   ry   ry   ry   r   r5  )
rn   ro   rF   ry   r   ry   r   r   r   r5  r  r  )or   r   r   r   r   r   r   r   r   r   r   r   r   r	  r  r!  r'  r*  r.  r7  r?  rC  rH  rY  ra  fixturerg  rH   r   r   rl  rp  rt  ry  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r   r   r  r  r  r
  r  r  arm_slowslowr#  r(  r.  r<  rC  rI  rL  rQ  rT  rW  r\  r_  rb  re  rj  rw  
complex128r   boolr  r  r  r  r  iterr   r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r!  r&  r+  r/  r4  r   r   r   s   @r/   r   r     s    0 [[7&,u9UV6tU8ST6ud8STNvd|U3 7ud8STNufTl3 7tU8ST	
$%$* 
	11(!KF%(,&	 [[We}6P&QR S#%N 0*&$ ^^
 
 [[	
BHHQbhh'/)RS$	$&$), 6*p [[V%OP: Q:",4 [[Yu6, 7,
,, [[Yu6, 7,6 [[Yu60 70.,,$,L [[SE5sD1288SE?C [[Wubhhuo&>?
3 @
3 [[ Q-.!Aq"&&"&&#9<H0 S#JABFFBFF+\Aq"&&"&&;QR0 O$"((3BFF^YArvv? q!T"O4L)BFFBFF+\?K0 q!T"O4)\2"((CBFFBFF+\?K0 tT4(3*5Aq6Ar7RH5SzJ
K8/Q/	
2f,g2f,	8	8	8. 0D [[[[[[\S#J8H+IJ 0 K   0D&
&3<$ ,",,,$*100*, [[\+UV[[Wr}}bjj"((D&QR6 S W6.*
0 
1 [[Y81 91 [[Z$&%)HI0 J00 [[^nj-IJ1 K1	. [[ /01a[<=V56	
	,	, NN&. [[Wuug&674 84  *D [[US3%#uT{1C$DE, F,1.
	1
1 [[UT6N30 40;(2',& &r1   r   c                      a  ] tR tRt o ]P
                  R 4       t]P
                  R 4       tR t]P                  P                  R4      R 4       tR tRtV tR	# )
TestLocWithEllipsisi  c                    V# r   r   )rJ   
indexer_lis   &&r/   r  TestLocWithEllipsis.indexer  s
     r1   c                >    TpV\         Jd   VP                  4       pV# r   )r   to_frame)rJ   series_with_simple_indexrX   rY   s   &&& r/   rY   TestLocWithEllipsis.obj  s    &&(,,.C
r1   c                P    V! V4      R ,          p\         P                  ! W14       R# ).N)r&   r   )rJ   rY   r  r<   s   &&& r/   test_loc_iloc_getitem_ellipsis2TestLocWithEllipsis.test_loc_iloc_getitem_ellipsis  s    c"
$r1   3ignore:PeriodDtype\[B\] is deprecated:FutureWarningc                X   TpV\         P                  J g   \        V4      ^ 8X  d   ^ MVP                  ^ ,          pV\         P                  J d   VP                  P
                  R8X  d   R# V\         P                  J dc   \        VP                  \        4      '       dC   Rp\        P                  ! \        VR7      ;_uu_ 4        V! V4      RV.3,          pRRR4       MH\        V4      ^ 8w  d9   V! V4      RV.3,          pV! V4      V.,          p\         P                  ! Wg4       V\         P                  J d   ^ MVP                  pVP                  4       p	V! V	4      RV.3,          pV! V	4      RV.3,          p\         P                  ! Wg4       R#   + '       g   i     L~; i)rn   rR  Nz2MultiIndex does not support indexing with Ellipsisr   .r$   )r&   r   rh   r	   r%   inferred_typer   r   r   r   NotImplementedErrorr;   r7   rI  r'   )
rJ   rJ  r  rY   r`   r   r<   r.   key2r-   s
   &&&       r/   &test_loc_iloc_getitem_leading_ellipses:TestLocWithEllipsis.test_loc_iloc_getitem_leading_ellipses  s;   &rww&#c(a-aciilbff!8!8I!E bffCIIz!B!BFC2#>> cC5j1 ?> X]S\#u*-Fs|SE*H""64rww&qCHH\\^S4&[)2;q4&y)
f/ ?>s   FF)	c                   V\         P                  J g   \        V4      ^ 8X  d   ^ MVP                  ^ ,          p\        P
                  ! \        \        R7      ;_uu_ 4        V! V4      R,           RRR4       \        P
                  ! \        \        R7      ;_uu_ 4        V! V4      RV.R3,           RRR4       \        P
                  ! \        \        R7      ;_uu_ 4        V! V4      RRV3,           RRR4       \        P
                  ! \        RR7      ;_uu_ 4        V! V4      VRR3,           RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lw; i  + '       g   i     R# ; i)rn   r   .NToo many indexers)..)r&   r   rh   r	   r   r   r
   r   )rJ   rY   r  r`   s   &&& r/   0test_loc_iloc_getitem_ellipses_only_one_ellipsisDTestLocWithEllipsis.test_loc_iloc_getitem_ellipses_only_one_ellipsis  s    rww&#c(a-aciil]]=0EFFCL" G ]]=0EFFCLseS) G ]]=0EFFCLc3' G
 ]]=0CDDCLc3' ED GF GF GF
 EDDs0   "E"E&E(%E;E	E%	(E8	;F	r   N)r   r   r   r   r   r=  r  rY   rM  r   filterwarningsrT  rX  r   r   r   s   @r/   rD  rD    sg     ^^  ^^ % [[ VW0 X00( (r1   rD  c                     a  ] tR tRt o ]P
                  P                  RRR.. RO. RO.3RR.. RO. RO.3RR.^^.3. RO. RO.3RR.^^.3. RO. R O.3RR.^^.3. RO. R O.3RR.^^.3. RO. RO.3RR.^^.3. R!O. R"O.3.4      ]P
                  P                  RRR.4      R	 4       4       tR
 tR t	R t
R tR tR tR tR tR tR t]P
                  P                  R]P&                  ]P*                  R]P,                  34      R 4       tR t]P
                  P                  R^^
.4      R 4       tR tR tRtV tR# )#TestLocWithMultiIndexi  zkeys, expectedr    r!   r]   dimr	   rC   c                   V. RO. RO./p\        \        P                  ! ^4      P                  ^^4      3/ VB p\        P
                  ! V4      pVR8X  d9   VP                  VR3,          p\        P                  ! VP                  V4       R# VR8X  d9   VP                  RV3,          p\        P                  ! VP                  V4       R# R# )r]   r	   r$   rC   N)r]   r!   r!   r    r    )ro   ro   rF   ro   rF   )r   rH   r   reshaper   r   r%   r&   assert_index_equalr	   rC   )rJ   r]  keysr.   kwargsr-   	exp_indexr   s   &&&&    r/   'test_loc_getitem_multilevel_index_order=TestLocWithMultiIndex.test_loc_getitem_multilevel_index_order  s      1?CDryy},,Q2=f=**84	'>&&q/C!!#))Y7I&&D/C!!#++y9 r1   c                ~   TpVP                   R ,          pVR,          P                   R ,          pVP                  P                  VP                  P                  R,          8X  g   Q hVP                  P                  VP                  P                  R,          8X  g   Q hVP                   R,          pVR,          P                   R,          pVP                  P                  VP                  P                  ^,          8X  g   Q hVP                  P                  VP                  P                  ^,          8X  g   Q hR# )  r#   r  N)rg  rF   )r%   r	   r  r7   )rJ   /multiindex_year_month_day_dataframe_random_dataymdr<   result2s   &&   r/   test_loc_preserve_names-TestLocWithMultiIndex.test_loc_preserve_names  s    =c(,,t$||!!SYY__R%8888}}""ciioob&9999!c(,,w'||  CIIOOA$6666}}!!SYY__Q%7777r1   c                .   \         P                  ! ^ .^^..4      p\        ^ VR7      pVP                  . ,          pVR,          p\        P
                  ! W44       VP                  VP                  R,          ,          p\        P
                  ! WT4       R# )rn   r   r-  :rn   rn   NN)r   from_productr   r%   r&   r;   r   )rJ   r  r  r   r.   res2s   &     r/   .test_loc_getitem_multiindex_nonunique_len_zeroDTestLocWithMultiIndex.test_loc_getitem_multiindex_nonunique_len_zero  sp    $$qcAq6]3Qb!ggbkr7
s-wwsxx}%
t.r1   c                   \        R .\        P                  ! R.R..4      4      pVP                  R,          pVe   Q h\        P                  ! R.RR..4      p\        R .\        V4      ,          \        VR7      pVP                  R,          pVe   Q h\        ^.\        V4      ,          \        VR7      pVP                  R,          pV^8X  g   Q hR # )NLevel1Level2Level2_aLevel2_br  )rs  rt  )rs  ru  )r   r   r   r%   rn  rh   rG   )rJ   r  r<   midxs   &   r/   0test_loc_getitem_access_none_value_in_multiindexFTestLocWithMultiIndex.test_loc_getitem_access_none_value_in_multiindex
  s     dVZ33hZ(4LMN-.~~&&
Z4L'MNdVc$i'vTB/0~~aS3t9_F$?/0{{r1   c                    \         P                  ! \        . RO. RO4      RR.R7      p\        . ROVR7      p^dVP                  R	R
% \        . ROVR7      p\
        P                  ! W#4       R# )r   firstsecondr  r   N)r   r   r  r  r   r   r  r  )r$  twor$  r}  r$  r}  r$  r}  )ro   ro   ro   ro   ro   ro   ro   ro   )r  r$  )r   r}  )ro   ro   r  r  r  r  ro   ro   )r   r  r?  r   r%   r&   r;   )rJ   r	   r<   r.   s   &   r/   !test_loc_setitem_multiindex_slice7TestLocWithMultiIndex.test_loc_setitem_multiindex_slice  sf     &&HH H%
 0>69

>N3:%H
v0r1   c                    \        R RRR7      p\        \        R4      V4      pVP                  \	        R^^4      \	        R^^4       p\
        P                  ! W24       R# )rd  10minr  rp  re   il  i4  N)r   r   rT   r%   r   r&   r;   )rJ   timesr  r<   s   &   r/   7test_loc_getitem_slice_datetime_objs_with_datetimeindexMTestLocWithMultiIndex.test_loc_getitem_slice_datetime_objs_with_datetimeindex-  sP    <gvFU6]E*$1-q!0DE
v+r1   c           	         \        R \        ^
4      R\        ^
4      /\        RRRR7      R7      pVP                  RR.R R.3,          p\        R ^ ^.R^ ^./\	        RR.4      P                  R4      R7      p\        P                  ! W#4       R# )	r!   r    z
2010-01-01z
2010-01-10r  r  r   z
2010-01-05N)r   rT   r   r%   r   r  r&   r'   r   s   &   r/   3test_loc_getitem_datetime_string_with_datetimeindexITestLocWithMultiIndex.test_loc_getitem_datetime_string_with_datetimeindex3  s    %)S%),\<dC
 |4sCj@A1a&#1v&| <=EEdK
 	f/r1   c           	     L   \         P                  ! . RORR.R7      p\        R^.R^.R^.R^.R^.R	^..VR
R.R7      pVP                  ^ R7      p\        R^.R^.R^..R
R.VP	                  . RO4      R7      pVP
                  R,          p\        P                  ! WC4       R# )r   r#   r   r  r3   r4   r8   r9         @      @r   r^  r1  )levelr   Nr   r   )r  r  bahbamr  r  r  )rn   ro   r   )r   r  r   r  r   r%   r&   r'   )rJ   r  r-   r.   r<   s   &    r/   3test_loc_getitem_sorted_index_level_with_duplicatesITestLocWithMultiIndex.test_loc_getitem_sorted_index_level_with_duplicates@  s    ## *

 aaaaaa #J
 ]]]#1XQx#q*S#JbggiFX
 '
f/r1   c                    \        . RORR7      p^ VP                  ^&   \        . RORR7      p\        P                  ! W4       R# )r!   categoryrQ   rG   Nr  )r!   r    r]   rn   r  rJ   r<   r.   s   &  r/   1test_additional_element_to_categorical_series_locGTestLocWithMultiIndex.test_additional_element_to_categorical_series_locb  s6    z:

1,H=
v0r1   c                    \        . RORR7      pR VP                  ^&   \        . RORR7      p\        P                  ! W4       R# )r!   r  rQ   Nr  r!   r    r]   r!   r  r  s   &  r/   'test_additional_categorical_element_loc=TestLocWithMultiIndex.test_additional_categorical_element_loci  s6    z:

1.jA
v0r1   c           
        \        . RO\        \        . ROVR7      4      R7      p\        P                  VP
                  ^&   \        ^^^\        P                  .\        \        . ROVR7      4      R7      p\        P                  ! W#4       \        P                  VP
                  ^&   \        ^\        P                  ^\        P                  .\        \        . ROVR7      4      R7      p\        P                  ! W#4       R# )ro   rQ   Nr   )r   r   r   rH   r   r%   r&   r;   )rJ   any_numeric_ea_dtypesrsr.   s   &&  r/   &test_loc_set_nan_in_categorical_series<TestLocWithMultiIndex.test_loc_set_nan_in_categorical_seriesp  s    "5:N#OP

 VV
1bff"5:N#OP
 	s-VV
266""5:N#OP
 	s-r1   naNc                    \        . RORR7      pWP                  ^&   \        . RORR7      pWP                  ^&   \        P                  ! W#4       \        R RRV.RR7      p\        P                  ! W$4       R# )r!   r    r]   r  rQ   Nr  r  r  )rJ   r  srs_enlargesrs_setintor.   s   &&   r/   ,test_loc_consistency_series_enlarge_set_intoBTestLocWithMultiIndex.test_loc_consistency_series_enlarge_set_into  sf     _J?1D
{83S"-Z@
{5r1   c           
        \        \        P                  ! ^^^4      \        \	        RR.4      \        ^
4      .^ .^,          ^.^,          ,           \        ^
4      .RR.R7      R7      p\	        RR.RR.RRRR	7      pVP                  P                  ^ ,          p\        P                  ! W24       VP                  R.,          P                  P                  ^ ,          p\        P                  ! W24       R
# )rF   r!   r    Index1Index2)r  codesr  )r   r	   Fr  )r  orderedr7   r6   N)r   rH   r   r   r   rT   r	   r  r&   r`  r%   r   s   &   r/   5test_loc_getitem_preserves_index_level_category_dtypeKTestLocWithMultiIndex.test_loc_getitem_preserves_index_level_category_dtype  s    1b!$(#s4eBi@sQw!q(%)4*
 $#JSz
 #
f/$$++A.
f/r1   lt_valuec                *   \        R . RO/\        R4      . R	O.R7      p\        P                  ! \        RR7      ;_uu_ 4        VP
                  VR ,          V8  R3,          P
                  R.R3,           RRR4       R#   + '       g   i     R# ; i)
r!   aabbr   z\['b'\] not in indexr   r$   r    N)r9     "   -   rn   ro   rF   rO   )r   rU   r   r   rV   r%   )rJ   r  r-   s   && r/   >test_loc_multiindex_levels_contain_values_not_in_index_anymoreTTestLocWithMultiIndex.test_loc_multiindex_levels_contain_values_not_in_index_anymore  sl     -.tF|\6RS]]8+BCCFF2c7X%q()--seQh7 DCCCs   4BB	c                N   \         P                  ! \         P                  \         P                  .4      pR R.p\        P                  ! W.4      p\        ^ ^.VR7      pVP                  R,          p\        ^ .\         P                  .R7      p\        P                  ! WV4       R# )r   r  r   N)r$   r   )	rH   r   r   r   r   r   r%   r&   r;   )rJ   lev1lev2r  r  r<   r.   s   &      r/   'test_loc_multiindex_null_slice_na_level=TestLocWithMultiIndex.test_loc_multiindex_null_slice_na_level  sz    xx()u~##TL1aV2&" 1#bffX.
v0r1   c                @   \         P                  ! \        R 4      \        R4      ^^... ROR7      p\        \	        ^4      VR7      pVP
                  R,          pVP                  P                  ^ 4      R,          p\        P                  ! VP                  V4       R# )abxyr  r   :Nr   NN)r  r  num)r!   r$   r$   )
r   rn  rU   r   rT   r%   r	   	droplevelr&   r`  )rJ   r  r  
loc_resultr.   s   &    r/   test_loc_drops_level*TestLocWithMultiIndex.test_loc_drops_level  s|     $$$ZdaV,4G
 U1XR(WWY'
99&&q)"-
j..9r1   r   )r    r    r!   r!   )ro   rF   ro   rF   )r!   r!   r    r    )rF   ro   rF   ro   )r]   r!   r!   )ro   rF   ro   )r   r   r   r   r   r   r   rd  rk  rp  rx  r~  r  r  r  r  r  r  rH   r   r   NAr   r  r  r  r  r  r   r   r   s   @r/   r\  r\    s    [[3Z.=>3Z.=>Cj1a&!$8,#GHCj1a&!$8,#GHCj1a&!$8,#GHCj1a&!$8,#GHCj1a&!OY#?@	
 [[UWi$89: ::8/"1$,0 0D11.* [[TBFFBEE4#@A
6 B
602 [[Z"b28 38
1
: 
:r1   r\  c                   r  a  ] tR tRt o ]P
                  ! R4      R 4       tR tR tR t	R t
R t]P                  P                  R	R
 R R R .. ROR7      R 4       tR tR tR tR t]P                  P)                  R4      ]P                  P                  RRR.4      R 4       4       tR tR tRtV tR# )TestLocSetitemWithExpansioni  pyarrowc                   \        \        ^ 4      P                  4       .RR7      p\        R\	        ^4      /VR7      p\        R4      P                  4       p^VP
                  V&   \        V^ ,          V.VP                  R7      p\        P                  ! VP                  V4       VR,          P                  RR p^VP
                  V&   \        P                  ! VP                  V4       R# )rn   zdate32[pyarrow]rQ   r#   r   z
1970-01-02Nr<  )r   r   r   r   rT   r%   r6   r&   r`  r	   r   )rJ   r  r-   itemrc  r  s   &     r/   2test_loc_setitem_with_expansion_preserves_ea_dtypeNTestLocSetitemWithExpansion.test_loc_setitem_with_expansion_preserves_ea_dtype  s     Yq\&&()1BCU1Xc2&++-t3q64.		:	
bhh	2gll3B
cii3r1   c                X   ^2pVP                  4       ;_uu_ 4        VP                  \        RV4       \        R\	        V4      /RR7      pW#P
                  V&   RRR4       \        R\	        V^,           4      /RR7      p\        P                  ! XV4       R#   + '       g   i     LH; i)2   _SIZE_CUTOFFr   r   rQ   N)contextsetattrlibindexr   rT   r%   r&   r'   )rJ   monkeypatchsize_cutoffr<   r.   s   &&   r/   /test_loc_setitem_with_expansion_large_dataframeKTestLocSetitemWithExpansion.test_loc_setitem_with_expansion_large_dataframe  s      "".+FU;%78HF&1JJ{# # c5q#9:'J
fh/ #"s   >BB)	c           
        \        \        R 7      p^VP                  ^&   \        P                  ! V\        ^.\        ^^4      R7      4       ^VP                  ^&   \        P                  ! V\        ^^.^^.R7      4       R# )rQ   r   Nr   rG   r%   r&   r;   rT   rJ   r  s   & r/   test_loc_setitem_empty_series9TestLocSetitemWithExpansion.test_loc_setitem_empty_series  sf     6"

sFA3eAqk$BC

sFAq6!Q$@Ar1   c           
        \        \        R 7      pRVP                  ^&   \        P                  ! V\        R.\        ^^4      R7      4       RVP                  ^&   \        P                  ! V\        RR.^^.R7      4       R# )rQ   r3   r   r8   Nr  r  s   & r/   #test_loc_setitem_empty_series_float?TestLocSetitemWithExpansion.test_loc_setitem_empty_series_float  sf     6"

sFC5a$DE

sFC:aV$DEr1   c           
        \        \        R 7      p^VP                  R&   \        P                  ! V\        ^.\        R.4      R7      4       ^VP                  R&   \        P                  ! V\        ^^.\        RR.4      R7      4       ^VP                  ^&   \        P                  ! V\        . RO\        . RO4      R7      4       R# )rQ   r   r   r   N)ro   rO   r   )r   r   rO   )r   rG   r%   r&   r;   r   r  s   & r/   %test_loc_setitem_empty_series_str_idxATestLocSetitemWithExpansion.test_loc_setitem_empty_series_str_idx  s     6"
sFA3eUGn$EF
sFAq6u~9N$OP

sF9EBS<T$UVr1   c                D   \        R ^^\        R4      R7      p\        ^4       Uu. uF  q!\        VR,          R7      ,           NK  	  pp\	        ^ .V^ ,          .R7      pV F  p^VP
                  V&   K  	  \	        ^VR7      p\        P                  ! WF4       R# u upi )r   
US/Pacific)tzinfor  )secondsr   N)r   r   rT   r   r   r%   r&   r;   )rJ   baser  idxsr<   tsr.   s   &      r/   %test_loc_setitem_incremental_with_dstATestLocSetitemWithExpansion.test_loc_setitem_incremental_with_dst  s    b!E,,?@;@9E9ayS1119EDG9-BFJJrN !4(
v0 Fs   "Bconvc                    V # r   r   rO  s   &r/   rP  $TestLocSetitemWithExpansion.<lambda>  s    ar1   c                "    V P                  4       # r   )to_datetime64rO  s   &r/   rP  r        aoo'r1   c                "    V P                  4       # r   )to_pydatetimerO  s   &r/   rP  r    r  r1   c                .    \         P                  ! V 4      # r   )rH   r  rO  s   &r/   rP  r    s    bmmA&r1   )idsc           	     T   \        R 4      p\        R4      p\        4       p^dVP                  V! V4      R3&   ^VP                  V! V4      R3&   \        RRR./\        V! V4      V! V4      .V'       d   RM\        R7      \        R.4      R7      p\
        P                  ! WV4       R# )z20130101 09:00:00z20130101 10:00:00r$  g      Y@g      i@NrQ   r1  )r   r   r%   r   rG   r&   r'   )rJ   r  rK   dt1dt2r-   r.   s   &&&    r/   #test_loc_setitem_datetime_keys_cast?TestLocSetitemWithExpansion.test_loc_setitem_datetime_keys_cast  s     +,+,[#&tCy% #&tCy% UEN#cDI&6Hdf 5'N
 	b+r1   c           
         \        R ^./4      p\        R.VR7      VP                  R&   \        R ^.R\        R.VR7      /4      p\        P                  ! W#4       R# )r#   r    )r  r   N)r$   r   r.  )rJ   r  r<   r.   s   &&  r/   1test_loc_setitem_categorical_column_retains_dtypeMTestLocSetitemWithExpansion.test_loc_setitem_categorical_column_retains_dtype+  sU    C!:&(#@

6cA3[#-PQR
f/r1   c                   \        R RR7      p\        RRR7      p\        RRR7      p\        WRRR7      pW49  g   Q h\        VR.R	7      p^VP                  VR3&   \        \        P
                  .\        V4      ,          ^.,           VP                  \        V.4      4      R.\        R
7      p\        P                  ! WV4       R# )z2017-10-29 00:00:00+0200zEurope/Madridr  z2017-10-29 03:00:00+0100z2016-10-10 03:00:00leftr  )	inclusiverp  rB  r1  r  N)r   r   r   r%   rH   r   rh   appendr   rG   r&   r'   )rJ   r  endr  r  r<   r.   s   &      r/   0test_loc_setitem_with_expansion_and_existing_dstLTestLocSetitemWithExpansion.test_loc_setitem_with_expansion_and_existing_dst2  s    4I2G,AvC@}}wi8"$

2w;VVHs3x2$&**]B401I	
 	f/r1   c                P   \        \        R R.4      R.R7      pRR.VR&   VP                  R4      P                  P	                  R4      Vn        WP                  R8H  ,          P                  R4      P                  P                  R4      pVP                  4       pW#P                  VP                  R8H  R3&   \        V^ ,          P                  R4      VP                  R,          .RR	7      p\        P                  ! VP
                  V4       VP                  VP                  R8H  R3,          \        R
4      P                  R4      ,           pW!P                  VP                  R8H  R3&   \        P                  ! VP                  VP                  R8H  R3,          V4       R# )z2015-03-30 20:12:32z2015-03-12 00:11:11r   r   newoldnew_colr  r  r   1sr&  N)ro   r   )r   r   r   r	   r   r   r  
tz_convertr   r%   r   r&   r;   r   r  )rJ   r-   vr   r.   s   &    r/   test_setitem_with_expansion7TestLocSetitemWithExpansion.test_setitem_with_expansionD  sP   35JKLH
 9,,v&,,88?zzU"#--f5;;FF|T ggi01u$f,-1Q4??51266)3DEFS
sxx2FF2::&./)D/2I2I#2NN./rzzU"F*+
rvvbjjE&96&ABAFr1   c                0   \        4       p^VP                  R&   ^VP                  R&   ^VP                  ^ \        P                  3&   VP                  p\        ^ ^\        P                  .\        P                  R7      p\        P                  ! W#4       R# )ro   rQ   Nr  )ro   ro   )	r   r%   rH   infrC   r   r   r&   r`  r   s   &   r/   0test_loc_setitem_with_expansion_inf_upcast_emptyLTestLocSetitemWithExpansion.test_loc_setitem_with_expansion_inf_upcast_emptyZ  sj    [ttq"&&y!Qrzz:
f/r1   z"ignore:indexing past lexsort depthr  TFc           	        \        V4      '       g   \        P                  ! R 4       VP                  ^4      p\        V4      p\        P
                  ! V4      P                  \        P                  4      p\        WAR7      pRpWa9  g   Q hVP                  \        V4      V4      p\        V\        4      '       d   VR,          ^ ,          V8X  g   Q hMVR,          V8X  g   Q h\        P
                  ! V^,           4      P                  \        P                  4      p\        WR7      p	VP                  4       p
V'       d
   V
R,          pW:P                  V^ 3&   \        P                   ! W4       VP                  4       ^ ,          pV'       d
   VR,          pW<P                  V&   V	^ ,          P                  \        P                  4      p	\        P"                  ! W4       VP                  4       p
V'       d
   V
R,          pW:P                  V^3&   \        ^ . \%        V4      O\        P&                  N^\        P&                  .V,          \)        V4      .,           /VR7      p	\        P                   ! W4       R# )zNot relevant for empty Indexr   kapowr$   Nr<  )rh   r   skiprepeatrH   r   r  r   r   insertr   r   r   r   r%   r&   r'   r;   rU   r   r:   )rJ   r	   r  Narrorigr`   rc  exp_datar.   r-   r  r  s   &&&          r/   /test_loc_setitem_with_expansion_nonunique_indexKTestLocSetitemWithExpansion.test_loc_setitem_with_expansion_nonunique_indexe  s    5zzKK67QJiil!!"((+*  LLUS1	eZ((R=#s***R=C'''99QU#**2::6X7 YY[a5DsAv
b+ iik!nq6DA;%%bhh/
s- YY[a5DsAv$$s)$RVV$a"&&Aq
)BC
 	b+r1   c                t   \        . ROVR7      p\        RV/4      p\        VP                  R7      pW$P                  VP                  R3&   \        P
                  ! WCRR7       \        VP                  R7      pVP                  VP                  VP                  R3&   \        P
                  ! WCRR7       R# )rn   rQ   r   r   Fr,  Nr  )r   r   r	   r%   r&   r'   r7  )rJ   r  r  r-   r<   s   &&   r/   6test_loc_setitem_with_expansion_preserves_nullable_intRTestLocSetitemWithExpansion.test_loc_setitem_with_expansion_preserves_nullable_int  s     \)=>}%*'*

288V#$
fEB*'*{{

288V#$
fEBr1   c                   \        R \        ^4      /4      p\        R^RR7      pW!P                  . ROR3&   VP	                  \        \        P                  \        P                  .VP                  R7      4      p\        R \        ^4      RV/4      pVP                  R,          VP                  8X  g   Q h\        P                  ! W4       R# )r#   
2016-01-01r  re   r  r   rQ   Nrm   )r   rT   r   r%   r   r   r   r   r6   r  r&   r'   )rJ   r-   rf  bexr.   s   &    r/   #test_loc_setitem_ea_not_full_column?TestLocSetitemWithExpansion.test_loc_setitem_ea_not_full_column  s    U1X'q\B!$y#~jj'7syyIJc58S#67s#syy000
b+r1   r   N)rJ   r  r  znp.datetime64)r   r   r   r   td
skip_if_nor  r  r  r  r  r  r   r   r   r  r  r  r  r  rZ  r  r  r$  r   r   r   s   @r/   r  r    s     ]]94 40BF
W1 [[''&		
 H  	,	,"00$G,	0 [[ DE[[Yu61, 7 F1,fC , ,r1   r  c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )TestLocCallablei  c           	     >   \        R . ROR\        R4      R. RO/4      pVP                  R ,          p\        P                  ! W!P                  VP
                  ^8  ,          4       VP                  R R3,          p\        P                  ! W!P                  VP                  R8H  R3,          4       VP                  R R	 3,          p\        P                  ! W!P                  VP
                  ^8  . RO3,          4       VP                  R
 R 3,          p\        P                  ! W!P                  VP
                  ^8  R3,          4       VP                  R R 3,          p\        P                  ! W!P                  VP
                  ^8  R R.3,          4       VP                  R R 3,          p\        P                  ! W!P                  VP
                  ^8H  R R.3,          4       VP                  R R 3,          pW!P                  R,          8X  g   Q hR# )r#   r   r  r   c                      V P                   ^8  # rF   r#   rO  s   &r/   rP  ATestLocCallable.test_frame_loc_getitem_callable.<locals>.<lambda>      qssQwr1   c                      V P                   R 8H  # )r    r   rO  s   &r/   rP  r.    s    qssczr1   r$   r    c                      V P                   ^8  # r,  r-  rO  s   &r/   rP  r.    r/  r1   c                      V P                   R 8H  # r1  r   rO  s   &r/   rP  r.    s    !))s2Br1   c                      V P                   ^8  # r,  r-  rO  s   &r/   rP  r.    r/  r1   c                     R # r1  r   rO  s   &r/   rP  r.    s    #r1   c                      V P                   ^8  # r,  r-  rO  s   &r/   rP  r.    r/  r1   c                 
    R R.# r#   r   r   rO  s   &r/   rP  r.    s    3*r1   c                      V P                   ^8H  # r,  r-  rO  s   &r/   rP  r.    s    qssaxr1   c                 
    R R.# r8  r   rO  s   &r/   rP  r.    s    C:r1   c                     ^# r  r   rO  s   &r/   rP  r.    s    qr1   c                     R # r-  r   rO  s   &r/   rP  r.    s    Cr1   Nro   rF   rO   r   )FTFr  )r   rU   r%   r&   r'   r#   r   r;   rJ   r-   r   s   &  r/   test_frame_loc_getitem_callable/TestLocCallable.test_frame_loc_getitem_callable  s   \3Vc<PQ ff&'
c66"$$(#34ff)1,-
c66"$$#+q.#9:ff&(BBC
c66"$$(4H*H#IJff&56
sFF244!8S=$9:ff&(<<=
c66"$$(S#J*>#?@ff')==>
c66"$$!)c3Z*?#@A ff[-/0ffVn$$$r1   c           	        \        R . ROR\        R4      R. RO/4      pVP                  R R R.3,          p\        P                  ! W!P                  VP
                  ^8  R R.3,          4       VP                  ^^.R 3,          p\        P                  ! W!P                  ^^.R R.3,          4       VP                  ^R 3,          p\        P                  ! W!P                  ^R R.3,          4       R# )	r#   r   r  r   c                      V P                   ^8  # r,  r-  rO  s   &r/   rP  ITestLocCallable.test_frame_loc_getitem_callable_mixture.<locals>.<lambda>  r/  r1   c                 
    R R.# r8  r   rO  s   &r/   rP  rC    s    Szr1   c                 
    R R.# r8  r   rO  s   &r/   rP  rC    s    3*r1   Nr=  )r   rU   r%   r&   r'   r#   r;   r>  s   &  r/   'test_frame_loc_getitem_callable_mixture7TestLocCallable.test_frame_loc_getitem_callable_mixture  s    \3Vc<PQff&c
23
c66"$$(S#J*>#?@ffaV112
c661a&3**<#=>ffQ,,-
sFF1sCj=$9:r1   c                l   \        R . ROR\        R4      /\        R4      R7      pVP                  R ,          p\        P                  ! W!P                  RR.,          4       VP                  R R	3,          p\        P                  ! W!P                  RR.R	3,          4       VP                  R
 R 3,          p\        P
                  ! W!P                  RR.R 3,          4       VP                  R R 3,          p\        P                  ! W!P                  RR.R .3,          4       VP                  RR.R 3,          p\        P
                  ! W!P                  RR.R 3,          4       VP                  RR.R 3,          p\        P                  ! W!P                  RR.R .3,          4       VP                  R R 3,          p\        P
                  ! W!P                  RR.R 3,          4       VP                  R R .3,          p\        P                  ! W!P                  RR.R .3,          4       R# )Xr6  r  r  r   c                 
    R R.# r#   r   r   rO  s   &r/   rP  HTestLocCallable.test_frame_loc_getitem_callable_labels.<locals>.<lambda>      Szr1   r#   r   c                 
    R R.# rK  r   rO  s   &r/   rP  rL    rM  r1   r$   c                 
    R R.# rK  r   rO  s   &r/   rP  rL    rM  r1   c                     R # rI  r   rO  s   &r/   rP  rL    s    Sr1   c                 
    R R.# rK  r   rO  s   &r/   rP  rL    rM  r1   c                     R .# rQ  r   rO  s   &r/   rP  rL    s    cUr1   c                     R # rQ  r   rO  s   &r/   rP  rL    s    3r1   c                     R .# rQ  r   rO  s   &r/   rP  rL    s    C5r1   c                 
    R R.# rK  r   rO  s   &r/   rP  rL    rM  r1   c                 
    R R.# rK  r   rO  s   &r/   rP  rL    rM  r1   Nr=  )r   rU   r%   r&   r'   r;   r>  s   &  r/   &test_frame_loc_getitem_callable_labels6TestLocCallable.test_frame_loc_getitem_callable_labels  s   \3V=T&\R ff)*
c663*#56ff)1,-
c663*a-#89ff)=89
sFFC:s?$;<ff)?:;
c663*se*;#<= ffc3Z./
sFFC:s?$;<ffc3Z01
c663*se*;#<=ff)3./
sFFC:s?$;<ff)C501
c663*se*;#<=r1   c           
        \        R . ROR\        \        R4      \        R7      /\        R4      R7      pVP	                  4       pRVP
                  R &   VP	                  4       pRVP
                  RR.&   \        P                  ! W#4       VP	                  4       p^VP
                  R	 R
3&   VP	                  4       p^VP
                  RR.R
3&   \        P                  ! W#4       VP	                  4       pRVP
                  R R 3&   VP	                  4       pRVP
                  RR.R 3&   \        P                  ! W#4       VP	                  4       p^^
.VP
                  R R 3&   VP	                  4       p^^
.VP
                  RR.R .3&   \        P                  ! W#4       VP	                  4       p\        P                  ! RR.4      VP
                  RR.R 3&   VP	                  4       p\        P                  ! RR.4      VP
                  RR.R 3&   \        P                  ! W#4       VP	                  4       p^
VP
                  RR.R 3&   VP	                  4       p^
VP
                  RR.R .3&   \        P                  ! W#4       VP	                  4       pRVP
                  R R 3&   VP	                  4       pRVP
                  RR.R 3&   \        P                  ! W#4       VP	                  4       pRVP
                  R R .3&   VP	                  4       pRVP
                  RR.R .3&   \        P                  ! W#4       R# )rI  r6  r  rQ   r  r   c                 
    R R.# rK  r   rO  s   &r/   rP  ATestLocCallable.test_frame_loc_setitem_callable.<locals>.<lambda>		      3*r1   r#   r   c                 
    R R.# rK  r   rO  s   &r/   rP  r\  	  r]  r1   r$   c                 
    R R.# rK  r   rO  s   &r/   rP  r\  	  r]  r1   c                     R # rQ  r   rO  s   &r/   rP  r\  	  s    r1   c                 
    R R.# rK  r   rO  s   &r/   rP  r\  	  r]  r1   c                     R .# rQ  r   rO  s   &r/   rP  r\  	  s    r1   c                     R # rQ  r   rO  s   &r/   rP  r\  "	  s    cr1   c                     R .# rQ  r   rO  s   &r/   rP  r\  (	  s    ser1   c                 
    R R.# rK  r   rO  s   &r/   rP  r\  .	  r]  r1   c                 
    R R.# rK  r   rO  s   &r/   rP  r\  4	  r]  r1   Nr=  ir<  r=  )
r   r   rU   rG   r   r%   r&   r'   rH   r   )rJ   r-   r   r   s   &   r/   test_frame_loc_setitem_callable/TestLocCallable.test_frame_loc_setitem_callable 	  s   ,VDL%GHv,
 ggi(+$%ggi!c

c'ggi+-$a'(ggi!#c
A
c'ggi79$m34ggi#%c
C 
c'ggi:;R$o56ggi&'Wc
SE!"
c' ggi-/XXr2h-?c
M)*ggi#%88RH#5c
C 
c'ggi/1c
O+,ggi%'c
SE!"
c'ggi-/$c)*ggi#%c
C 
c'ggi/1$se+,ggi%'c
SE!"
c'r1   r   N)
r   r   r   r   r?  rF  rX  rh  r   r   r   s   @r/   r)  r)    s     %8;><7( 7(r1   r)  c                      a  ] tR tRt o R tR tR tR t]P                  P                  RRR.4      R	 4       tR
tV tR# )TestPartialStringSlicingi:	  c                    \        R . R	OR. R
O/\        . RO4      R7      p\        R RR.R^^./\        RR.4      R7      pVP                  R,          p\        P                  ! W24       R# )r   r!   r]   r   
2020-08-01
2020-08-05r   z2020-08Nr  r   )rm  z
2020-07-02rn  )r   r   r%   r&   r'   r   s   &   r/   5test_loc_getitem_partial_string_slicing_datetimeindexNTestPartialStringSlicing.test_loc_getitem_partial_string_slicing_datetimeindex;	  sl    _fi8HI
 c3Z!Q0|\:;
 	"
f/r1   c                    \         P                  ! R RRR7      pVP                  4       pVP                  R,          pVP                  RR p\
        P                  ! W44       R# )
2017-01-01
2018-01-01r7  r  r  rp  :Nz2017-12NNr<  )r   period_range	to_seriesr%   r   r&   r;   )rJ   pir  r<   r.   s   &    r/   8test_loc_getitem_partial_string_slicing_with_periodindexQTestPartialStringSlicing.test_loc_getitem_partial_string_slicing_with_periodindexH	  sJ    __<\Llln$88CR=
v0r1   c                    \        R RRR7      pVP                  4       pVP                  R,          pVP                  RR p\        P
                  ! W44       R# )1 day2 days1hrt  :Nz1 daysNNr<  )r   rv  r%   r   r&   r;   )rJ   r  r  r<   r.   s   &    r/   ;test_loc_getitem_partial_string_slicing_with_timedeltaindexTTestPartialStringSlicing.test_loc_getitem_partial_string_slicing_with_timedeltaindexP	  sF    7tDlln#88CR=
v0r1   c                    \        R \        ^4      /\        \        ^4      RR7      R7      pVP                  ^ ,          pVP                  R,          p\
        P                  ! W24       R# )r   daysr  r   0 daysN)r   rT   r   r   r%   r&   r;   )rJ   r-   r.   sliceds   &   r/   #test_loc_getitem_str_timedeltaindex<TestPartialStringSlicing.test_loc_getitem_str_timedeltaindexX	  sJ    U1Xl58&.QR771:!
v0r1   indexer_endN2020-01-02 23:59:59.999999999c                   V! ^.^,          \        \        R4      \        R4      \        R4      \        R4      \        R4      .VR7      R7      pV! ^.^,          \        \        R4      \        R4      .VR7      R7      p\        RV4      pWF,          p\        P                  ! Wu4       VP
                  V,          p\        P                  ! Wu4       R# )	ro   z
2019-12-30z
2020-01-01z
2019-12-25r  z
2019-12-19r  r   N)r   r   r   r&   r   r%   )rJ   tz_aware_fixturer  rX   rY   r.   r  r<   s   &&&&    r/   /test_loc_getitem_partial_slice_non_monotonicityHTestPartialStringSlicing.test_loc_getitem_partial_slice_non_monotonicity_	  s    
 C!Gl+l+l+=>l+ $	
 #C!Gl+=> $	
 k2
)!
)r1   r   )r   r   r   r   ro  rx  r~  r  r   r   r   r  r   r   r   s   @r/   rk  rk  :	  sE     0111 [[]T3R,ST!* U!*r1   rk  c                   \  a  ] tR tRt o R tR t]P                  P                  R]	P                  ! RRRR7      ]! R	R
RR7      .4      R 4       tR tR t]P                  P                  R]P                   ! ^ R4      R]! ^ ^4      .]P                   ! ^R4      ]P                   ! ^R4      ]! ^^4      .R]P                   ! ^R4      ]! ^ ^4      ..4      R 4       t]P                  P                  RRR.4      R 4       t]P                  P                  R^R.4      R 4       tR tRtV tR# )TestLabelSlicingi	  c                J   \        \        P                  ! R RR7      R	 Uu. uF  p\        R^V^
^ 4      NK  	  upR7      p\        \        P                  ! RRR7      R
 Uu. uF  p\        R^V^
^ 4      NK  	  upR7      pW#3 EF  pVP                  \        R^^^
4      R p\
        P                  ! WT4       VP                  R\        R^^^
4       p\
        P                  ! WT4       VP                  \        R^^^
4      \        R^^^
4       p\
        P                  ! WT4       VP                  \        R^^^4      R pVP                  R,          p\
        P                  ! WV4       VP                  R,          p\
        P                  ! WV4       EK  	  R# u upi u upi )r9   r   rQ   i  r   r  Nr  :z20010101 11NNr=  )ro   rF   rF   rO   r   )r   rH   r   r   r%   r&   r'   r   )rJ   r  	df_uniquedf_dupsr-   r<   r.   s   &      r/   (test_loc_getitem_slicing_datetimes_frame9TestLabelSlicing.test_loc_getitem_slicing_datetimes_frame	  sj    IIc+9EFA8D!QB/F
	 IIc+9HIA8D!QB/I

 &BVVHT1a467F!!&-VV6htQ267F!!&-VVHT1a4xaB7OPF!!&-VVHT1a467Fwwr{H!!&3VVN+F!!&3 ' G Js   F
!F 
c                   \        R R^RR7      p\        . R
OVR7      p\        RRR7      p\        RRR7      pVP                  W4 p\        ^^.VR,          R7      p\        P
                  ! WV4       W#,          p^pWV8X  g   Q hR	# )z2017-10-29 01:30:00zEurope/Berlinz30 min)r  re   rp  r   z2017-10-29 02:30:00+02:00r  z2017-10-29 02:00:00+01:00r  N)rn   ro   rF   rO   r   )r   r   r   r%   r&   r;   )rJ   r  series2t_1t_2r<   r.   s   &      r/   'test_loc_getitem_label_slice_across_dst8TestLabelSlicing.test_loc_getitem_label_slice_across_dst	  s    !oqx
 43H3HS%1a&C1
v0!!!r1   r	   rr  rs  r7  rt  r{  r|  r}  c                    VP                  4       pVP                  R VR,           pVP                  R R p\        P                  ! W44       R # )Nr=  r<  )rv  r%   r   r&   r;   )rJ   r	   r  r<   r.   s   &&   r/   -test_loc_getitem_label_slice_period_timedelta>TestLabelSlicing.test_loc_getitem_label_slice_period_timedelta	  sA     oo59%88CR=
v0r1   c                ^   . ROp\        \        P                  P                  ^4      P                  R4      VR7      pVP                  R,          p\        V4      ^8X  g   Q hVP                  R,          p\        V4      ^8X  g   Q hVP                  R,          p\        V4      ^8X  g   Q hR# )x"p|@r   :g3333c|@g    |@N:g3333c|@g3333|@N:g3333c|@g|@NN)r  g\Va|@g|@rO   rF   )r   rH   r   r   r%   rh   )rJ   r	   r-   s1s   &   r/   %test_loc_getitem_slice_floats_inexact6TestLabelSlicing.test_loc_getitem_slice_floats_inexact	  s    :ryy,,Q/66v>eLVVO$2w!||VVO$2w!||VVO$2w!||r1   c           	     
   Tp\        \        P                  P                  ^4      P                  ^
4      \        P                  ! ^
^VR7      R7      p\        VP                  R,          4      ^8X  g   Q h\        VP                  R,          4      ^8X  g   Q h\        P                  ! ^
^VR7      pRV^&   WCn        \        VP                  R,          4      ^8X  g   Q h\        VP                  R,          4      ^8X  g   Q hR# )rF   rQ   r   :g      (@NN:g      )@NNgffffff(@N)r   rH   r   r   r   rh   r%   r	   )rJ   r  r6   r  r  s   &&   r/   'test_loc_getitem_float_slice_floatindex8TestLabelSlicing.test_loc_getitem_float_slice_floatindex	  s    !II!!!$++B/ryyRu7U
 3775>"a'''3775>"a'''iiBe,A	3775>"a'''3775>"a'''r1   zstart,stop, expected_slicer  Nr^  c                    \        \        ^4      \        RR4      4      pVP                  \	        W4      ,          pVP
                  V,          p\        P                  ! WV4       R# )r)  r  z10 daysN)r   rT   r   r%   r   r   r&   r;   )rJ   r  stopexpected_slicer  r<   r.   s   &&&&   r/   $test_loc_getitem_slice_label_td64obj5TestLabelSlicing.test_loc_getitem_slice_label_td64obj	  sJ     U2Y) DEu+,88N+
v0r1   r  20182020c                    V! . R	O\        R4      \        R4      \        R4      .R7      p\        P                  ! \        RR7      ;_uu_ 4        VP                  VR  RRR4       R#   + '       g   i     R# ; i)
ro   201620192017r   z,Value based partial slicing on non-monotonicr   r   Nr   )r   r   r   rV   r%   )rJ   rX   r  rY   s   &&& r/   )test_loc_getitem_slice_unordered_dt_index:TestLabelSlicing.test_loc_getitem_slice_unordered_dt_index	  sf    V$i&769JK
 ]]J
 
 GGE&!
 
 
 
s   A))A:	rB  r  c                    V! \        ^4      VR^R.R7      pVP                  VR pV! \        ^4      VR^R.R7      p\        P                  ! WE4       R# )r   r{  thirdr   N)rT   r%   r&   r   )rJ   rX   rB  rY   r<   r.   s   &&&   r/   1test_loc_getitem_slice_labels_int_in_object_indexBTestLabelSlicing.test_loc_getitem_slice_labels_int_in_object_index	  sR     eAhugq'.JKw'"58E7Aw3OP
)r1   c           	         \        R ^^^^^/^ .R7      p\        ^^..^ .\        ^^.\        R7      R7      p\        P                  ! VP
                  R,          V4       R# )testr   rQ   )r   r	   rC   Nr  )r   r   rG   r&   r'   r%   r   s   &  r/   *test_loc_getitem_slice_columns_mixed_dtype;TestLabelSlicing.test_loc_getitem_slice_columns_mixed_dtype	  s[    1aA.qc:a&!eQF&.I
 	bffUmX6r1   r   )r   r   r   r   r  r  r   r   r   r   ru  r   r  r  r  rH   r  r   r  r  r  r  r   r   r   s   @r/   r  r  	  sD    4:"" [[OO,LsK'xdC	
11( [[$^^At$dE!RL9^^As#R^^As%;U1a[I2>>!S)5A;7	
11 [[Wvv&67" 8" [[Wq#h/* 0*7 7r1   r  c                      a  ] tR tRt o ]P
                  P                  RRR.4      R 4       t]P
                  P                  RRR.4      R 4       tR t	Rt
V tR	# )
TestLocBooleanLabelsAndSlicesi
  
bool_valueTFc                    V R 2pVP                   R8w  dM   V! VRR7      p\        P                  ! \        VR7      ;_uu_ 4        VP                  V,           RRR4       R# R#   + '       g   i     R# ; i)z7: boolean label can not be used without a boolean indexrR  rG   r  r   N)rQ  r   r   rV   r%   )rJ   r	   rX   r  messagerY   s   &&&&  r/   'test_loc_bool_incompatible_index_raisesETestLocBooleanLabelsAndSlices.test_loc_bool_incompatible_index_raises	
  s_    
  L WX)+!X>Cxw77
# 87 ,777s   A%%A6	c                Z    V! \        R R.RR7      RR7      pVP                  V,           R# )TFrR  rQ   rG   r  N)r   r%   )rJ   rX   r  rY   s   &&& r/   test_loc_bool_should_not_raise<TestLocBooleanLabelsAndSlices.test_loc_bool_should_not_raise
  s-    uY7x
 	
r1   c                    R pV! VRR7      p\         P                  ! \        VR7      ;_uu_ 4        VP                  R,           RRR4       R#   + '       g   i     R# ; i)zEslice\(True, False, None\): boolean values can not be used in a slicerG   r  r   :TFNN)r   r   r   r%   )rJ   r	   rX   r  rY   s   &&&  r/   test_loc_bool_slice_raises8TestLocBooleanLabelsAndSlices.test_loc_bool_slice_raises
  sG     U 	 E:]]9G44GGJ 5444s   AA 	r   N)r   r   r   r   r   r   r   r  r  r  r   r   r   s   @r/   r  r  
  s_     [[\D%=9$ :$ [[\D%=9 :   r1   r  c                      a  ] tR tRt o 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V tR# )TestLocBooleanMaski%
  c           	        \        R \        ^
4      /4      p\        \        ^
4      RR7      Vn        VR ,          ^8  VR ,          ^8H  VR ,          ^8  .p. RO. RO. RO.p\	        W#4       F`  w  rEVP                  4       p^
VP                  VR 3&   \        V\        \        ^
4      RR7      R .RR7      p\        P                  ! Wv4       Kb  	  R# )	r   r&  r  r   r  N)
rn   ro   rF   rO   r   r   r   r   r   r   )
rn   ro   rF   r   r   r   r   r   r   r5  )
r   r   r   rO   r   r   r   r   r   r5  )	r   rT   r   r	   r?  r   r%   r&   r'   )rJ   r-   
conditionsexpected_datacondr   r<   r.   s   &       r/   )test_loc_setitem_bool_mask_timedeltaindex<TestLocBooleanMask.test_loc_setitem_bool_mask_timedeltaindex&
  s    U2Y'(b	4gk2c7a<C1=
0+-

 j8JDWWYF$&FJJtSy! "5937	H !!(3 9r1   r  Nr  c                   \         P                  ! . RO4      p\        R^VR7      p\        R\         P                  ! ^4      /VR7      P                  R4      pVP                  4       pVP                  VR3,          VP                  VR3&   \        P                  ! WT4       VP                  4       pVP                  V,          VP                  V&   \        P                  ! WT4       R# )	T20010101r"  r!   r   r   r$   Nr   )
rH   r   r   r   r   r  r   r%   r&   r'   )rJ   r  r   r  r-   r<   s   &&    r/   +test_loc_setitem_mask_with_datetimeindex_tz>TestLocBooleanMask.test_loc_setitem_mask_with_datetimeindex_tz<
  s     xx23Q26RYYq\*#6==iH ffT1Wo

47
f)66$<

4
f)r1   c           
        \        \        P                  ! R 4      P                  ^^4      \	        R4      \        R^RR7      R7      pVP                  4       pVP                  ^ ,          \        P                  \        P                  .VR&   VP                  ^8  pVP                  V,          P                  VP                  VR3&   \        P                  ! W4       R# )r  ABrm  r}  )re   rp  r   r   N)r   rH   r   r_  rU   r   r   r	   r   r   r#   r%   r&   r'   )rJ   r-   r.   r   s   &   r/   2test_loc_setitem_mask_and_label_with_datetimeindexETestLocBooleanMask.test_loc_setitem_mask_and_label_with_datetimeindexM
  s     IIcN""1a(JZ>

 779!*BFFBFF;ttaxFF4L..tSy
b+r1   c                   \        ^ 4      p\        R4      p\        R\        W.4      /4      pVP                  4       p\        V.4      pVR,          P                  ^,          P
                  pWSP                  RR.&   VR,          P                  ^,          P
                  pWg8X  g   Q h\        P                  ! W44       R# )rn   l   ,GsO1colTFN)	r   r   r   r   r   _valuer%   r&   r'   )rJ   td1td2r-   df_copyr  r.   r<   s   &       r/   'test_loc_setitem_mask_td64_series_value:TestLocBooleanMask.test_loc_setitem_mask_td64_series_value\
  s    l)*vsj123'')cUme9>>!$++ #e}E"))!!!
b*r1   c                "   VP                  4       pVR ,          ^ 8  p^ VP                  VR3&   VP                  P                  4       p^ WCP                  ^3&   \        WBP                  VP
                  R7      p\        P                  ! W4       R# )r#   r   r1  N)r   r%   r   r   r	   rC   r&   r'   )rJ   r  r.   r   r   s   &&   r/   #test_loc_setitem_boolean_and_column6TestLocBooleanMask.test_loc_setitem_boolean_and_columnk
  sw    ##%3!#%&c	"%%'!"{{A~V>>8CSCST
k4r1   c                   \        R . ROR. RO/4      p\        R . RO/. ROR7      VP                  . ROR .3&   \        R . R	OR. RO/4      p\        P                  ! W4       \        R . ROR. RO/4      p\	        . R
O. ROR7      VP                  . ROR .3&   \        P                  ! W4       \        R . ROR. RO/4      p\	        . R
O. ROR7      VP                  . ROR 3&   \        P                  ! W4       \        R . ROR. RO/4      pVP                  4       pVR ,          p\	        . R
O. ROR7      VP                  . RO&   \        P                  ! W4       R# )r!   r    r   Nr   r  r   )rF   ro   rn   )FFT)ro   rF   r   r8  )r   r%   r&   r'   r   r   )rJ   r-   r.   r  r  s   &    r/   )test_loc_setitem_ndframe_values_alignment<TestLocBooleanMask.test_loc_setitem_ndframe_values_alignmentv
  s&   YY78.7,y/
#cU*+ c:sI>?
b+ YY78.4\.S#cU*+
b+ YY78,2<y,Q#S()
b+YY78'')g(.|9(M$%
b*r1   c                   \        R . R. /\        R7      pVP                  4       pVR ,          P                  4       VP                  \        P
                  ! . \        P                  R7      R .3&   \        P                  ! W4       R# )r!   r    rQ   N	r   rG   r   r%   rH   r   bool_r&   r'   r   s   &  r/    test_loc_indexer_empty_broadcast3TestLocBooleanMask.test_loc_indexer_empty_broadcast
  s^    Rb)877968gllnrxx"((+cU23
b+r1   c                   \        R R.RR./\        R7      pVP                  4       pVR,          P                  4       VP                  \        P
                  ! R.\        P                  R7      R .3&   \        P                  ! W4       R# )r!   r   r    r|  rQ   FNr  r   s   &  r/   $test_loc_indexer_all_false_broadcast7TestLocBooleanMask.test_loc_indexer_all_false_broadcast
  sd    cUC#/v>779;=c7<<>rxxrxx03%78
b+r1   c                &   \        R R.RR./\        R7      p\        R R.RR./\        R7      pVR,          P                  4       VP                  \        P
                  ! R.\        P                  R7      R .3&   \        P                  ! W4       R# )r!   r   r    r|  rQ   TNr  r   s   &  r/   test_loc_indexer_length_one.TestLocBooleanMask.test_loc_indexer_length_one
  sr    cUC#/v>cC5#u5VD:<S',,.rxxbhh/#67
b+r1   r   )r   r   r   r   r  r   r   r   r  r  r  r  r  r  r  r  r   r   r   s   @r/   r  r  %
  s[     4, [[TD%=1* 2* ,+	5+4,,, ,r1   r  c                      a  ] tR tRt o ]P
                  P                  RR ]P                  ]	.4      R 4       t
R tR t]P
                  P                  RRR	.4      R
 4       tR tRtV tR# )TestLocListlikei
  r  c                    V # r   r   rO  s   &r/   rP  TestLocListlike.<lambda>
  s    qr1   c                   \        R R\        P                  .4      p\        \	        ^4      VR7      pVP
                  V! V4      ,          p\        P                  ! WC4       W1! V4      ,          p\        P                  ! WC4       VP                  4       P
                  V! V4      ,          p\        P                  ! WCP                  4       4       VRR pVR,          pRp\        P                  ! \        VR7      ;_uu_ 4        VP
                  V! V4      ,           RRR4       \        P                  ! \        VR7      ;_uu_ 4        WQ! V4      ,           RRR4       \        P                  ! \        VR7      ;_uu_ 4        VP                  4       P
                  V! V4      ,           RRR4       R#   + '       g   i     L; i  + '       g   i     Ly; i  + '       g   i     R# ; i)r#   r   r   Nr  r$  r   r<  )r   rH   r   r   rT   r%   r&   r;   rI  r'   r   r   rV   )rJ   r  cir  r<   ser2ci2r   s   &&      r/   8test_loc_getitem_list_of_labels_categoricalindex_with_naHTestLocListlike.test_loc_getitem_list_of_labels_categoricalindex_with_na
  sE    sC01U1XR(R!
v+SW
v+##CG,
flln53Bxf]]83//HHSX 0 ]]83//SN 0 ]]83//MMOC) 0/ 0/ 0/ 0//s$   F8G(G8G	G	G/	c           	        \         P                  ! . R	ORR7      p\        . R
O\        RR^R7      4      p\        P
                  ! \        RR7      ;_uu_ 4        VP                  V,           RRR4       R#   + '       g   i     R# ; i)
2001-01-04r  rQ   z
2001-01-01r^  r  r$  r   N)r  z
2001-01-02r  z
2001-01-14)rF   r   r   r)  )rH   r   r   r   r   r   rV   r%   )rJ   r`   r  s   &  r/   1test_loc_getitem_series_label_list_missing_valuesATestLocListlike.test_loc_getitem_series_label_list_missing_values
  sW    hhDL
 ]J|#q$QR]]8>::GGCL ;:::s   A77B	c                L   \        \        P                  ! R R.4      \        P                  ! RR.4      R7      p\        P                  ! \
        RR7      ;_uu_ 4        VP                  \        P                  ! R R.4      ,           RRR4       R#   + '       g   i     R# ; i)l   PF
AHl   UBeNl   P2$$nr	   r   r$  r   l   NZ4FGN)r   rH   r   r   r   rV   r%   r  s   & r/   9test_loc_getitem_series_label_list_missing_integer_valuesITestLocListlike.test_loc_getitem_series_label_list_missing_integer_values
  sp    ((,.?@A-/ABC
 ]]8>::GGBHH.0ABCD ;:::s   *BB#		to_periodTFc           	     :   \        R RRRR7      pV'       d   VP                  R4      p\        RR.VRR7      p\        R 4      \        R4      .pV'       d    V Uu. uF  qUP                  R4      NK  	  ppVP                  V,          p\        RR.VRR7      pV'       g!   VP
                  P                  R	4      Vn        \        P                  ! WgR
R7       \        R4      \        R4      \        R 4      .pV'       d    V Uu. uF  qUP                  R4      NK  	  pp\        . RO\        VRVP                  R7      RR7      pVP                  V,          p\        P                  ! WgR
R7       \        R4      \        R4      \        R4      .pV'       d    V Uu. uF  qUP                  R4      NK  	  pp\        P                  ! \        RR7      ;_uu_ 4        VP                  V,           R	R	R	4       R	# u upi u upi u upi   + '       g   i     R	# ; i)
2011-01-01z
2011-01-02r^  r  )rp  r7   皙?皙?r&  r   NT)r+  )r7   r6   
2011-01-03r$  r   )r  r  r  )r   r  r   r   r%   r	   rt  r&   r;   r   r6   r   r   rV   )rJ   r  r  r  ra  r   r<   r   s   &&      r/   .test_loc_getitem_listlike_of_datetimelike_keys>TestLocListlike.test_loc_getitem_listlike_of_datetimelike_keys
  s    |#EJ--$Cc3Zs5,'<)@A.23dKK$dD3c3Zs5		,,T2CI
vTB l#l#l#

 .23dKK$dD35E#KRU
 
vTB l#l#l#

 .23dKK$dD3]]8>::GGDM ;:9 4 4 4:::s   G:G?HH		H	c                    \        ^^.^^.^^... R
ORR.R7      pVP                  R,          pRVP                  n        VP                  \        RR.RR7      ,          p\        P                  ! W24       R	# )ro   cobraviper	max_speedshieldr1  :NrF   Nr   r   N)r  r  
sidewinder)r   r   r	   r7   r%   r   r&   r'   r   s   &   r/   test_loc_named_index$TestLocListlike.test_loc_named_index
  sp    VaVaV$2 (+

 772;#w0u=>
f/r1   r   N)r   r   r   r   r   r   r   rH   asarrayrU   r  r  r   r  r  r   r   r   s   @r/   r  r  
  ss     [[U["**d$CD* E*6E [[[4-8' 9'R
0 
0r1   r  z%columns, column_key, expected_columns  r  Allc                    \        \        P                  P                  ^4      P                  R4      V \	        R4      R7      pVP
                  RV3,          pVP                  . ROV3,          p\        P                  ! WTRR7       R# )	rF   r  r   r$   Tr  Nr2  r   )	r   rH   r   r   rU   r   r%   r&   r'   )rC   
column_keyexpected_columnsr-   r.   r<   s   &&&   r/   *test_loc_getitem_label_list_integer_labelsr    sl     

		a ''/U
B wwq**+HVVOZ/0F&dCr1   c                     \         P                  P                  ^4      P                  R4      p \	        V 4      p\         P
                  VP                  R&   \         P                  ! V \         P                  ! \         P
                  .^,          4      P                  ^^4      34      p\	        V. ROR7      p\        P                  ! W4       \	        V 4      p\         P
                  VP                  R&   \        P                  ! W4       R# )rF   r   N)r   r   )r$   r  )r  r3   r4   r8   r  )rH   r   r   r  r   r   r%   hstackr   r_  r&   r'   )	rand_datar<   r  r.   s       r/   test_loc_setitem_float_intindexr    s    		%%a(88@Iy!FFJJvIIy"((BFF8a<*@*H*HA*NOPM0IJH&+y!FFJJv&+r1   c                     R U Uu. uF  p R F  qV3NK  	  K  	  pp p\        \        P                  ! R4      \        R4      \        P
                  ! V4      R7      pVP                  ^R7      RR	 p\        \        P                  ! R
4      \        R4      \        P
                  ! . RO4      R7      p\        P                  ! WE4       R# u upp i )  
ABCDEFGHIJr1  r  N)r  r   )r   r   r5  r   )r   r   r  r5  r   r   r3  )r   )r  r   )r   r   r!  )	r   rH   r  r   r   r  r%   r&   r'   )yrr  r   r-   r<   r.   s         r/   test_loc_axis_1_slicer#  -  s    *BlMqGMGlDB	
L!&&t,
B
 VVV^I	2F
L!&&'TUH
 &+ Cs   Cc            
         \        R \        ^4      \        P                  ! \        ^4      \        ^4      .4      R7      p V P	                  4       pVP
                  ^ R.3,          VP
                  ^ R.3&   \        P                  ! W4       R# )r!   r1  Nrn   ro   )r   rT   r   rn  r   r%   r&   r'   )r.   r<   s     r/   !test_loc_set_dataframe_multiindexr&  >  sm    58Z%<%<eAha=Q%RH ]]_F$jjVH5FJJq6({&+r1   c                      \        \        ^4      \        ^R.\        R7      4      p V P                  ^,          pV^ 8X  g   Q hR# )rF   r4   rQ   N)r   rT   r   rG   r%   )r  r<   s     r/   test_loc_mixed_int_floatr(  H  s6    
q5!S8
9CWWQZFQ;;r1   c                      \        \        ^4      . ROR7      p \        P                  ! \        RR7      ;_uu_ 4        ^V P
                  R&   RRR4       R#   + '       g   i     R# ; i)r   r   $Slicing a positional slice with .locr   r1  Nr]  )r   rT   r   r   r   r%   )r  s    r/   %test_loc_with_positional_slice_raisesr+  P  sB    
q!5
6C	y(N	O	O 
P	O	O	Os   AA(	c                  J   \        R ^R7      p \        \        P                  P	                  ^4      P                  R4      V R7      pV^ ,          pRpW3 F  p\
        P                  ! \        VR7      ;_uu_ 4        VP                  R,           RRR4       \
        P                  ! \        RR7      ;_uu_ 4        ^VP                  R&   RRR4       K  	  \
        P                  ! \        VR7      ;_uu_ 4        VP                  R	,           RRR4       \
        P                  ! \        RR7      ;_uu_ 4        ^VP                  R	&   RRR4       R#   + '       g   i     L; i  + '       g   i     EK&  ; i  + '       g   i     Lv; i  + '       g   i     R# ; i)
r!  rd   r   zOcannot do slice indexing on DatetimeIndex with these indexers \[1\] of type intr   ro   rO   NNr*  r  )r-  ro   )	r   r   rH   r   r   r   r   r   r%   )dtir-   r  r   rY   s        r/   #test_loc_slice_disallows_positionalr/  X  s   
\1
-C	299((+226:#	FB
Q%C	& 
 y]]9C00GGCL 1 ]]9,RSSCGGCL TS	  
y	,	,
v 
- 
y(N	O	Ov 
P	O 10 TSS 
-	, 
P	O	Os0   <E<E)<E><FE&)E;>F	F"	c            
         \        \        P                  P                  ^4      P	                  R	4      . R
O\        RR^R7      R7      p V P                  . RO,          P                  4       p V P                  p\        P                  ! VP                  4      pRp\        P                  ! \        VR7      ;_uu_ 4        V P                  V,           RRR4       \        P                  ! \        VR7      ;_uu_ 4        V R,          P                  V,           RRR4       R#   + '       g   i     LY; i  + '       g   i     R# ; i)rF   r!   2012r  r  r   z/None of \[TimedeltaIndex.* are in the \[index\]r   Nr  r  )rn   rF   rF   rO   )r   rH   r   r   r  r   r   r   r	   r   TimedeltaIndexasi8r   r   rV   r%   )r-   r.  r  r   s       r/   'test_loc_datetimelike_mismatched_dtypesr4  t  s     

		a 008c15
B 
		#	#	%B
((C


CHH
%C
<C	xs	+	+
s 
, 
xs	+	+
3C 
,	+ 
,	+ 
,	+	+s   >D#>D6#D3	6E	c                     \         P                  ! R RRR7      p \        \        P                  P                  ^4      P                  R4      V R7      p\        P                  ! WP                  V ,          4       \        P                  ! WP                  \        V 4      ,          4       \        P                  ! WP                  \        V 4      ,          4       \        P                  ! VP                  R,          VP                  V R,          ,          4       \        P                  ! WP                  \        V 4      ,          4       R# )z2002-01z2003-12r7  ro  r   :rn   r   NN)r  r   )r   ru  r   rH   r   r   r  r&   r'   r%   rU   r   )r  r-   s     r/   "test_loc_with_period_index_indexerr6    s    
//)YS
9C	299((+;;HES	QB"ffSk*"ffT#Y/0"ffT#Y/0"''#,s3x(89"ffT#Y/0r1   c                  x   \         P                  P                  ^4      P                  R4      p \	        R^R7      p. ROp\        WVR7      p\         P                  VP                  VP                  ^,          R3&   \         P                  V ^,          R&   \        WVR7      p\        P                  ! WC4       R# )	rF   rm  rd   r1  r_  N)r   r   )r#   r   r   r^  EFr8  )rH   r   r   r  r   r   r   r%   r	   r&   r'   )r  r  r   r   r   s        r/   %test_loc_setitem_multiindex_timestampr:    s    99  #33F;D
Z
+C)D
DT
2C(*CGGCIIaL*$%66DGCL
DT
2C##r1   c                     . ROp RR	.p^ ^.p\         P                  ! WV.. R
OR7      p\        ^\        ^4      VR7      pVP                  RV ^ ,          V^ ,          V^ ,          33,          pVP
                  R,          p\        P                  ! WV4       VP                  V ^ ,          V^ ,          V^ ,          3. RO^R7      p\        P                  ! Wv4       VP
                  ^ ,          pVP
                  R,          p	VP                  V ^ ,          V^ ,          V^ ,          3. RO^ R7      p
\        P                  ! W4       VP                  V ^ ,          V^ ,          V^ ,          3,          pV^8X  g   Q hR# )r!   r  r1  r$   Nro   N)r  r  Nr  r%  )ro   rn   )r   r|  rB  )r$   r<  rm   )
r   rn  r   rT   r%   r   r&   r'   xsr;   )r  r  lev3r   r-   r<   r.   altr  	expected2alt2rj  s               r/   'test_loc_getitem_multiindex_tuple_levelrB    s;   DFDq6D""D#5_MD	1E!Hd	3B VVAQa$q'223F wwu~H&+
%%a$q'47+91%
EC#( ''!*CI6647DGT!W-YQ6GD4+ggd1gtAwQ/0Ga<<r1   c            
      .   \        \        P                  ! . RO. RO^^\        P                  \        P                  ..4      P
                  . RORR7      p V P                  R4      pVP                  P                  R8X  g   Q hVP                  ^,          p\        ^^.VP                  R^R7      p\        P                  ! W#4       VP                  P                  \        4      Vn        VP                  ^,          p\        P                  ! W#4       R# )	ro   r]   Int64)r   rC   r6   r5   Nr=  )r   r   r   r   r  )r   rH   r   r   r  Tr   r	   r6   r%   r   rC   r&   r;   r  rG   )r-   r   r   r.   s       r/   /test_loc_getitem_nullable_index_with_duplicatesrF    s    	XX|\Aq"%%3GHIKK
B
 ,,s
C99??g%%%
''!*Cq!fCKKwQGH3) 		  (CI
''!*C3)r1   rB  r  c                     \        . ROR.RR7      p\        P                  ! \        RR7      ;_uu_ 4        WP                  R&   RRR4       R#   + '       g   i     R# ; i)	ro   r   uint8rB   r  r   Nr=  )rF   r   )r   r   r   r   r%   )rB  r-   s   & r/   test_loc_setitem_uint8_upcastrI    s@     
<&	AB	y	8	8!y 
9	8	8	8s   AA 	zfill_val,exp_dtypez
2022-01-06zdatetime64[ns]z
2022-01-07
US/Easternr  zdatetime64[ns, US/Eastern]c                    R RRV P                  4       .p\        W P                  VR7      p\        . ROR.VR7      p^VP                  R&   VP                  R4       \        W!R7      p\        P                  ! VP                  VRR	7       R
# )z
2022-01-02z
2022-01-03z
2022-01-04)r  r6   r!   r   
2022-01-08rQ   T)exactN)r   r)  r9     )rL  r!   )	r   r   r  r   r%   r   r&   r`  r	   )fill_val	exp_dtyper   r	   r-   expected_indexs   &&    r/   0test_loc_setitem_using_datetimelike_str_as_indexrR    st     ,hmmoFD$;;i@E	#cU%	@B "BFFKK"49N"((N$?r1   c            
          \        \        R 4      .4      p ^V P                  R&   \        ^ R.^R.^R.R^./4      p\        P                  ! W4       R# )rP   r   r!   r    r]   N)r$   r   )r   rU   r%   r&   r'   )r-   r.   s     r/   test_loc_set_int_dtyperT    sQ    	DK=	!BBFF9!cUAua#DEH"'r1   z8ignore:Period with BDay freq is deprecated:FutureWarningrO  c                      \        . RORRR7      p \        . RO. RO. RO. RO.V . ROR	7      pVP                  RR.R
R7      R,          pVP                  V ^ ,          RR3,          R8X  g   Q hR# )20181101 1100r   r   )r7   rp  r#   r3   ONETWOVALUESr1  T)r   N)rV  z20181101 1200z20181102 1300z20181102 1400)r#   r   r3   )r#   r   r4   )r  Qr8   )Wr9  r9   )rW  rX  rY  )r   r   r   r%   )p_index	mi_seriess     r/   test_loc_periodindex_3_levelsr^    sw     LG
 	/?OL(I
 ##UEN4#@JI=='!*c3/0C777r1   c            	      H   \         P                  ! R 4       \        R\        . RORR7      R\        . R	O4      /4      p \        RR.4      pWP                  V P
                  R3&   \        R\        . R
ORR7      R\        . R	O4      /4      p\        P                  ! W4       R# )r  stringszstring[pyarrow]rQ   r  rI  r6  Nr   )TTF)rI  r6  r   )r   r|  r   r   r%   r  r&   r'   )r-   	new_valueexpected_dfs      r/    test_loc_setitem_pyarrow_stringsrc  
  s    
	"	vo5FG6-.	

B Sz"I )FF2669vo5FG6-.	
K "*r1   c                   ~  a  ] tR tRt o ]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R t]P
                  P                  R]P$                  ]P$                  ]].4      ]P
                  P                  R. R,O4      R 4       4       t]P
                  P                  R]R-,          R]! R4      3.4      R 4       tR t]P
                  P                  RRR.4      R 4       tR tR tR tR tR t ]P
                  P                  RR]!.4      R 4       t"]P
                  P                  R ]#! . R.O. R/O.]! R!4      R"7      ]! ^ ^4      . R0O]#! . R1O. R2O.]! R!4      R"7      .]#! . R.O. R/O.]! R!4      R"7      ]! R4      . R0O]#! . R1O. R2O.]! R!4      R"7      .]#! . R.O. R/O. R3O.]! R!4      R"7      . R4O. R0O]#! . R1O. R2O. R5O.]! R!4      R"7      .]#! . R.O. R/O. R3O.]! R!4      R"7      ]! ^ ^4      . R0O]#! . R1O. R2O. R5O.]! R!4      R"7      .]#! . R.O. R/O. R3O.]! R!4      R"7      ]! R4      ]! RR$4      ]#! . R1O. R2O. R5O.]! R!4      R"7      .]#! . R.O. R/O. R3O.]! R!4      R"7      ]! R4      ]$! RR%R$R&R#R%/4      ]#! . R6O. R7O. R8O.]! R!4      R"7      ..4      R' 4       t%R( t&R)t'V t(R# )9TestLocSeriesi   r  c                X    \        R^R^/4      pVP                  V,          V8X  g   Q hR# )rF   Nr  r  )r   r%   )rJ   rf  r.   r  s   &&& r/   rI  TestLocSeries.test_loc_uint64!  s-     iE1-.wws|x'''r1   c                   VP                   . RO,          p\        P                  ! VP                  V,          VP	                  V4      4       \        P                  ! VP
                  R,          VR,          4       VP                   ^^.,          w  rEVP                  WE pVP                  WE4      p\        P                  ! Wg4       WP                  4       8  p\        P                  ! VP                  V,          W,          4       VP                  V,          W$,          8X  g   Q hVP                  V,          W%,          8X  g   Q hR# )rO   :r   NrF   NrO   r   r   )r	   r&   r;   r%   r  r   truncatemedian)	rJ   string_seriesdatetime_seriesindsd1d2r<   r.   r   s	   &&&      r/   test_loc_getitemTestLocSeries.test_loc_getitem'  s	   ""9-
}0068M8Md8ST
}11$7t9LM !&&2w/ $$R+"++B3
v0 3355
}0068KL ""2&/*====""2&/*====r1   c                   VP                   ^^.,          w  r#VR,          P                  . RO,          pRp\        P                  ! \        VR7      ;_uu_ 4        VP
                  W#  RRR4       \        P                  ! \        VR7      ;_uu_ 4        ^ VP
                  W#% RRR4       R#   + '       g   i     LM; i  + '       g   i     R# ; i)r   r  z"Timestamp\('2000-01-10 00:00:00'\)r   N)ro   rF   rn   )r	   r   r   r   rV   r%   )rJ   rm  ro  rp  ts2r   s   &&    r/   test_loc_getitem_not_monotonic,TestLocSeries.test_loc_getitem_not_monotonic:  s     &&2w/c"''	23]]83//GGBN 0]]83//CGGBN 0/ 0////s   B.C.B>	C	c           
     t   \        \        P                  P                  ^4      P	                  ^
4      \        \        ^ ^^4      4      R7      pVP                  4       p^ VP                  R&   VP                  R,          ^ 8H  P                  4       '       g   Q hVP                  4       p^ VP                  R&   VP                  R,          ^ 8H  P                  P                  4       '       g   Q hVP                  R,          pVP                  R,          pVP                  . RO4      p\        P                  ! W54       \        P                  ! WE4       VP                  \        \        ^4      4      \        \        ^	^R	4      4      ,           ,          pRp\        P                   ! \"        VR7      ;_uu_ 4        VP                  R,           RRR4       \        P                   ! \"        VR7      ;_uu_ 4        ^ VP                  R&   RRR4       R#   + '       g   i     LN; i  + '       g   i     R# ; i)
rF   r   :r   r   N:rO   r)  N:rF   r   Nz*non-monotonic index with a missing label 3r   N)r   r   r   r   r<  )r   rH   r   r   r  rU   rT   r   r   r`  r   r%   r  r&   r;   r   r   rV   )rJ   r  cpr<   rj  r.   s2r   s   &       r/   0test_loc_getitem_setitem_integer_slice_keyerrors>TestLocSeries.test_loc_getitem_setitem_integer_slice_keyerrorsE  s   II!!!$44R8U1bRS_@U

 XXZ"'')))) XXZ"**..0000#''$-;;}-
v0
w1 XXd58ntE!QO'<<=:]]83//FF4L 0]]83//BFF4L 0/ 0////s   9H9H&H#	&H7	c                    \        VP                  R ,          4      pVP                  V,          p\        P                  ! W1R ,          4       R# ):Nr   NN)rB  r	   r%   r&   r;   )rJ   rl  r  r<   s   &&  r/   test_loc_getitem_iterator'TestLocSeries.test_loc_getitem_iteratorc  s:    =&&s+,""3'
vS'9:r1   c                    WP                  4       8  pVP                  4       p^ VP                  V&   Tp^ WB&   \        P                  ! W44       R# )rn   N)rk  r   r%   r&   r;   )rJ   rl  r   r<   r.   s   &&   r/   test_loc_setitem_boolean&TestLocSeries.test_loc_setitem_booleanh  sI    3355##%

4 
v0r1   c                   \        VP                  . RO,          4      p^VP                  V&   Rp\        P                  ! \
        VR7      ;_uu_ 4        ^VP                  . VORN&   RRR4       R#   + '       g   i     R# ; i)r   z\['foo'\] not in indexr   r   N)r   r   r9  )rU   r	   r%   r   r   rV   )rJ   rl  rn  r   s   &&  r/   test_loc_setitem_corner%TestLocSeries.test_loc_setitem_cornerq  sd    M''
34"#$']]83//01Mnnen- 0///s   A22B	c                   VP                   . RO,          pVP                  4       pVP                  4       p^ W2&   ^ VP                  V&   \        P                  ! W44       VP                  4       pVP                  4       p^ W2^ ,          V^,          % ^ VP                  V^ ,          V^,          % \        P                  ! W44       R# )r   N)r   r      )r	   r   r%   r&   r;   )rJ   rm  indicesrx  r   s   &&   r/   test_basic_setitem_with_labels,TestLocSeries.test_basic_setitem_with_labelsx  s    !''4!!#""$
r'!!#""$&'1:
#+,
WQZ(
r'r1   c           
     J   \        \        P                  P                  ^4      P	                  ^
4      \        \        ^ ^^4      4      R7      p. ROp\        P                  ! . RO4      pVP                  4       pVP                  4       p^ W&   ^ VP                  V&   \        P                  ! WE4       VP                  4       pVP                  4       p^ W&   ^ VP                  V&   \        P                  ! WE4       . ROp\        P                  ! . RO4      pRp\        P                  ! \        VR7      ;_uu_ 4        ^ W&   RRR4       \        P                  ! \        VR7      ;_uu_ 4        ^ W&   RRR4       R#   + '       g   i     LC; i  + '       g   i     R# ; i)rF   r   z\[5\] not in indexr   N)rn   r   r   rn   r   r   r   )r   rH   r   r   r  rU   rT   r   r   r%   r&   r;   r   r   rV   	Exception)	rJ   r  rn  arr_indsrx  r   inds_notfoundarr_inds_notfoundr   s	   &        r/   !test_loc_setitem_listlike_of_ints/TestLocSeries.test_loc_setitem_listlike_of_ints  s*   II!!!$44R8U1bRS_@U
 88I&XXZhhj	
r'XXZhhj
r'$HH\2#]]83//!"C 0]]9C00%&C" 10 0/000s   >E>/F>F	F"	c                   \        \        R ^RR7      . ROR7      pVP                  4       p\        RRR7      pW2P                  R&   VP                  R,          pWC8X  g   Q hVP                  4       pW2P
                  ^ &   VP
                  ^ ,          pWC8X  g   Q hVP                  4       pW2R&   VR,          pWC8X  g   Q hR# )	r  rJ  r"  r!   r   r  r  Nr  )r   r   r   r   r%   r   )rJ   r  ry  r.   r<   s   &    r/   test_loc_setitem_dt64tz_values,TestLocSeries.test_loc_setitem_dt64tz_values  s    |Q<@!
 XXZ\l;s!!!XXZ
!!!XXZ3C!!!r1   array_fnrL  c                b   V! ^ .V,          4      p\        V^ ^ ^ ^ .\        R4      \        R7      p\        ^ \        R4      \        R7      pW5P                  R&   \        P
                  ! WT4       \        ^ \        R4      \        R7      pW5P                  ^ &   \        P
                  ! WT4       R# )rn   abcder  r!   N)r   rU   rG   r%   r&   r;   r   )rJ   rL  r  r  r.   r  s   &&&   r/   #test_loc_iloc_setitem_with_listlike1TestLocSeries.test_loc_iloc_setitem_with_listlike  s     sTz"31a+4=OQd7m6:
s-Qd7m6:
s-r1   r  r#   Nc                   \        \        P                  ! . RO4      . ROR7      pRp\        P                  ! \
        VR7      ;_uu_ 4        VP                  VR3,           RRR4       \        P                  ! \
        VR7      ;_uu_ 4        ^VP                  VR3&   RRR4       R#   + '       g   i     LP; i  + '       g   i     R# ; i)r#   r  rW  r   r$   N))r#   0)r#   rA   )r   r  )      r  )r   r   r  r   r   r
   r%   )rJ   r  r  r   s   &&  r/   +test_loc_series_getitem_too_many_dimensions9TestLocSeries.test_loc_series_getitem_too_many_dimensions  s     (()MN
 "]]=44GGGQJ 5 ]]=44"#CGGGQJ 54 54 544s   B*B=*B:	=C	c                (   VP                   . RO,          pVP                  4       p^VP                  V&   VP                  4       p^VP                  . RO&   \        P
                  ! W44       ^
VP                  R&   ^
VR&   \        P
                  ! W44       VP                   ^^.,          w  rV^VP                  WV% ^VR&   \        P
                  ! W44       ^VP                  V&   ^VP                  V&   W,          ^8X  g   Q hW,          ^8X  g   Q hR# )rO   :r   r   N:r      NNri  )r	   r   r%   r   r&   r;   )rJ   rl  rn  r<   r.   ro  rp  s   &&     r/   test_loc_setitemTestLocSeries.test_loc_setitem  s    ""9-##%

4 %%'#$i 
v0D
v0 $$aW-

2
v0 !"" !" A%%% A%%%r1   r6   rG   rx  c                    \        R RR.RRR./VR7      pR RRR/VP                  R
&   \        R RR.RRR./VR7      p\        P                  ! W#4       R	# )r#   rP   defr   ghijklrQ   newAnewBN)rn   r$   r  rJ   r6   r-   r.   s   &&  r/   test_loc_assign_dict_to_row)TestLocSeries.test_loc_assign_dict_to_row  sc     eU^S5%.AOVS&1tcFE?C&%IQVW
b+r1   c                   \        R R.R7      pR \        ^RR7      RR/VP                  ^&   R \        ^RR7      RR/VP                  ^&   \        \        ^RR7      R..R R.^.R7      p\        P                  ! W4       R# )r   rB  r   r&  r  r   r   N)r   r   r%   r&   r'   r  s   &  r/   ,test_loc_setitem_dict_timedelta_multiple_set:TestLocSeries.test_loc_setitem_dict_timedelta_multiple_set  s    FG#4513!7%H

113!7%H

1$e,-7HQRPS
 	f/r1   c           	     8   \        ^^.R.R7      p^^.VP                  ^RR.3&   \        R\        \        P                  \        P                  .RR7      R^\        P                  .R^\        P                  ./^^.R7      p\
        P                  ! W4       R# )	ro   r!   r1  r    r]   rG   rQ   r   N)r   r%   r   rH   r   r&   r'   r   s   &  r/   3test_loc_set_multiple_items_in_multiple_new_columnsATestLocSeries.test_loc_set_multiple_items_in_multiple_new_columns  s    aVcU3!"Aq3*}VRVVRVV,H=a[a[
 a&
 	b+r1   c                    R p\         P                  ! \        VR7      ;_uu_ 4        \        P                  ! R^RR7      p\        \        ^4      VR7      pVP                  R,          ^	8X  g   Q h RRR4       R#   + '       g   i     R# ; i)z#Period with BDay freq is deprecatedr   2000r   r  r   z
2000-01-14N)r&   r~  FutureWarningr   ru  r   rT   r%   )rJ   r   r	   r*   s   &   r/    test_getitem_loc_str_periodindex.TestLocSeries.test_getitem_loc_str_periodindex  sc    3''SAAOO&"3GEE"IU3F::l+q000 BAAAs   A
A<<B	c                   \        \        ^4      4      p\        VR,          RR7      p\        R\        P
                  ! \        V4      \        P                  R7      /VR7      pVP                  V,          p\        RVP                  RR7      P                  \        P                  4      /\        \        P                  ! V4      P                  R4      RR7      R7      p\        P                  ! WE4       R# )	r)  i  rD  rQ   rf  r   stable)kindN)rU   rT   r   r   rH   r   rh   intpr%   argsortr  r   r  r&   r'   )rJ   r  r	   r-   r<   r.   s   &     r/   test_loc_nonunique_masked_index-TestLocSeries.test_loc_nonunique_masked_index  s    59ocDj0ryyU277CDEREMMxM077@A,,T2'B
 	f/r1   c                    \        R ^^.R^^./4      p\        ^R.^^ .R7      pW!P                  R&   \        R R^.R^^./4      p\        P                  ! W14       R# )r!   r    i  r   Nr2  )r   r   r%   r&   r'   )rJ   r-   otherr.   s   &   r/   #test_loc_index_alignment_for_series1TestLocSeries.test_loc_index_alignment_for_series+  se    aVS1a&12Sz!Q0vcC:sQF;<
h+r1   rD   c                    \        . RO. ROVR7      pV^ ,          VP                  \        R.^,          VP                  ^ R7      ^ 3&   \        . RO. ROVR7      p\        P
                  ! W#4       R# )ro   )r	   r   r6   Fr   N)ro   ro   rF   rF   )rA   rA   rE   rE   )r   r%   r   r	   r&   r'   r  s   &&  r/   "test_loc_reindexing_of_empty_index0TestLocSeries.test_loc_reindexing_of_empty_index3  s[     \0DERACAvugk:A=><6JRWX
b+r1   z%df, row_index, col_index, expected_dfr  r   r   r   TFc                h    \        . RO4      VP                  W#3&   \        P                  ! W4       R# )r   Nr   )r   r%   r&   r'   )rJ   r-   	row_index	col_indexrb  s   &&&&&r/   'test_loc_set_series_to_multiple_columns5TestLocSeries.test_loc_set_series_to_multiple_columns;  s)    r (.l';y#$
b.r1   c                   \        R \        R4      R7      p\        R\        R4      R7      p\        R\        R4      R7      pW!P                  RR.&   VRR.,          pTp\        P                  ! WE4       W1P                  RR.&   VRR.,          p\        \
        P                  \
        P                  .RR.R7      p\        P                  ! WE4       R	# )
r  rb   r   r3   r  r4   r  r!   r    N)r   rU   r%   r&   r;   rH   r   )rJ   r&  r  ry  r<   r.   s   &     r/   test_loc_setitem_matching_index-TestLocSeries.test_loc_setitem_matching_indexw  s    3d6l+CtDz*CtDz* sCjC:
v0 sCjC:266266*3*=
v0r1   r   )r  rO   )r  r   r  )r#   r$   r   r  r   )r   r   r   )ry   ry   ry   r4  )TTT)rz   rz   rz   )r   r   rO   )ry   ry   r   )rz   rz   r5  ))r   r   r   r   r   r   r   rI  rq  ru  rz  r}  r  r  r  r  r  rH   r   r   rU   r   r  r   r   r  r  r  r  r  r  r  r  rG   r  r   r   r  r  r   r   r   s   @r/   re  re     s    [[^nj-IJ( K(
>&	<;
12('8", [[Z"((BHHdE)JK[[V\2. 3 L.  [[YF);c5;=O(PQ$ R$&4 [[Wx&:;, <,0, 1
0, [[Wufo6, 7, [[/ 9i0$u+Fa<6UL	 9i0$u+Fd<6UL	 9i;T%[Q"!<>U	 9i;T%[Qa!<>U	 9i;T%[Qdc3!<>U	 9i;T%[QdTUT ;[A4PU;WK1	
4j/k4j/1 1r1   re  )FTT)r  r  i  )r  r  r  )Y__doc__collectionsr   r  r   r   r   r   rF  dateutil.tzr   numpyrH   r   pandas._libsr	   r  pandas.errorsr
   pandas.util._test_decoratorsutil_test_decoratorsr&  pandasr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   pandas._testing_testingr&   pandas.api.typesr   pandas.core.indexingr   pandas.tests.indexing.commonr   r   r   r   r0   r=   r?   r   rD  r\  r  r)  rk  r  r  r  r  r  r  r#  r&  r(  r+  r/  r4  r6  r:  rB  rF  uint16int16rI  rR  rT  rZ  r^  rc  re  r   r1   r/   <module>r     s   ( "   
    * ' ) )     (  & 6 K &
&&"&&#	bffbff 57JK
&&#bfft}511-N, N,b|& |&~+:( :(zs: s:lj, j,Z( (DG* G*TA7 A7H   :~, ~,Bc0 c0L +	dD\Aq62	tTlQF3	tUmaV4DD,,",8,1	$<*( 3		#"FG" H" 	<	 "23	<L	13OP	@	@( WXRS8 T Y8 +,i1 i1r1   