+
    yȇia                         R t ^ RIt^ RIt^ RIt^ RIHtHtHtH	t	H
t
HtHt ^ RIHt  ! R R4      t ! R R4      t ! R R4      tR# )	zx
test setting *parts* of objects both positionally and label based

TODO: these should be split among the indexer tests
N)	DataFrameIndexPeriodSeries	Timestamp
date_rangeperiod_rangec                   t   a  ] tR t^t o R tR tR tR tR tR t	R t
R tR	 tR
 tR tR tR tR tRtV tR# )TestEmptyFrameSetitemExpansionc                6   \        / \        P                  ! ^ RR7      R7      p\        R\        P                  ! ^RR7      R7      pW!R&   \        RR.^,          /\        P                  ! ^RR7      \	        R.4      R7      p\
        P                  ! W4       R# )	    df_indexnameindexGz?series_indexseriesr   columnsN)r   pd
RangeIndexr   r   tmassert_frame_equalselfdfr   expecteds   &   r/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/indexing/test_partial.py,test_empty_frame_setitem_index_name_retainedKTestEmptyFrameSetitemExpansion.test_empty_frame_setitem_index_name_retained   sw    rqz!BCBMM!.$IJ8vz"--
38*%
 	b+    c                   \        4       p\        R \        P                  ! ^RR7      R7      pW!R&   \        RR .^,          /\        P                  ! ^RR7      \	        R.4      R7      p\
        P                  ! W4       R# )r   r   r   r   r   r   N)r   r   r   r   r   r   r   r   s   &   r   -test_empty_frame_setitem_index_name_inheritedLTestEmptyFrameSetitemExpansion.test_empty_frame_setitem_index_name_inherited&   sg    [BMM!.$IJ8vz"--78*%

 	b+r"   c                   \        R R.R7      p\        ^\        ^4      R7      VP                  ^ &   \        R R.^ .\        P
                  R7      p\        P                  ! W4       \        R R.R7      p\        ^R.R7      VP                  ^ &   \        \        P                  ^..R R.^ .RR7      p\        P                  ! W4       R# )ABr   r   )r   r   dtypefloat64N)	r   r   rangelocnpr+   r   r   nan)r   r   r   exps   &   r   -test_loc_setitem_zerolen_series_columns_alignLTestEmptyFrameSetitemExpansion.test_loc_setitem_zerolen_series_columns_align2   s    Sz*1E!H-q	c3Zs"**M
b+ Sz*1SE*q	"&&!Sz!IV
b&r"   c                x   \        R R.R7      pRp\        P                  ! \        VR7      ;_uu_ 4        . ROVP                  ^ &   RRR4       \        R R.R7      p^^.VP                  ^&   \        ^^..^.R R.\
        P                  R7      p\        P                  ! W4       R#   + '       g   i     Lj; i)r'   r(   r)   z(cannot set a row with mismatched columnsmatchN)r   r   r*            )	r   pytestraises
ValueErrorr-   r.   int64r   r   )r   r   msgr0   s   &   r   7test_loc_setitem_zerolen_list_length_must_match_columnsVTestEmptyFrameSetitemExpansion.test_loc_setitem_zerolen_list_length_must_match_columns@   s    Sz*8]]:S11!BFF1I 2 Sz*Fq	!Qc3ZrxxP
b& 21s   B))B9	c                   \        4       pR p\        P                  ! \        VR7      ;_uu_ 4        ^VP                  ^&   RRR4       \        P                  ! \        VR7      ;_uu_ 4        \        ^.R.R7      VP                  ^&   RRR4       Rp\        P                  ! \        VR7      ;_uu_ 4        ^VP                  R&   RRR4       R#   + '       g   i     L; i  + '       g   i     Lc; i  + '       g   i     R# ; i)z*cannot set a frame with no defined columnsr4   Nfoor   z5cannot set a frame with no defined index and a scalarNNNr7   )r   r:   r;   r<   r-   r   )r   r   r>   s   &  r   test_partial_set_empty_frame;TestEmptyFrameSetitemExpansion.test_partial_set_empty_frameN   s     [:]]:S11BFF1I 2 ]]:S11s5'2BFF1I 2 F]]:S11BFF4L 21 21 21 211s#   C-C%8C8C"	%C5	8D		c                   \        \        R .4      \        . RR7      R7      p\        \        . RR7      R7      p\        . RR7      VR &   \        P                  ! W!4       \        \        . 4      R7      p\        VP
                  4      VR &   \        P                  ! W!4       \        \        . 4      R7      pVP
                  VR &   \        P                  ! W!4       R# )rB   objectr*   r   r   r   N)r   r   r   r   r   r   r   r   r   s   &  r   test_partial_set_empty_frame2<TestEmptyFrameSetitemExpansion.test_partial_set_empty_frame2_   s     UE7^58;TUU2X672X.5	
b+U2Y'288$5	
b+U2Y'HH5	
b+r"   c                   \        \        R .4      \        . RR7      R7      pVR ,          P                  R4      VR &   \        \        . RR7      R7      p. VR &   \        P                  ! W!4       \        \        . RR7      R7      p\        \        P                  ! \        V4      4      RR7      VR &   \        P                  ! W!4       R# )rB   r=   rI   rJ   r+   r   N)	r   r   astyper   r   r   r.   arangelenrK   s   &  r   test_partial_set_empty_frame3<TestEmptyFrameSetitemExpansion.test_partial_set_empty_frame3t   s    UE7^57;ST"5/00;U2W565	
b+U2W56299SW-Y?5	
b+r"   c                   \        \        . R R7      R7      p\        \        V4      4      VR&   \        \        R.4      \        . R R7      R7      pVR,          P	                  R 4      VR&   \
        P                  ! W4       R# )r=   rI   r   rB   rJ   N)r   r   r,   rQ   rO   r   r   r   r   r   s   &  r   test_partial_set_empty_frame4<TestEmptyFrameSetitemExpansion.test_partial_set_empty_frame4   sc    U2W56#b'N5	UE7^57;ST"5/009
b+r"   c           	     n   \        4       p\        P                  ! VP                  \        P
                  ! ^ 4      4       \        4       p\        ^.R.R7      V^&   \        ^.R.R7      VP                  R&   \        P                  ! V\        ^..R.^.R7      4       \        P                  ! W4       R# )r   rB   r   r   NrC   )	r   r   assert_index_equalr   r   r   r   r-   r   )r   r   df2s   &  r   test_partial_set_empty_frame5<TestEmptyFrameSetitemExpansion.test_partial_set_empty_frame5   s    [
bjj"--*:;kE7+Aqc%1t
b)aSE%1#"NO
b&r"   c           	     X   \        ^ \        ^\        ^4      R7      /. ROR7      p\        RR.R7      p\        ^\        ^4      R7      V^ &   \        P                  ! W!4       \        RR.R7      p\        ^\        ^4      R7      VP
                  R&   \        P                  ! W!4       R# )r   r   r'   r(   r)   N)r'   r(   r   )rD   r   )r   r   r,   r   r   r-   rK   s   &  r   %test_partial_set_empty_frame_no_indexDTestEmptyFrameSetitemExpansion.test_partial_set_empty_frame_no_index   s    aq!:;]SSz*qa)1
b+Sz*auQx0t
b+r"   c                   \        . RO\        . RR7      R7      pVR ,          P                  R4      VR &   VR,          P                  R4      VR&   VR,          P                  R4      VR&   \        R . ROR. RO/4      pW"P                  ^8  ,          p\        P
                  VR&   \        P                  ! W14       \        . ROR	7      pVR,          P                  R4      VR&   \        . ROR	7      p^VR&   \        P                  ! W!4       \        P                  ! VR,          \        R\        R
7      4       \        R . ROR. RO/4      pW"P                  ^8  ,          pVP                  . ROR	7      p\        . ROR	7      pVR ,          P                  R4      VR &   VR,          P                  R4      VR&   VR,          P                  R4      VR&   \        P                  ! WA4       R# )r'   r(   Newr=   rI   rJ   r+   c cdr)   r   r*   CN)r'   r(   ra   r6   )g333333?g@g@)abrb   rc   )rf   rg   rb   )r'   r(   re   )r   r   rO   r'   r.   r/   r   r   assert_series_equalr   rH   reindex)r   r   r   yresults   &    r    test_partial_set_empty_frame_row?TestEmptyFrameSetitemExpansion.test_partial_set_empty_frame_row   s    %6eBg>VW ,,W5 ,,Y7"5/00;Y_=>ttaxL66%
a*%;< ,,W5013
b+
r%y&e6*JK Y_=>ttaxL?3_5 ,,W5 ,,Y7 ,,Y7
f/r"   c                0   \        \        \        R 7      4      p\        ^ \        \        R 7      /4      p\        P                  ! W4       \        \        R\        R7      4      p\        R\        \        R 7      /4      p\        P                  ! W4       R# )rI   rB   rd   N)r   r   rH   r   r   rU   s   &  r   'test_partial_set_empty_frame_set_seriesFTestEmptyFrameSetitemExpansion.test_partial_set_empty_frame_set_series   sh     vF+,af!567
b+v578eV&%9:;
b+r"   c                    \        ^ .R7      pVP                  4       p^ VR&   \        ^ ^ .\        R.4      R7      p\        P                  ! W4       R# )r   r   rf   r   N)r   copyr   r   r   rU   s   &  r   2test_partial_set_empty_frame_empty_copy_assignmentQTestEmptyFrameSetitemExpansion.test_partial_set_empty_frame_empty_copy_assignment   sH     aS!WWY3Qqc5#<@
b+r"   c           
     j   \        R R.R7      p^^.VR &   \        R ^^.R\        P                  \        P                  ./4      p\        P                  ! W#RR7       \        R R.R7      pRR.VR &   \        R \        RR.V'       g   \        MRR7      R\        \        P                  \        P                  .\        R7      /4      p\        P                  ! W#4       \        R R.R7      p^VP                  R
&   \        R ^.R\        P                  ./4      p\        P                  ! W#RR7       R	# )xrj   r)   F)check_dtype12strrI   N)r   rv   )r   r.   r/   r   r   r   rH   r-   )r   using_infer_stringr   r   s   &&  r   0test_partial_set_empty_frame_empty_consistenciesOTestEmptyFrameSetitemExpansion.test_partial_set_empty_frame_empty_consistencies   s    Sz*a&3cAq630@AB
b>Sz**3V#J(:& VRVVRVV,F;
 	b+Sz*vcA3bffX67
b>r"    N)__name__
__module____qualname____firstlineno__r    r$   r1   r?   rE   rL   rR   rV   r[   r^   rl   ro   rs   r|   __static_attributes____classdictcell____classdict__s   @r   r
   r
      sP     ,
,''",*,,'
,0<	,,? ?r"   r
   c                   *  a  ] tR t^t o R t]P                  P                  R4      R 4       tR t	R t
R tR t]P                  P                  R^dR	.4      R
 4       tR t]P                  P                  R]! R^RR7      . R*O]! RRR7      ]! RRR7      ]! RRR7      .3]! R^RRR7      . R*O]! R4      P)                  R4      ]! R4      P)                  R4      ]! R4      P)                  R4      .3]P,                  ! R^R7      . R+O]P.                  ! R4      ]P.                  ! R4      ]P.                  ! R4      .3.4      R 4       t]P                  P                  R]! R^RR7      RR.3]! R^RR7      RR.3]P,                  ! R^R7      R R!.3.4      R" 4       t]P                  P                  R#]! R^RR7      ]! RR.]R$7      R%3]! R^RR7      ]! RR.]R$7      R%3]P,                  ! R^R7      ]! RR.]R$7      R&3.4      R' 4       tR(tV tR)# ),TestPartialSettingc                   \        . RO4      pVP                  4       p^V^&   \        . RO. R	OR7      p\        P                  ! W#4       VP                  4       p^VP                  ^&   \        . RO. R	OR7      p\        P                  ! W#4       VP                  4       pRV^&   \        . R
O. R	OR7      p\        P                  ! W#4       VP                  4       pRVP                  ^&   \        . R
O. R	OR7      p\        P                  ! W#4       VP                  4       pRp\
        P                  ! \        VR7      ;_uu_ 4        RVP                  ^&   RRR4       Rp\
        P                  ! \        VR7      ;_uu_ 4        RVP                  ^&   RRR4       R#   + '       g   i     LP; i  + '       g   i     R# ; i)r7   r         @%iloc cannot enlarge its target objectr4   Nz/index 3 is out of bounds for axis 0 with size 3r6   )r7   r8   r9      )r   r7   r8   r   )r7   r8   r9   r   )
r   rr   r   rh   r-   r:   r;   
IndexErrorilociat)r   s_origsr   r>   s   &    r   test_partial_setting'TestPartialSetting.test_partial_setting   sF    	"KKM!,l;
q+KKMa,l;
q+KKM!.=
q+KKMa.=
q+ KKM5]]:S11AFF1I 2 @]]:S11AEE!H 21	 21 211s   F F3 F0	3G	z.ignore:Setting a value on a view:FutureWarningc           	     <   \        \        P                  ! ^4      P                  ^^4      RR.RR7      pVP	                  4       pRp\
        P                  ! \        VR7      ;_uu_ 4        RVP                  R&   RRR4       R	p\
        P                  ! \        VR7      ;_uu_ 4        RVP                  R&   RRR4       \        R. ROR. RO/4      pVP	                  4       pVP                  ^,          VP                  ^&   \        P                  ! W$4       \        R. ROR. RO/4      pVP	                  4       pVP                  ^,          VP                  ^&   \        P                  ! W$4       \        R. ROR. RO/4      pVP	                  4       pVP                  ^,          VP                  ^&   \        P                  ! W$4       \        R. ROR. RO/4      pVP	                  4       pVP                  R,          VP                  R&   \        P                  ! W$4       \        R. ROR\        . RO4      /4      pVP	                  4       pVR,          P                  \        P                  4      VR&   VP                  R,          VP                  R&   \        P                  ! W$4       VP	                  4       pVR,          VR
&   VP	                  4       pVP                  R,          VP                  R&   \        P                  ! W$4       VP	                  4       pVR,          VR
&   VP	                  4       pVP                  R,          VP                  R&   \        P                  ! W$4       R#   + '       g   i     EL; i  + '       g   i     EL; i)   r'   r(   r=   )r   r*   r   r4   r   Nz/index 2 is out of bounds for axis 0 with size 2re   )   r8   )r   r   r   )r7   r   r   )r   r8   r   r   )r7   r9   r   r   )r   r8   r   )rD   r'   )rD   r(   )g        g       @g      @)rD   re   )r   r.   rP   reshaperr   r:   r;   r   r   r   r   r   r-   r   rO   r+   )r   df_origr   r>   r   s   &    r   test_partial_setting_frame-TestPartialSetting.test_partial_setting_frame  s   IIaL  A&c
'

 \\^5]]:S11BGGDM 2 @]]:S11BFF4L 2 c9c9=>\\^WWQZ

b+c9c9=>\\^FF1Iq	
b+ c<lCD\\^FF1Iq	
b+ c9c9=>\\^v
b+ c9c6/3JKL\\^S'..,3 v
b+ <<>3\\^v
b+ <<>3\\^v
b+g 211 211s   +M6)N
6N	
N	c           	        \        R ^R7      p\        \        P                  P	                  ^4      P                  R	4      V. R
OR7      p\        P                  ! V\        R^/VRR VP                  ,           R7      .RR7      pVP                  4       p^VP                  VR,          VP                  ,           R3&   \        P                  ! WC4       VP                  4       p^VP                  VR,          VP                  ,           R3&   \        P                  ! WC4       \        ^ ^/VRR VP                  ,           R7      p\        P                  ! W%.^R7      pVP                  4       p^VP                  VR,          VP                  ,           ^ 3&   \        P                  ! WC4       VP                  4       p^VP                  VR,          VP                  ,           ^ 3&   \        P                  ! WC4       R# )z1/1/2000)periodsr'   r   Nr   T)sortaxis)   r   )r'   r(   re   D)r   r   r.   randomdefault_rngstandard_normalr   concatfreqrr   r-   r   r   at)r   datesr   r   r   	exp_others   &     r   test_partial_setting2(TestPartialSetting.test_partial_setting2R  s   :q1II!!!$44V<(
 99iabc
UZZ0GHIPT
 \\^./uRy5::%s*+
b+\\^-.eBi%**$c)*
b+q!fE"#J,CD	99g1:\\^,-uRy5::%q()
b+\\^+,eBi%**$a'(
b+r"   c                ^   \        R ^.R^..RR.R7      pVP                  ^,          P                  4       p^Vn        \        P
                  ! V\        V4      P                  P                  4       .4      pVP                  ^,          VP                  ^&   \        P                  ! W4       R# )TFfemalefitnessr)   N)
r   r-   rr   r   r   r   Tinfer_objectsr   r   )r   r   r   r   s   &   r    test_partial_setting_mixed_dtype3TestPartialSetting.test_partial_setting_mixed_dtypeo  s     q	E1:.98MNFF1INN99b)A,..">">"@ABFF1Iq	
b+r"   c                   \        R R.^^.R7      p\        \        P                  R\        P                  .. ROR7      p\        P                  ! \
        RR7      ;_uu_ 4        VP                  . RO,           RRR4       VP                  . RO4      p\        P                  ! W2RR7       \        \        P                  R\        P                  \        P                  .. ROR7      p\        P                  ! \
        RR7      ;_uu_ 4        VP                  . RO,           RRR4       VP                  . RO4      p\        P                  ! W2RR7       \        . RO. ROR7      pVP                  . RO,          p\        P                  ! W2RR7       \        RR\        P                  R .. ROR7      p\        P                  ! \
        RR7      ;_uu_ 4        VP                  . RO,           RRR4       VP                  . RO4      p\        P                  ! W2RR7       R\        P                  ! \        4       R	2p\        P                  ! \
        VR7      ;_uu_ 4        VP                  . RO,           RRR4       \        RR\        P                  .. ROR7      p\        P                  ! \
        RR7      ;_uu_ 4        VP                  . RO,           RRR4       VP                  . RO4      p\        P                  ! W2RR7       \        . RO. ROR7      p\        R
\        P                  \        P                  .. ROR7      p\        P                  ! \
        RR7      ;_uu_ 4        VP                  . RO,           RRR4       VP                  . RO4      p\        P                  ! W2RR7       \        . RO. ROR7      p\        \        P                  R
R
.. ROR7      p\        P                  ! \
        RR7      ;_uu_ 4        VP                  . RO,           RRR4       VP                  . RO4      p\        P                  ! W2RR7       \        . RO. ROR7      p\        \        P                  RR.. ROR7      p\        P                  ! \
        RR7      ;_uu_ 4        VP                  . RO,           RRR4       VP                  . RO4      p\        P                  ! W2RR7       \        . RO. ROR7      p\        R\        P                  \        P                  .. ROR7      p\        P                  ! \
        RR7      ;_uu_ 4        VP                  . RO,           RRR4       VP                  . RO4      p\        P                  ! W2RR7       \        . RO. ROR7      p\        R\        P                  \        P                  .. ROR7      p\        P                  ! \
        RR7      ;_uu_ 4        VP                  . RO,           RRR4       VP                  . RO4      p\        P                  ! W2RR7       \        . RO. ROR7      pVP                  . RO,          p\        P                  ! W2RR7       R#   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELZ; i  + '       g   i     EL; i  + '       g   i     ELt; i  + '       g   i     EL; i  + '       g   i     EL`; i  + '       g   i     EL; i  + '       g   i     EL0; i) 皙?皙?r   not in indexr4   NTcheck_index_type'\"None of \[Index\(\[3, 3, 3\], dtype='z'\)\] are in the \[index\]\"333333?皙?r9   r8   r9   r9   r8   r9   rv   r   r   r   r8   r8   r7   r8   r8   rv   r7   r9   r9   r9   r8   r8   r9   r   r   r   r6   r9   r   r   r   r   r   r   r7   r8   r9   r   r   r9   r9   r   r   r   r   r   r      r   r8   r8   r   r   r   r   r   r   r   r8   r8   r7   r7   r7   r7   r   r   )r   r.   r/   r:   r;   KeyErrorr-   ri   r   rh   r*   intr   )r   serr   rk   r>   r   s   &     r   test_series_partial_set*TestPartialSetting.test_series_partial_set{  s    c3Z1v. 2663/yA]]8?;;GGI < Y'
v$G26637~N]]8>::GGN# ; ^,
v$G/;#
v$G3RVVS1H]]8>::GGN# ; ^,
v$G 7rxx}o F& & 	 ]]83//GGI 0 3RVV,I>]]8>::GGI ; Y'
v$G?)43/yA]]8>::EE) ; 9%
v$G'|<2663,I>]]8>::EE) ; 9%
v$G'|<2663,I>]]8>::EE) ; 9%
v$G'|<3/yA]]8>::EE) ; 9%
v$G'|<3/yA]]8>::EE) ; 9%
v$G .lC,'
v$Ge <;; ;:: ;:: 0// ;:: ;:: ;:: ;:: ;:: ;::sx   $ZZ$Z8%[[ 3[4\/\\0]Z!	$Z5	8[		[	 [1	4\	\	\-	0]	]	c                	   \        ^^.RRR7      p\        RR.VRR7      p\        P                  ! \        RR	7      ;_uu_ 4        VP
                  . RO,           R
R
R
4       \        P                  ! \        RR	7      ;_uu_ 4        VP
                  . RO,           R
R
R
4       \        . RORRR7      p\        . ROVRR7      pVP
                  . RO,          p\        P                  ! WTRR7       \        P                  ! \        RR	7      ;_uu_ 4        VP
                  . RO,           R
R
R
4       R\        P                  ! \        4       R2p\        P                  ! \        VR	7      ;_uu_ 4        VP
                  . RO,           R
R
R
4       \        P                  ! \        RR	7      ;_uu_ 4        VP
                  . RO,           R
R
R
4       \        . RORRR7      p\        P                  ! \        RR	7      ;_uu_ 4        \        . ROVRR7      P
                  . RO,           R
R
R
4       \        . RORRR7      p\        P                  ! \        RR	7      ;_uu_ 4        \        . ROVRR7      P
                  . RO,           R
R
R
4       \        . RORRR7      p\        P                  ! \        RR	7      ;_uu_ 4        \        . ROVRR7      P
                  . RO,           R
R
R
4       \        . RORRR7      p\        P                  ! \        RR	7      ;_uu_ 4        \        . ROVRR7      P
                  . R O,           R
R
R
4       \        . RORRR7      p\        P                  ! \        RR	7      ;_uu_ 4        \        . ROVRR7      P
                  . R!O,           R
R
R
4       \        . R"ORRR7      p\        . R#OVRR7      pVP                  . R$O,          p\        P                  ! WTRR7       R
#   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL
; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELD; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL`; i  + '       g   i     EL; i)%r7   r=   idxr*   r   r   r   r   )r   r   z\[3\] not in indexr4   Nr   Tr   z\['x'\] not in indexr   z(', name='idx'\)\] are in the \[index\]\"r   r   r   r   r   r   r   r6   r   r   r   r   r   r   r   r   r   r   r   r   )r   r   r:   r;   r   r-   r   rh   r.   r*   r   r   )r   r   r   exp_idxr   rk   r>   s   &      r   !test_series_partial_set_with_name4TestPartialSetting.test_series_partial_set_with_name  s(    QF'6c3Zs5 ]]8+@AAGGI B ]]8?;;GGN# < 	u=/sC#
v$G]]8+BCCGGN# D
 7rxx}o F5 5 	 ]]83//GGI 0 ]]8>::GGI ; IW59]]8>::?#C8<<YG ; Le<]]8>::'s=AA)L ; Le<]]8>::'s=AA)L ; Le<]]8>::'s=AA)L ; Le<]]8>::'s=AA)L ; G%@.gCH,'
v$Gc BAA <;; DCC 0// ;:: ;:: ;:: ;:: ;:: ;::sx   PPP-6Q8Q
$Q)*$Q=
$R*$R%
$R9P	P*	-P>	Q	Q&	)Q:	=R	R"	%R6	9S
	keyg      Y@c           
     z   \        \        P                  P                  ^4      P	                  R4      \        \        R4      \        R7      \        R^
RR7      R7      pVP                  4       pVP                  ^ ,          VP                  VR3&   \        . \        VP                  4      OVN\        VP                  P                  R7      p\        P                  ! VP                  VP                  ^ .,          P                  .^ R	7      p\        WTVP                   R
7      p\"        P$                  ! W64       R# )r8   ABCDrI   
2000-01-01r(   r   r   rJ   rD   r   r   r   N
   r   )r   r.   r   r   r   r   listrH   r   rr   r   r-   r   r   concatenatevaluesr   r   r   )r   r   origr   ex_indexex_datar   s   &&     r   6test_setitem_with_expansion_numeric_into_datetimeindexITestPartialSetting.test_setitem_with_expansion_numeric_into_datetimeindex  s     II!!!$44W=$v,f5\2C@

 YY[sAv14

+1S1djjooV..$++rwws|/B/B!C!LWdllK
b+r"   c           
        \        \        P                  P                  ^4      P	                  R4      \        \        R4      \        R7      \        R^
RR7      R7      pVP                  4       pVP                  ^ ,          VP                  R&   \        VP                  ^ ,          RR7      p\        P                  ! V\        V4      P                  P!                  4       .4      p\"        P$                  ! W$4       \"        P&                  ! VP(                  \        . VP(                  P+                  4       ORN4      4       VP(                  P,                  R	8X  g   Q hR
# )r8   r   rI   r   r(   r   rJ   rf   r   rH   Nr   )rf   rD   )r   r.   r   r   r   r   r   rH   r   rr   r   r-   r   r   r   r   r   r   r   rY   r   tolistr*   )r   r   r   r   r0   s   &    r   test_partial_set_invalid+TestPartialSetting.test_partial_set_invalid!  s     II!!!$44W=$v,f5\2C@
 YY[vRWWQZc*iiy~//==?@A
b&
bhh.I

0A0A0C.IS.I(JKxx~~)))r"   zidx,labels,expected_idx2000r   )startr   r   
2000-01-04
2000-01-08
2000-01-12)r   r   )r   r   r   unitz1 day)r   r   4D8Dz4 dayz8 dayz12 dayc                    V! \        ^4      VR7      p. ROpV! Wc4      p\        P                  ! WuP                  V,          4       V\        J d    \        P
                  ! WuV,          4       R# R# )   r   N)r9   r      )r,   r   assert_equalr-   r   rh   )r   r   labelsexpected_idxframe_or_seriesobjexpected_valuer   s   &&&&&   r   4test_loc_with_list_of_strings_representing_datetimesGTestPartialSetting.test_loc_with_list_of_strings_representing_datetimes4  sW    @ eBis3#">@
''&/2f$""8[9 %r"   z
idx,labelsz
2000-01-30z3 dayz30 dayc                @   \        \        ^4      VR7      p\        \        ^4      VR7      pRp\        P                  ! \
        VR7      ;_uu_ 4        VP                  V,           RRR4       \        P                  ! \
        VR7      ;_uu_ 4        W2,           RRR4       \        P                  ! \
        VR7      ;_uu_ 4        VP                  V,           RRR4       R#   + '       g   i     L; i  + '       g   i     Le; i  + '       g   i     R# ; i)r   r   r   r4   Nr   r,   r   r:   r;   r   r-   )r   r   r   r   r   r>   s   &&&   r   Btest_loc_with_list_of_strings_representing_datetimes_missing_valueUTestPartialSetting.test_loc_with_list_of_strings_representing_datetimes_missing_value]  s    $ U2Yc*uRy,]]83//GGFO 0]]83//K 0]]83//FF6N 0/	 0//////s$   C&	C9D&C6	9D		D	zidx,labels,msgrI   zHNone of \[Index\(\['4D', '8D'\], dtype='object'\)\] are in the \[index\]zXNone of \[Index\(\['2000-01-04', '2000-01-08'\], dtype='object'\)\] are in the \[index\]c                <   \        \        ^4      VR7      p\        \        ^4      VR7      p\        P                  ! \
        VR7      ;_uu_ 4        VP                  V,           RRR4       \        P                  ! \
        VR7      ;_uu_ 4        WB,           RRR4       \        P                  ! \
        VR7      ;_uu_ 4        VP                  V,           RRR4       R#   + '       g   i     L; i  + '       g   i     Le; i  + '       g   i     R# ; i)r   r   r4   Nr  )r   r   r   r>   r   r   s   &&&&  r   Etest_loc_with_list_of_strings_representing_datetimes_not_matched_typeXTestPartialSetting.test_loc_with_list_of_strings_representing_datetimes_not_matched_typez  s    B U2Yc*uRy,]]83//GGFO 0]]83//K 0]]83//FF6N 0/	 0//////s$   C$	C7D
$C4	7D	
D	r~   N)r   r   r   )r   r   12D)r   r   r   r   r   r:   markfilterwarningsr   r   r   r   r   parametrizer   r   r   r   r   r   as_unitr   timedelta_range	Timedeltar   r  r   rH   r  r   r   r   s   @r   r   r      s    #J [[ PQ<, R<,|,:
,YHv8Ht [[US%L1, 2, *& [[! 62C@:<c2<c2<c2 #CH:l+33C8l+33C8l+33C8 """=#g&W(=r||H?UV'	
8:98: [[ 62C@|,
 #>|, gr:Wh<OP
	
 [[ 62C@tTl&1,	 #>tTl&1,	 """=|\2&A?	#	
:;:r"   r   c                   &   a  ] tR tRt o R tRtV tR# )TestStringSlicingi  c                   \         P                  ! . RO4      p\        \        \	        V4      4      VR7      p\        \        \	        VR,          4      4      VR,          R7      p\
        P                  ! \        RR7      ;_uu_ 4        VR,           RRR4       VR,          p\        P                  ! WC4       R#   + '       g   i     L1; i)	
2012-01-01Nr   :Nr9   Nz non-existing keys is not allowedr4   :z
2012-01-01z
2012-01-04N:z
2012-01-01z2012-01-03 00:00:00.000000000N)r  z
2012-01-02z
2012-01-03N)
r   to_datetimer   r,   rQ   r:   r;   r   r   r   )r   r   r   r   rk   s   &    r   ,test_slice_irregular_datetime_index_with_nan>TestStringSlicing.test_slice_irregular_datetime_index_with_nan  s    OPuSZ(6U3uRy>2%)D]]8+MNN ()	 O @A
f/ ONs   	
B<<C	r~   N)r   r   r   r   r  r   r   r   s   @r   r  r    s     0 0r"   r  )__doc__numpyr.   r:   pandasr   r   r   r   r   r   r   r   pandas._testing_testingr   r
   r   r  r~   r"   r   <module>r     sM         S? S?lv vr0 0r"   