+
    yȇi&                         R t ^ RIHt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 lt ! R R4      t ! R R4      tR	 tR
 t]P,                  P/                  R4      R 4       t ! R R4      tR# )z*test scalar indexing, including at and iat)datetime	timedeltaN)	DataFrameIndexSeries	Timedelta	Timestamp
date_rangec                d    V P                   pV'       d
   R V 4       p\        P                  ! V!  # )zV
generate the indices
if values is True , use the axis values
is False, use the range
c              3   \   "   T F"  p\        \        \        V4      4      4      x  K$  	  R # 5i)N)listrangelen).0axs   & q/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/indexing/test_scalar.py	<genexpr>#generate_indices.<locals>.<genexpr>   s      4tU3r7^$$ts   *,)axes	itertoolsproduct)fvaluesr   s   && r   generate_indicesr      s+     66D4t4d##    c                   P  a  ] tR t^$t o ]P
                  P                  R]P                  ]P                  .4      R 4       t
]P
                  P                  R]! ]! R4      ]R7      ]! R^R7      ]! ]! ^ ^^4      ]P                   R7      .4      R 4       t]P
                  P                  R]! ]! R4      ]R7      ]! R^R7      ]! ]! ^ ^^4      ]P                   R7      ]! ]! ^ ^^4      ]P                  R7      ]! ]! ^ ^^4      ]P                  R7      .4      R	 4       tR
tV tR# )
TestScalardtypec                    V! \        ^4      \        . ROVR7      R7      p\        VR4      pV F<  p^VP                  V&   VP                  V,          p\
        P                  ! V^4       K>  	  R# )   r   indexTN)          )r   r   r   iatr   tmassert_almost_equal)selfr   frame_or_seriesr   indicesiexpecteds   &&&    r   test_iat_set_intsTestScalar.test_iat_set_ints%   sY    E!HE)5,IJ"1d+AAEE!Hxx{H""8Q/ r   r"   abcdr    20130101periodsc                   V! \        \        V4      4      VR 7      pRp\        \        VR4      4      p\        P
                  ! \        VR7      ;_uu_ 4        ^VP                  V&   RRR4       R#   + '       g   i     R# ; i)r!   z1iAt based indexing can only have integer indexersFmatchN)r   r   nextr   pytestraises
ValueErrorr&   )r)   r"   r*   r   msgidxs   &&&   r   test_iat_set_otherTestScalar.test_iat_set_other.   s]     E#e*-U;A#Au-.]]:S11AEE#J 2111s   A22B	c                    V! \        \        V4      4      VR 7      p\        VR4      pV F<  p^VP                  V&   VP                  V,          p\
        P                  ! V^4       K>  	  R# )r!   FN)r   r   r   atlocr'   r(   )r)   r"   r*   r   r+   r,   r-   s   &&&    r   test_at_set_ints_other!TestScalar.test_at_set_ints_other=   sY     E#e*-U;"1e,AADDGuuQxH""8Q/ r    N)__name__
__module____qualname____firstlineno__r8   markparametrizenpint64uint64r.   r   r   objectr	   r   float64r=   rB   __static_attributes____classdictcell____classdict__s   @r   r   r   $   s    [[Wrxx&;<0 =0 [[$v,f-z1-%1a.

3	
 [[$v,f-z1-%1a.

3%1a.		2%1a.1	
	0	0r   r   c            	          a  ] tR t^Pt o R tR t]P                  P                  R]	! RR.RR7      ]
! R4      .]	! RR	.R
R7      ]! R	4      ..4      R 4       tR tR tR tR tR tR tRtV tR# )TestAtAndiATc                   \        . RO. ROR7      pVP                  4        F  w  r#VP                  V,          V8X  d   K  Q h	  \        \	        V4      4       F$  pVP
                  V,          V^,           8X  d   K$  Q h	  R# )r$   r!   N)r$   r%   r   )g?g?g333333?)r   itemsr@   r   r   r&   )r)   serelitemr,   s   &    r   test_float_index_at_iat$TestAtAndiAT.test_float_index_at_iatS   sb    Yo6		HB66":%%% $s3xA771:Q&&& !r   c                   \        R ^R7      p\        \        P                  P	                  ^4      P                  R4      V. ROR7      pVR,          pVP                  V^,          ,          pVP                  ^,          pWE8X  g   Q hR# )z1/1/2000r2   A)r"   columnsN)      )r^   BCD)r	   r   rK   randomdefault_rngstandard_normalr@   r   )r)   datesdfsresultxps   &     r   test_at_iat_coercion!TestAtAndiAT.test_at_iat_coercionZ   sn    :q1II!!!$44V<(

 sGeAhXXa[||r   zser, expectedz
2014-01-01z
2014-02-02zdatetime64[ns]r    z1 daysz2 daysztimedelta64[ns]c                4    V! V4      ^,          pWC8X  g   Q hR# )r$   NrD   )r)   indexer_ialrX   r-   rk   s   &&&& r   test_iloc_iat_coercion_datelike,TestAtAndiAT.test_iloc_iat_coercion_datelikeh   s      S!!$!!!r   c                >   \        \        ^4      . R	ORR7      pVP                  ^,          pV^8X  g   Q hVP                  ^,          pV^8X  g   Q hRp\        P
                  ! \        VR7      ;_uu_ 4        VP                  ^
,           RRR4       Rp\        P
                  ! \        VR7      ;_uu_ 4        VP                  R
,           RRR4       VP                  ^^.,          p\        ^^.^^.RR7      p\        P                  ! W$4       VP                  4       pVP                  ^,          p\        ^^ .^R7      p\        P                  ! W$4       VP                  R,          pV^8X  g   Q hR#   + '       g   i     L; i  + '       g   i     L; i)   rL   )r"   r   z0index 10 is out of bounds for axis 0 with size 5r5   Nz1index -10 is out of bounds for axis 0 with size 5r    r"   name)r$   r$   r%   r%   r   i)r%   r#   )
r   r   ilocr&   r8   r9   
IndexErrorr'   assert_series_equalto_frame)r)   rj   rk   r;   r-   ri   s   &     r   test_imethods_with_dups$TestAtAndiAT.test_imethods_with_dups{   s,    58?'B{{q{{@]]:S11EE"I 2A]]:S11EE#J 2 A1a&1a&8
v0ZZ\!A3Q/
v0{{! 21 21s   8E9:F9F		F	c                ,   \         P                  P                  ^4      P                  ^4      P	                  ^^4      p\        VRR.R7      pVP                  R,          pVP                  ^ ,          P                  4       p\        P                  ! W44       VP                  P                  R,          p\        P                  ! W44       ^VP                  R&   \        RR.RR.^R7      p\        P                  ! VP                  ^,          V4       R# )	r%   r^   r_   g       @ru   Nr#   r^   )r^   r#   )r$   r^   )rK   re   rf   rg   reshaper   r@   rw   copyr'   ry   Tr   )r)   arrri   rk   r-   s   &    r   !test_frame_at_with_duplicate_axes.TestAtAndiAT.test_frame_at_with_duplicate_axes   s    ii##A&66q9AA!QGsS#J/v771:??$
v0
v0 f3*S#JQ?
rwwqz84r   c                4   \        R RR.R\        R^^^^ ^84      \        R^^^^
^4      ./4      pVR,          P                  P                  R4      VR&   \        RRR7      pVP                  R	,          pW28X  g   Q hVP
                  R	,          pW28X  g   Q hR# )
rv   JohnAndersondatei  zAsia/Shanghaiz2017-03-13 13:32:56+0800)tzN)r#   r   )r   r   dttz_localizerA   r@   )r)   ri   r-   rk   s   &   r   test_at_getitem_dt64tz_values*TestAtAndiAT.test_at_getitem_dt64tz_values   s    ,dAr2r26dAr2r15
 Z]]..?6
7OL	"!!!y!!!!r   c                   \        . RO. ROR7      pVP                  4        F;  w  r#VP                  V,          VP                  V,          u;8X  d   V8X  d   K8  Q h Q h	  \	        \        V4      4       F@  pVP                  V,          VP                  V,          u;8X  d   V^,           8X  d   K=  Q h Q h	  \        P                  ! \        R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     LR; i  + '       g   i     R# ; i)r$   r!   z^4$r5   N)r$   r%   r   ra   rt   abcr$   r%   )r   rW   r@   rA   r   r   r&   rw   r8   r9   KeyError)r)   rj   rY   rZ   r,   s   &    r   'test_mixed_index_at_iat_loc_iloc_series4TestAtAndiAT.test_mixed_index_at_iat_loc_iloc_series   s    ?*?@	HB448quuRy0D00000 "s1vA558qvvay1AE11111  ]]8511DDG 2]]8511EE!H 21 21111s   D;E;E	E	c                &   \        . RO. RO.. ROR7      pVP                  4        FV  w  r#VP                  4        F=  w  rEVP                  W$3,          VP                  W$3,          u;8X  d   V8X  d   K:  Q h Q h	  KX  	  \        ^4       F[  p\        ^4       FI  pVP                  W63,          VP                  W63,          u;8X  d   V^,          V,           8X  d   KF  Q h Q h	  K]  	  \        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     LR; i  + '       g   i     R# ; i)	r#   r~   z^3$r5   N)r#   r$   r%   r   ra   )rt         r`   	   r   )r#   r   )r   iterrowsrW   r@   rA   r   r&   rw   r8   r9   r   )r)   ri   rowIdxrowrY   rZ   r,   s   &      r   *test_mixed_index_at_iat_loc_iloc_dataframe7TestAtAndiAT.test_mixed_index_at_iat_loc_iloc_dataframe   s   o.8M
 ;;=KFIIKuuVZ(BFF6:,>F$FFFFF ( ) 8C1Xvvcf~GC!GaKGGGGG   ]]8511EE$K 2]]8511FF4L 21 21111s   E,E?,E<	?F	c                    \        R RR.R^^./4      pRVP                  R&   \        R R^.R^^./4      p\        P                  ! W4       R# )r   g        g      ?r   Nr#   r#   )r   r&   r'   assert_frame_equal)r)   rk   r-   s   &  r   'test_iat_setter_incompatible_assignment4TestAtAndiAT.test_iat_setter_incompatible_assignment   sT    C#sS1a&9:

4cD!9cAq6:;
f/r   rD   N)rE   rF   rG   rH   r[   rm   r8   rI   rJ   r   r   r   rq   r{   r   r   r   r   r   rP   rQ   rR   s   @r   rU   rU   P   s     ' [[ l3;KL,'
 (+3DE(#		
"":5$"*$0 0r   rU   c                  X   \        R ^R7      p W ,
          p\        V P                  4       \        R7      p\        VP	                  4       \        R7      p\        RVRV/4      pVP                  \        8H  P                  4       '       g   Q hVP                  R,          VP                  R,          VP                  R,          VP                  R,          3 FA  pWR^ ,          J g   Q h\        V\        4      '       g   Q h\        V\        4      '       g   KA  Q h	  VP                  R,          VP                  R	,          VP                  R,          VP                  R	,          3 FA  pWS^,          J g   Q h\        V\        4      '       g   Q h\        V\         4      '       g   KA  Q h	  R# )
z
2016-01-01r2   r    r^   rb   Nr   r   )r$   rb   )r$   r$   )r	   r   to_pydatetimerN   to_pytimedeltar   dtypesallr@   r&   rA   rw   
isinstancer   r   r   r   )dtitdirX   ser2ri   rk   s         r   &test_iat_dont_wrap_object_datetimeliker      sH    \1
-C
)C
""$F
3C#$$&f5D	Cc4(	)BII$$&&&&55="&&,vNQ&(++++fi0000 O
 55="&&,vNa   &),,,,fi0000 Or   c                     \        R ^^./RR.R7      p V P                  P                  ^8X  g   Q hV P                  R,          ^8X  g   Q hV R ,          pVP                  P                  ^8X  g   Q hVP                  R,          ^8X  g   Q hR# r   r!   Nr$   r%   )r   ra   )r   r   r   r"   nlevelsr@   ri   seriess     r   test_at_with_tuple_index_getr      s     
C!Q=(8	9B88q   55""" WF<<1$$$99V!!!r   .ignore:Setting a value on a view:FutureWarningc                  V   \        R ^^./RR.R7      p V P                  P                  ^8X  g   Q h^V P                  R&   V P                  R,          ^8X  g   Q hV R ,          pVP                  P                  ^8X  g   Q h^VP                  R&   VP                  R,          ^8X  g   Q hR# r   r   r   s     r   test_at_with_tuple_index_setr     s     
C!Q=(8	9B88q   BEE+55""" WF<<1$$$FIIdO99T?ar   c                   n   a  ] tR tRt o R t]P                  P                  R4      R 4       tR t	Rt
V tR# )TestMultiIndexScalari  c                   \        R ^^./^^.^^..R7      pVP                  P                  ^8X  g   Q hVP                  R,          ^8X  g   Q hVP                  R,          ^8X  g   Q hVR ,          pVP                  P                  ^8X  g   Q hVP                  R,          ^8X  g   Q hVP                  R,          ^8X  g   Q hR# r   r!   Nr$   r   )r   r   r   r"   r   r@   rA   r)   ri   r   s   &  r   test_multiindex_at_get+TestMultiIndexScalar.test_multiindex_at_get  s     aV}aVaV,<=xx1$$$uu[!Q&&&vvk"a''' C||##q(((yy!###zz$1$$$r   r   c                   \        R ^^./^^.^^..R7      pVP                  P                  ^8X  g   Q h^VP                  R&   VP                  R,          ^8X  g   Q h^VP                  R&   VP                  R,          ^8X  g   Q hVR ,          pVP                  P                  ^8X  g   Q h^VP                  R&   VP                  R,          ^8X  g   Q h^VP                  R&   VP                  R,          ^8X  g   Q hR# r   r   r   s   &  r   test_multiindex_at_set+TestMultiIndexScalar.test_multiindex_at_set'  s     aV}aVaV,<=xx1$$$kuu[!Q&&&{vvk"a''' C||##q(((		$yy!###

4zz$1$$$r   c                ^    \        RRR..R7      pVP                  R,          pV^ 8X  g   Q hR# )r#   FTr!   N)r#   r$   )r   r@   )r)   s2rk   s   &  r    test_multiindex_at_get_one_level5TestMultiIndexScalar.test_multiindex_at_get_one_level:  s-    FE4=/2u{{r   rD   N)rE   rF   rG   rH   r   r8   rI   filterwarningsr   r   rP   rQ   rR   s   @r   r   r     s9     % [[ PQ% R%$ r   r   )F)__doc__r   r   r   numpyrK   r8   pandasr   r   r   r   r   r	   pandas._testing_testingr'   r   r   rU   r   r   rI   r   r   r   rD   r   r   <module>r      s}    0     
$)0 )0XS0 S0l1*
" LM  N & &r   