+
    yȇi1                     ~    ^ RI Ht ^ RIt^ RIt^ RIt^ RI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# )    )ascii_lettersN)	DataFrameIndexSeries	Timestamp
date_rangeoption_contextc                   n   a  ] tR t^t o ]P
                  P                  RRR.4      R 4       tR tRt	V t
R# )TestCachingdo_refTFc           
     >   . R	Op\        RVRVR,          VR,          ,           R\        P                  ! ^4      /4      pV'       d   VP                  R
,           ^VP                  R&   VP                  R
,          R8X  g   Q hVP                  R,          R8X  g   Q hR# )oneab:   NNNr   Nc        g      ?N)r   twothreefourfivesixseven)r   r   )   r   )r   nparangeloc)selfr   contdfs   &&  /Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/indexing/test_chaining_and_caching.pytest_setitem_cache_updating'TestCaching.test_setitem_cache_updating   s     GT3R48(;S"))A,OP FF6N vvvf~$$$vvf~$$$    c                   \        R . RO/\        RR4      R7      p\        R . RO/\        RR4      R7      p\        R. R	OR. R
O/4      p\        R4      p\        R4      pVP                  4        FG  w  rgVP                  WE1VR,          3,          VR,          ,           VP                  WE1VR,          3&   KI  	  \
        P                  ! W!4       \
        P                  ! VR ,          VR ,          4       \        R . RO/\        RR4      R7      pVP                  4       pVP                  4        F[  w  rgW'R,          ,          WE VR,          ,           p	\
        P                  ! 4       ;_uu_ 4        WVR,          ,          WE% RRR4       K]  	  \
        P                  ! W(4       \
        P                  ! VR ,          VR ,          4       \        R . RO/\        RR4      R7      pVP                  4        F5  w  rgVP                  WE1VR,          3;;,          VR,          ,          uu&   K7  	  \
        P                  ! W!4       \
        P                  ! VR ,          VR ,          4       R#   + '       g   i     EKM  ; i)Az5/7/2014z5/9/2014)indexCDN)X  r+   r+   )r   r   r   )r'   r'   r'   )d      i,  )
r   r   r   iterrowsr   tmassert_frame_equalassert_series_equalcopyraises_chained_assignment_error)
r   expectedoutr!   r   eixixrowout_originalvs
   &         r"   "test_setitem_cache_updating_slices.TestCaching.test_setitem_cache_updating_slices$   s    /"*Z*L
 i(
:z0RS_c?CD 
#
#{{}GB),#c(1B)Cc#h)NCGGCGSX%& % 	c,
s3x#7 i(
:z0RSxxz{{}GBHc&S1A3355)*CHc& 65 %
 	c0
s3xc):;i(
:z0RS{{}GBGGCGSX%&#c(2& % 	c,
s3x#7 655s   2I,,I> N)__name__
__module____qualname____firstlineno__pytestmarkparametrizer#   r;   __static_attributes____classdictcell____classdict__s   @r"   r   r      s6     [[Xe}5% 6% #8 #8r%   r   c            	         a  ] tR t^Jt o R t]P                  P                  R 4       t]P                  P                  R 4       t	]P                  P                  R 4       t
]P                  P                  R 4       t]P                  P                  R 4       t]P                  P                  R 4       t]P                  P                  R 4       t]P                  P                  R	 4       t]P                  P                  R
 4       t]P                  P                  R 4       t]P                  P                  R 4       tR tR tR t]P                  P-                  R^]! ^ . RO/4      .4      R 4       tR tR tR tR tR tRtV tR# )TestChainingc                   . ROp\        R\        P                  ! V4      /4      pVP                  R8H  p\        P
                  ! 4       ;_uu_ 4        RVP                  V&   RRR4       \        P                  ! V\        RV/4      4       \        P                  P                  V.R.R7      p\        V4      pVP                  R8H  p\        P
                  ! 4       ;_uu_ 4        RVP                  V&   RRR4       \        P                  ! V\        RV/4      4       \        RVRV/4      pVP                  4       pVP                  R8H  p\        P
                  ! 4       ;_uu_ 4        RVP                  V&   RRR4       \        P                  ! W%4       \        R\        P                  RR	R
R./4      p\        R\        P                  ! . RO4      /4      p\        P
                  ! 4       ;_uu_ 4        \        P                  VR,          P                  ^ &   RRR4       \        R. RO/4      pVP                  4       p\        P                  ! Wv4       \        R\        P                  ! . RO4      /4      p\        P
                  ! 4       ;_uu_ 4        \        P                  VP                  P                  ^ &   RRR4       VP                  4       p\        P                  ! Wv4       R#   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     L; i)righttimeoutresponsenoneN)names	response1r'   barbahfoo)rL   leftrU   rU   rL   rU   rM   )rT   rR   rS   rT   rR   )r   r   arrayrN   r/   r3   r0   rec
fromarraysr2   nanilocheadr'   )r   datar!   maskrecarraydf_originalr4   results   &       r"   test_setitem_chained_setfault*TestChaining.test_setitem_chained_setfaultK   sT   L
BHHTN34{{i'//11 &BKK 2
b)Z,>"?@66$$dVJ<$@x {{i'//11 &BKK 2
b)Z,>"?@
D+t<=ggi{{i'//11 &BKK 2
b. cBFFE5%#GHIRXX&IJKL//11 ffBsGLLO 2c#FGH
f/RXX&IJKL//1166BDDIIaL 2
f/? 211 211 211 211 21s<   K3&L+L9%L/(M3L	L	L,	/M 	M	c           	     >   \        R R4      ;_uu_ 4        \        \        P                  ! ^4      P	                  ^^4      \        R4      RR7      pVP                  4       p\        P                  ! 4       ;_uu_ 4        RVR,          ^ &   RRR4       \        P                  ! 4       ;_uu_ 4        RVR,          ^&   RRR4       \        P                  ! W4       RRR4       R#   + '       g   i     Lb; i  + '       g   i     LC; i  + '       g   i     R# ; i)	chained_assignmentraiseABint64)columnsdtyper'   N)
r	   r   r   r   reshapelistr2   r/   r3   r0   r   r!   r_   s   &  r"   test_detect_chained_assignment+TestChaining.test_detect_chained_assignmentr   s    0'::		!$$Q*DJgB '')K33553
 633553
 6!!"2 ;: 6555 ;::s<   A)D>C%	%D0C8	=D%C50D8DDD	c                   \        R \        \        ^4      RR7      R\        P                  ! \        P
                  ! ^^4      \        P                  R7      /4      pVP                  4       p\        P                  ! 4       ;_uu_ 4        RVR ,          ^ &   RRR4       \        P                  ! 4       ;_uu_ 4        RVR ,          ^&   RRR4       \        P                  ! W4       R#   + '       g   i     LZ; i  + '       g   i     L;; i)r'   rg   ri   BNrj   rk   )r   r   ranger   rV   r   float64r2   r/   r3   r0   rn   s   &  r"   %test_detect_chained_assignment_raises2TestChaining.test_detect_chained_assignment_raises   s     VE!HG4RXXbii1oRZZ@
 ggi//11BsGAJ 2//11BsGAJ 2
b.	 2111s   
C)<C<)C9	<D	c                ^   \        R \        \        ^4      RR7      R\        P                  ! \        P
                  ! ^^4      \        P                  R7      /4      p\        P                  ! 4       ;_uu_ 4        RVP                  ^ ,          R &   RRR4       R#   + '       g   i     R# ; i)r'   rg   rr   rs   Nrj   )
r   r   rt   r   rV   r   ru   r/   r3   r   r   r!   s   & r"   $test_detect_chained_assignment_fails1TestChaining.test_detect_chained_assignment_fails   sr     VE!HG4RXXbii1oRZZ@
 //11BFF1IcN 2111s   :BB,	c           
     $   \        R . ROR\        \        ^4      RR7      /4      pVP                  P                  P                  R4      p\        P                  ! 4       ;_uu_ 4        ^*W,          R&   RRR4       R#   + '       g   i     R# ; i)r   r   rg   rr   oN)r   r   r   r   r   r   r   )r   r   rt   r   str
startswithr/   r3   )r   r!   indexers   &  r"   *test_detect_chained_assignment_doc_example7TestChaining.test_detect_chained_assignment_doc_example   sm     HVE!HG4
 $$((%%c*//11!BK 2111s   (A>>B	c                    \        R \        . RO\        R7      R. RO/4      pVP                  4       p\        P
                  ! 4       ;_uu_ 4        ^oVR ,          ^ &   RRR4       \        P                  ! W4       R#   + '       g   i     L(; i)r'   rr   rs   Naaabbbccc      r   )r   r   objectr2   r/   r3   r0   rn   s   &  r"   +test_detect_chained_assignment_object_dtype8TestChaining.test_detect_chained_assignment_object_dtype   se    &.f=sIN
 ggi//11BsGAJ 2
b. 21s   A==B	c                    \        R ^^./4      p\        V4      pVP                  V4       \        P                  ! V4      pVR ,          VR&   VR ,          VR&   R# )r'   rs   N)r   r~   	to_picklepdread_pickle)r   	temp_filer!   pathdf2s   &&   r"   -test_detect_chained_assignment_is_copy_pickle:TestChaining.test_detect_chained_assignment_is_copy_pickle   sS     aV}%9~
TnnT"s8Cs8Cr%   c                   \         P                  P                  ^4      P                  \	        \
        4      RR7      pVP                  ^R7       V Uu. uF  p\
        V^ ,          V^,           NK  	  pp\        VR.R7      pVP                  P                  R 4      pVP                  VR3,          P                  \        P                  4      VP                  VR3&   R# u upi )r   )size)axislettersrh   c                     \        V 4      ^
8  # )
   )len)xs   &r"   <lambda>ATestChaining.test_detect_chained_assignment_str.<locals>.<lambda>   s    SVb[r%   N)r,   r   )r   randomdefault_rngintegersr   r   sortr   r   applyr   r~   lower)r   idxsr   stringsr!   r   s   &     r"   "test_detect_chained_assignment_str/TestChaining.test_detect_chained_assignment_str   s    yy$$Q'00]1C(0S		q	7;<t!=1!-t<w4**""#89%'VVGY,>%?%E%Ecii%Pw	!"	 =s    C#c                v   \        \        P                  P                  ^4      P	                  R4      4      pVP
                  R,          P                  4       p\        P                  ! W!P
                  R,          P                  4       4       \        P                  ! W!^ ,          P                  4       4       R# )r   Nr      ):NNNr   )	r   r   r   r   standard_normalrZ   sort_valuesr/   r1   )r   r!   sers   &  r"   &test_detect_chained_assignment_sorting3TestChaining.test_detect_chained_assignment_sorting   sv    ryy,,Q/??HIggdm'')
sGGDM$=$=$?@
sqE$5$5$78r%   c                    \        R . ROR. RO/4      p\        V4       VR ,          R,           VR &   \        V4       WR,          ^8g  ,          p\        V4       VR ,          R,           VR &   \        V4       R# )column1column2r   r   N)r   r   r   )r      	   )r   r~   ry   s   & r"   .test_detect_chained_assignment_false_positives;TestChaining.test_detect_chained_assignment_false_positives   sh     	?IyIJB9+9B9"#B9+9Br%   c                @   \        \        P                  ! ^ ^	4      R.R7      pRVR&   VP                  4       p\        P
                  ! 4       ;_uu_ 4        RVP                  R,          R&   RRR4       \        P                  ! W4       R#   + '       g   i     L(; i)r   countr   r   groupr   :r      NN)r   r   r   r2   r/   r3   rZ   r0   rn   s   &  r"   /test_detect_chained_assignment_undefined_column<TestChaining.test_detect_chained_assignment_undefined_column   sm     ryyA	:7ggi//11$'BGGCL! 2
b. 21s   BB	c                ^   \        R \        R^R7      R\        P                  P	                  ^4      P                  ^4      R\        P                  ! ^RR7      R. RO/4      pVP                  4       p\        P                  ! 4       ;_uu_ 4        RVP                  ^,          R&   R	R	R	4       \        P                  ! 4       ;_uu_ 4        RVP                  ^,          R&   R	R	R	4       \        P                  ! W4       \        P                  ! \        R
R7      ;_uu_ 4        \        P                  ! 4       ;_uu_ 4        RVR,          ^&   R	R	R	4       R	R	R	4       R	#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L@; i  + '       g   i     R	# ; i)r'   20130101)periodsrs   r)   rg   rr   r*   rT   NzInvalid valuematchr   r   r   de)r   r   r   r   r   r   r   r2   r/   r3   r   r0   rB   raises	TypeErrorrn   s   &  r"   -test_detect_chained_assignment_changing_dtype:TestChaining.test_detect_chained_assignment_changing_dtype   s    Z
A6RYY**1-==a@RYYq0.	
 ggi//11"BFF1IcN 2//11"BFF1IcN 2
b.]]9O<<3355"3
 6 =< 2111
 65 =<<s<   E"E5%FF	F"E2	5F	FFF,	c                   \        R \        \        ^4      4      R\        R4      RR R\        P                  R./4      pVP                  4       p\        P                  ! VP                  4      p\        P                  ! 4       ;_uu_ 4        VR.,          V,          VR.,          V&   RRR4       \        P                  ! W4       R#   + '       g   i     L(; i)r   r   zab..r   r   N)r   rm   rt   r   rY   r2   r   isnar   r/   r3   r0   )r   r!   r_   r]   s   &   r"   test_setting_with_copy_bug'TestChaining.test_setting_with_copy_bug  s    $uQx.#tF|S3RVVS:QR
 ggiwwrtt}//11 #ioBuIdO 2
b. 21s   C		C	c           	     r    \        R \        . RO4      R\        . RO4      /4      pVR .,          p. ROVR&   R# )r   yN)r   r   r   )r   r   f)ghi)r   r   )r   df1r   s   &  r"   %test_setting_with_copy_bug_no_warning2TestChaining.test_setting_with_copy_bug_no_warning  s7     f_5sF?<STU3%j #Cr%   c                    \        R . ROR. RO/4      p\        P                  ! 4       ;_uu_ 4        ^oVP                  ^ ,          R &   RRR4       R#   + '       g   i     R# ; i)r'   rs   Nr   r   )r   r/   r3   r   ry   s   & r"   .test_detect_chained_assignment_warnings_errors;TestChaining.test_detect_chained_assignment_warnings_errors  sE    2CCD//11 BFF1IcN 2111s   AA#	rhsc                    \        \        P                  ! ^4      P                  ^^4      4      pVP	                  4       pVP
                  R,          pW^&   \        P                  ! W#4       R# )   r   N)r   r   r   rl   r2   r   r/   r0   )r   r   r!   r_   chaineds   &&   r"   1test_detect_chained_assignment_warning_stacklevel>TestChaining.test_detect_chained_assignment_warning_stacklevel  sP     ryy},,Q23ggi&&*

b.r%   c           	     :   \        R ^\        P                  ! ^4      .,          R^\        P                  ! ^4      .,          /4      pVR ,          P                  ^,          pVP
                  R,          p\        P                  ! W24       VP                  ^,          R ,          p\        P                  ! WB4       VR ,          P
                  ^,          p\        P                  ! WR4       VR ,          P                  ^,          p\        P                  ! Wb4       R# )r'   rs   N)r   r'   )r   r   zerosonesrZ   r   r/   assert_numpy_array_equal)r   r!   r4   r`   result2result3result4s   &      r"   test_chained_getitem_with_lists,TestChaining.test_chained_getitem_with_lists'  s    
 Q"((1+.Q"''!*5EFGc7<<?
##F5''!*S/
##G6S'++a.
##G6S',,q/
##G6r%   c                2   \        \        P                  ! R4      \        \	        R4      \
        R7      R7      pVR,           VP                  ^ ,          VP                  R&   RVR,          P                  9   g   Q hRVR,          P                  9   g   Q hR# )	r   ABCDrr   r   r'   zHello Friendrs   Nr   )	r   r   r   r   rm   r   rZ   r   r(   ry   s   & r"   test_cache_updating TestChaining.test_cache_updating7  ss     HHW$v,f5
 	3!#~C...C...r%   c                l   \        \        P                  ! RRR7      . R	O\        ^4      R7      p^ VR&   VP	                  4       p\
        P                  ! \        RR7      ;_uu_ 4        ^VP                  P                  ^&   RRR4       \        P                  ! W4       R#   + '       g   i     L(; i)
r   rg   rr   )rh   r(   r   z	read-onlyr   N)r   r   r   )r   r   r   rt   r2   rB   r   
ValueErrorr   valuesr/   r0   )r   r!   df_origs   &  r"   test_cache_updating2!TestChaining.test_cache_updating2C  sx    HHV7+-(

 3'')]]:[99BDDKKN :
b* :9s   )B##B3	c           	     ~   \        R R4      ;_uu_ 4        \        R\        ^4      RR.^,          /4      pRVR&   R.\        V4      ,          p\        P
                  ! 4       ;_uu_ 4        RVR,          P                  ^ &   RRR4       VP                  V,           \        P
                  ! 4       ;_uu_ 4        R	VR,          P                  ^ &   RRR4       VR,          P                  ^ ,          R8X  g   Q h RRR4       R#   + '       g   i     L; i  + '       g   i     LO; i  + '       g   i     R# ; i)
rd   Naabbg@r   ccTgp=
ף?g333333?)r	   r   rt   r   r/   r3   rZ   )r   r!   cks   &  r"   $test_iloc_setitem_chained_assignment1TestChaining.test_iloc_setitem_chained_assignmentP  s    0$77D%(D3%!)<=BBtH#b'!B3355#'4a  6 GGBK3355#'4a  6 d8==#s*** 87 65 65 877s<   AD++D	8D+:D	)D+DD+D(#D++D<	c                `   \        R . RO/4      p\        P                  ! 4       ;_uu_ 4        ^(VR ,          P                  ^&   RRR4       \        P                  ! V\        R . RO/4      4       \        P
                  ! VR ,          \        . ROR R7      4       R#   + '       g   i     La; i)r   N)name)r         )r   r/   r3   r   r0   r1   r   ry   s   & r"   'test_getitem_loc_assignment_slice_state4TestChaining.test_getitem_loc_assignment_slice_statec  st    \*+//11BsGKKN 2
b)S,,?"@A
r#w|#(FG 21s   BB-	r=   N)r   r   r   r   ) r>   r?   r@   rA   ra   rB   rC   arm_slowro   rv   rz   r   r   r   r   r   r   r   r   r   r   r   rD   r   r   r   r   r   r   r  rE   rF   rG   s   @r"   rJ   rJ   J   s    %0N [[3 3 [[/ / [[
  
  [[" " [[/ / [[  [[Q Q [[9 9 [[  [[/ / [[# #,	/#!
 [[UQ	1l2C(D$EF/ G/7 
/++&H Hr%   rJ   )stringr   numpyr   rB   pandasr   r   r   r   r   r   r	   pandas._testing_testingr/   r   rJ   r=   r%   r"   <module>r	     s9          58 58p_H _Hr%   