+
    xȇi;                     l    ^ RI t^ RIt^ RIHt ^ RIHu Ht ^ RI	H
t
HtHtHt ^ RIHt  ! R R4      tR# )    N)using_string_dtype)	DataFrameNaTSeries
date_rangec                     a  ] tR t^t o R tR tR tR t]P                  P                  ]! 4       RR7      R 4       tR tR	 tR
 tR tR tR tR t]P                  P)                  R]P*                  ! R^ RR7      ]P*                  ! R^ RR7      ]P*                  ! R^RR7      .4      R 4       tR t]P                  P)                  RR]P*                  ! R]P2                  ! R4      R7      .4      R 4       tR tR  tR! tR" tR# tR$ t ]P                  P)                  RR5R6.4      R% 4       t!]P                  P)                  R&RR.4      ]P                  P)                  R'. R7O4      R( 4       4       t"R) t#R* t$]P                  P)                  R+R,R-]P*                  ! R.]P2                  ! R/4      R7      ]P*                  ! R0]P2                  ! R/4      R7      .4      R1 4       t%]P                  P)                  R+. R8O4      R2 4       t&R3t'V t(R4# )9TestDataFrameInterpolatec                   \        \        R 4      \        R4      \        R4      .4      pVP                  P                  R8X  g   Q hVP                  4       p\        V^ ,          V^ ,          R,          V^,          .4      p\        P                  ! W#4       VP                  4       pVP                  4       pVP                  4       p\        P                  ! W#4       R# )z1+1jnanz2+2jc      ?N)
r   complexfloatdtypekindinterpolatetmassert_series_equalto_frameassert_frame_equal)selfserresexpecteddfs   &    {/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/frame/methods/test_interpolate.pytest_interpolate_complex1TestDataFrameInterpolate.test_interpolate_complex   s    gfouU|WV_EFyy~~$$$oo3q63q6C<Q89
s-\\^nn$$&
c,    c                <   \        \        R ^R7      4      pVP                  4       p\        V^&   V! V4      P	                  4       pV! V4      p\
        P                  ! WE4       VP                  P                  R4      pV! V4      P	                  4       pV! VP                  P                  R4      4      p\
        P                  ! Wx4       W3^ ,          ,
          p	V! V	4      P	                  4       p
V! W"^ ,          ,
          4      p\
        P                  ! W4       R# )z
2012-01-01)periodsz
US/PacificN)	r   r   copyr   r   r   assert_equaldttz_localize)r   frame_or_seriesorigr   r   r   ser_tzres_tzexpected_tzser_tdres_tdexpected_tds   &&          r   $test_interpolate_datetimelike_values=TestDataFrameInterpolate.test_interpolate_datetimelike_values    s    jq9:iikAc"..0"4(
& ##L1 (446%dgg&9&9,&GH
, 1v (446%d!Wn5
,r   c                N   V! ^\         P                  ^.4      pVP                  pVP                  RR7      pWSJ g   Q hV! . RO4      p\        P
                  ! W64       \         P                  ! WCP                  4      '       g   Q hVP                  4       ^,          R8X  g   Q hR# )   Tinplacer   N)r1   r      )npr   valuesr   r   r#   shares_memorysqueeze)r   r&   requestobjr'   resultr   s   &&&    r   test_interpolate_inplace1TestDataFrameInterpolate.test_interpolate_inplace6   s    q"&&!n-zz.}}";/
& jj1111||~a C'''r   c                   \        R ^^\        P                  ^.R^^^	\        P                  .R. ROR\        R4      /4      pV'       d   RMRpRV R2p\        P
                  ! \        VR	7      ;_uu_ 4        VP                  4        R
R
R
4       VR,          P                  pVR,          P                  p\        P
                  ! \        VR	7      ;_uu_ 4        VP                  RR7       R
R
R
4       \        P                  ! VR,          P                  V4      '       g   Q h\        P                  ! VR,          P                  V4      '       g   Q hR
#   + '       g   i     L; i  + '       g   i     L; i)ABCDabcdstrobjectz[Cc]annot interpolate with z dtypematchNTr2   r1   r4         )r   r5   r   listpytestraises	TypeErrorr   _valuesr6   r   r7   )r   using_infer_stringr   r   msgcvaluesdvaluess   &&     r   test_interp_basic*TestDataFrameInterpolate.test_interp_basicD   s   aBFFA&aArvv&\T&\	
 ,+E7&9]]9C00NN 1 S'//S'..]]9C00NN4N( 1 3999939999 10
 10s   9EE,E)	,E<	z#interpolate doesn't work for string)reasonc                *   \        R ^^\        P                  ^.R^^^	\        P                  .R. R	OR\        R4      /4      pRpV'       gO   \        P
                  ! \        VR7      ;_uu_ 4        VP                  R4      P                  4        RRR4       R# VP                  R4      P                  4       pVP                  R4      pRVP                  R
&   ^	VP                  R&   \        P                  ! WE4       R#   + '       g   i     R# ; i)r?   r@   rA   rB   rC   .DataFrame cannot interpolate with object dtyperF   Ngh˹WU@rH   rI   r?   )rJ   r@   )r   r5   r   rK   rL   rM   rN   	set_indexr   locr   r   )r   rP   r   rQ   r;   r   s   &&    r   &test_interp_basic_with_non_range_index?TestDataFrameInterpolate.test_interp_basic_with_non_range_index[   s     aBFFA&aArvv&\T&\	
 ?!y44S!--/ 54 \\#&224F||C(H#*HLL #$HLL !!&3 544s   1 DD	c                x    \        4       pVP                  4       pW!Jg   Q hTp\        P                  ! W#4       R # )N)r   r   r   r   r   r   r;   r   s   &   r   test_interp_empty*TestDataFrameInterpolate.test_interp_emptys   s4    [!
f/r   c           	        \        R ^^\        P                  ^.R^^^	\        P                  .R. RO/4      pRp\        P                  ! \
        VR7      ;_uu_ 4        VP                  RR7       RRR4       R#   + '       g   i     R# ; i)	r?   r@   rA   z,Can not interpolate with method=not_a_methodrF   not_a_methodmethodNrH   r   r5   r   rL   rM   
ValueErrorr   r   r   rQ   s   &  r   test_interp_bad_method/TestDataFrameInterpolate.test_interp_bad_method{   so    aBFFA&aArvv&\
 =]]:S11NN.N1 2111s   A;;B	c                   \        R RR\        P                  R.R^^^	\        P                  .R. R
OR\        R4      /4      pVR ,          P	                  4       p\        . ROR R7      p\        P                  ! W#4       R	# )r?         ?       @      @r@   rA   rB   rC   )nameNrH   rl   rm         @rn   )r   r5   r   rK   r   r   r   r   r_   s   &   r   test_interp_combo*TestDataFrameInterpolate.test_interp_combo   sr    c3,aArvv&\T&\	
 C$$&.S9
v0r   c           	     8   \        R ^^\        P                  ^.R\        P                  ^^^./4      pVP                  R 4      pRp\        P
                  ! \        VR7      ;_uu_ 4        VP                  RR7       RRR4       R#   + '       g   i     R# ; i)r?   r@   zkInterpolation with NaNs in the index has not been implemented. Try filling those NaNs before interpolating.rF   r6   rd   N)r   r5   r   rZ   rL   rM   NotImplementedErrorr   rh   s   &  r   test_interp_nan_idx,TestDataFrameInterpolate.test_interp_nan_idx   sx    aBFFA.bffaA5FGH\\#; 	 ]].c::NN(N+ ;:::s   +BB	c           
     .   \         P                  ! R 4       \        R^^\        P                  ^^\        P                  ^.R. RO/4      pVP                  R4      pVP                  4       pVP                  R^R7      pRVP                  R&   RVP                  R&   \        P                  ! W24       VP                  RR7      pR	VP                  R&   R
VP                  R&   \        P                  ! W24       VP                  RR7      p^VP                  R&   ^VP                  R&   \        P                  ! W2RR7       VP                  RR7      pRVP                  R&   RVP                  R&   \        P                  ! W24       VP                  RR7      pRVP                  R&   RVP                  R&   \        P                  ! W24       VP                  RR7      pRVP                  R&   ^VP                  R&   \        P                  ! W2RR7       R# )scipyr?   rA   
polynomialre   ordergUUU@gu:@cubicrd   gv:@gb+hZ@nearestF)check_dtype	quadraticg^r@g!g@slineargX ;@zerorm   Nr1   r4   rI   rJ            rY   )r   r?   )rL   importorskipr   r5   r   rZ   r"   r   r[   r   r   r   r   r   r;   s   &   r   test_interp_various,TestDataFrameInterpolate.test_interp_various   s   G$1aArvvq138OP
 \\#779|1=)V *W
f/w/)V *W
f/y1 V !W
fEB{3)V *W
f/y1)V *W
f/v."V !W
fEBr   c           
     Z   \         P                  ! R 4       \        R^^\        P                  ^^\        P                  ^.R. R	O/4      pVP                  RR7      pVP                  4       p^VP                  R
&   ^VP                  R&   \        P                  ! W#4       VP                  RR7      pVP                  4       pVR,          VR&   \        P                  ! W$4       VP                  RR7      p^VP                  R
&   RVP                  R&   \        P                  ! W#4       R# )ry   r?   rA   barycentricrd   kroghpchip      @Nr   )r4   r?   )rJ   r?   )
rL   r   r   r5   r   r   r"   r[   r   r   )r   r   r;   r   	expectedks   &    r   test_interp_alt_scipy.TestDataFrameInterpolate.test_interp_alt_scipy   s    G$1aArvvq138OP
 }5779 V V
f/w/GGI	!#	#
f0w/ V"V
f/r   c                   \        ^ ^^\        P                  ^.^^^^\        P                  .^\        P                  ^^^.^^\        P                  ^^.^. RO/4      pVP                  ^R7      pVP	                  4       p^VP
                  R&   ^VP
                  R&   ^VP
                  R&   V^,          P                  \        P                  4      V^&   \        P                  ! W#4       VP                  ^RR7      p\        P                  ! W#4       VP                  ^ R7      pVP                  4       p\        P                  ! W#4       R# )	r   axisr6   r   re   Nr1   r4   rI      )rI   r1   )r   r4   )r1   rI   )
r   r5   r   r   r"   r[   astypefloat64r   r   r_   s   &   r   test_interp_rowwise,TestDataFrameInterpolate.test_interp_rowwise   s   Aq"&&!$Aq!RVV$BFFAq!$Arvvq!$<
 Q'779TTTqk((4
f/Qx8
f/Q'>>#
f/r   zaxis_name, axis_numberrowsrows_0)idindexindex_0columns	columns_1c                   ^ ^ \         P                  ^.^^\         P                  ^.^. RO/p\        V\         P                  R7      pVP	                  VRR7      pVP	                  VRR7      p\
        P                  ! WV4       R# )r   r   linearr   N)r4   rJ   r   )r5   r   r   r   r   r   r   )r   	axis_nameaxis_numberdatar   r;   r   s   &&&    r   test_interp_axis_names/TestDataFrameInterpolate.test_interp_axis_names   sl     Arvvq>1q"&&!naCt2::.Yx@>>{8>D
f/r   c                    \        ^ ^ RR\        P                  ^^\        P                  \        P                  ^@.	^. RO/4      pVP                  ^ R7       R# )r         ?rl   r   N)	r1   r4   rI   r   rI   r4   r1   r   )r   r5   r   r   )r   r   s   & r   test_rowwise_alt)TestDataFrameInterpolate.test_rowwise_alt  sK    AsCArvvrvvrB/
 	Ar   check_scipyFTry   )marksc           
        \        R \        P                  \        P                  RR^ .R\        P                  RR\        P                  R	./4      pVP                  4       pVP	                  4       pR
VP
                  R&   \        P                  ! W44       V'       d,   VP                  R^R7      p\        P                  ! W44       R# R# )r?   r   g      ?r@   rz   r{   Ng      g      )rI   r@   )r   r5   r   r   r"   r[   r   r   )r   r   r   r;   r   s   &&   r   test_interp_leading_nans1TestDataFrameInterpolate.test_interp_leading_nans  s     2662663a0#D"&&RT7UV
 !779$V
f/^^<q^AF!!&3 r   c                   \        R ^^\        P                  ^.R. R
OR\        P                  ^^^.R\        P                  \        P                  ^	^	.R. RO/4      pRp\        P                  ! \
        VR7      ;_uu_ 4        VP                  R4      P                  VR7       R	R	R	4       R	#   + '       g   i     R	# ; i)r?   r@   rA   rB   ErX   rF   rE   r   N)abr   dr   )r   r5   r   rL   rM   rN   r   r   )r   r   r   rQ   s   &&  r   test_interp_raise_on_only_mixed8TestDataFrameInterpolate.test_interp_raise_on_only_mixed   s    aBFFA&)bffaA&bffbffa+\
 ?]]9C00IIh+++6 1000s   "B00C	c                    \        R . ROR. RO/RR7      pRp\        P                  ! \        VR7      ;_uu_ 4        VP	                  4        RRR4       R#   + '       g   i     R# ; i)	r?   r@   rE   r   rX   rF   N)r1   r4   rI   )r   rJ      )r   rL   rM   rN   r   rh   s   &  r   %test_interp_raise_on_all_object_dtype>TestDataFrameInterpolate.test_interp_raise_on_all_object_dtype.  sF    YY7xH>]]9C00NN 1000s   AA(	c                   \        R RR\        P                  R./4      pVP                  4       pVP                  4       P	                  4       p\
        P                  ! 4       ;_uu_ 4        VR ,          P	                  RR7      pRRR4       \
        P                  ! XVR ,          4       \
        P                  ! W4       R#   + '       g   i     LF; i)r   rl   rm   rn   Tr2   N)	r   r5   r   r"   r   r   raises_chained_assignment_errorr   r   )r   r   df_origr   r;   s   &    r   test_interp_inplace,TestDataFrameInterpolate.test_interp_inplace5  s    c3456'')779((*//11W(((6F 2
vx}5
b* 21s   +CC	c           	         \        R . ROR\        P                  RRR.R. RO/4      pVP                  R^RR7      pVP                  R^R	R7      pW1J g   Q h\        P
                  ! W24       R
# )r   rm   rq   rn   r   r   r   F)re   r   r3   TNrp   )rI   r4   r4   r4   )r   r5   r   r   r   r   r   s   &   r   test_interp_inplace_row0TestDataFrameInterpolate.test_interp_inplace_row?  sl    &bffc3-Dc<X
 >>5>IxaF||
f/r   c                   \        R ^^\        P                  ^.R. RORRR\        P                  R.R. RO/4      p\        R \        P                  ! . RORR7      R\        P                  ! . ROR	R7      R\        P                  ! . RORR7      R\        P                  ! . RORR7      /4      pVP	                  4       p\
        P                  ! W24       VRR.,          P	                  4       p\
        P                  ! W1RR.,          4       R
# )r?   r@   rA   rl   rm   rn   rB   r   r   int64Nr   rp   )rl   rm   rI   rn   )r   r5   r   arrayr   r   r   r   s   &   r   test_interp_ignore_all_good4TestDataFrameInterpolate.test_interp_ignore_all_goodI  s    aBFFA&\c3,)	
 RXXl)<RXXl':RXX0	BRXX2)D	
 !
f/ S#J++-
f#sn5r   c                N   ^p\        RVR7      p\        P                  P                  ^4      P                  W34      p\        P                  W3R8  &   \        W"VR7      pVP                  ^ RR7      pVP                  ^ RRR7      pWdJ g   Q h\        P                  ! We4       R	# )
rJ   z
2014-01-01)startr!   r   )r   r   r   timer   T)r   re   r3   N)	r   r5   randomdefault_rngr   r   r   r   r   )r   r!   idxr   r   r   r;   s   &      r   test_interp_time_inplace_axis6TestDataFrameInterpolate.test_interp_time_inplace_axisb  s    |W=yy$$Q'../AB66CZSD9>>q>8QvtD||
f/r   c                v   \         P                  ! ^ ^d^4      p\         P                  ! V4      p\        \         P                  ! VR4      \         P
                  ! ^
4      VR7      P                  VR,          R7      pVP                  RVR7      pVP                  RVR7      p\        P                  ! Wg4       R# )r   )r   r   r   gGz?)r   r   re   r   N)
   r1   )
r5   linspacesinr   tilearangereindexr   r   r   )r   r   r   xyr   r;   r   s   &&&     r   test_interp_string_axis0TestDataFrameInterpolate.test_interp_string_axiso  s     KK3"FF1IG$BIIbM1

'!e)'
$ 	 xi@>>>D
f/r   
multiblockre   c                   \        R RRRR\        P                  R.RRRR\        P                  RR	.R
RRR\        P                  \        P                  R./4      pV'       d   \        P                  VR&   RVR&   RV 2p\        P                  ! \
        VR7      ;_uu_ 4        VP                  W1R7       RRR4       R#   + '       g   i     R# ; i)r?   rl   rm   rq   rn   g      @r@   r   g       @g      $@rA   g      "@g      >@rB   r   z Can not interpolate with method=rF   r   Nrf   )r   r   r   re   r   rQ   s   &&&&  r   test_interp_fillna_methods3TestDataFrameInterpolate.test_interp_fillna_methods{  s     c3S"&&#6c3RVVS$7c3RVVRVVT:
 ffBsGBsG09]]:S11NN&N4 2111s   %CC	c                    \        4       pVP                  4       pVP                  R R7      pW1J g   Q h\        P                  ! W24       R# )Tr2   Nr   r"   r   r   r   r   s   &   r   test_interpolate_empty_df2TestDataFrameInterpolate.test_interpolate_empty_df  s<    [779-||
f/r   c                    \        R . RO/VR7      pVP                  4       pVP                  ^R7      p\        R . RO/RR7      p\        P                  ! WE4       \        P                  ! W#4       R# )r   Nr   limitFloat64r1   NNNrI   r1   r   rm   NrI   r   )r   any_int_ea_dtyper   r'   r;   r   s   &&    r   test_interpolate_ea,TestDataFrameInterpolate.test_interpolate_ea  s^    56>NOwwya(c#9:)L
f/
b'r   r   r   Float32zfloat32[pyarrow]pyarrowfloat64[pyarrow]c                    \        R . RO/VR7      pVP                  4       pVP                  ^R7      p\        R . RO/VR7      p\        P                  ! WE4       \        P                  ! W#4       R# )r   Nr   r   r   r   r   )r   r   r   r'   r;   r   s   &&    r   test_interpolate_ea_float2TestDataFrameInterpolate.test_interpolate_ea_float  s_     56eDwwya(c#9:%H
f/
b'r   c                    \         P                  ! R 4       \        R. RO/VR,           R7      pVP                  ^R7      p\        R. RO/RR7      p\        P
                  ! W44       R# )	r   r   Nz	[pyarrow]r   r   r   r   r   )rL   r   r   r   r   r   )r   r   r   r;   r   s   &&   r   test_interpolate_arrow/TestDataFrameInterpolate.test_interpolate_arrow  sZ     	I&56ek>QRa(c#9:BTU
f/r    N)r   r   )r   r1   )ffillbfillpad)r   uint64int32int16int8uint32uint16uint8))__name__
__module____qualname____firstlineno__r   r.   r<   rT   rL   markxfailr   r\   r`   ri   rr   rv   r   r   r   parametrizeparamr   r   td
skip_if_nor   r   r   r   r   r   r   r   r   r   r   r   r   __static_attributes____classdictcell__)__classdict__s   @r   r	   r	      s2    --,(:. [[%J  44*0
21,%CN0,02 [[ LLx0LL!	2LLA+6	
00 [[v||Dg8NOP447+0620 [[5n7UV	0 W	0 [[\D%=9[[X'@A5 B :5"0( [[LL+2==3KLLL+2==3KL		
(( [[R0	0r   r	   )numpyr5   rL   pandas._configr   pandas.util._test_decoratorsutil_test_decoratorsr  pandasr   r   r   r   pandas._testing_testingr   r	   r   r   r   <module>r     s/      - ) )  j0 j0r   