+
    xȇi,                        R t ^ RIHt ^ RIt^ RIt^ RIHtHtH	t	 ^ RI
Ht ]P                  P                  R4      t]P                  P!                  R4      t]P                  P!                  R4      t]P                  P'                  RRR	.4      R
 4       tR tR t]R 4       t]]P                  P'                  RRR. R,O/3R	R. R,O/3^ RRR.R]! . RR7      /3^RRR.R]! . RR7      /3RRRR.R]! . RR7      /3RRRR.R]! . RR7      /3^ ^.RR.R]	P0                  ! . .^,          RR.R7      /3RR.RR.R]	P0                  ! . .^,          RR.R7      /3^^ .RR.R]	P0                  ! . .^,          RR.R7      /3RR.RR.R]	P0                  ! . .^,          RR.R7      /3.
4      R 4       4       t]R 4       t]P                  P'                  RRR.RR.RR.RR.RR..4      R 4       t]R 4       t]R  4       t]R! 4       t]P                  P>                  R" 4       t ]R# 4       t!]R$ 4       t"]R% 4       t#]R& 4       t$]R' 4       t%]P                  P'                  R(]&R)3R-.4      R* 4       t']R+ 4       t(R# ).z
Tests that the specified index column (a.k.a "index_col")
is properly handled or inferred during parsing for all of
the parsers defined in parsers.py
)StringION)	DataFrameIndex
MultiIndexz=ignore:Passing a BlockManager to DataFrame:DeprecationWarningpyarrow_xfailpyarrow_skipwith_headerTFc                    T pR pRpV'       dh   WC,           pVP                  \        V4      RR7      pVP                  \        V4      ^ R7      P                  R4      p\        P                  ! Wg4       R# TpRp\
        P                  ! \        VR7      ;_uu_ 4        VP                  \        V4      RR7       RRR4       R#   + '       g   i     R# ; i)a  KORD1,19990127, 19:00:00, 18:56:00, 0.8100, 2.8100, 7.2000, 0.0000, 280.0000
KORD2,19990127, 20:00:00, 19:56:00, 0.0100, 2.2100, 7.2000, 0.0000, 260.0000
KORD3,19990127, 21:00:00, 20:56:00, -0.5900, 2.2100, 5.7000, 0.0000, 280.0000
KORD4,19990127, 21:00:00, 21:18:00, -0.9900, 2.0100, 3.6000, 0.0000, 270.0000
KORD5,19990127, 22:00:00, 21:56:00, -0.5900, 1.7100, 5.1000, 0.0000, 290.0000
KORD6,19990127, 23:00:00, 22:56:00, -0.5900, 1.7100, 4.6000, 0.0000, 280.0000zBID,date,NominalTime,ActualTime,TDew,TAir,Windspeed,Precip,WindDir
ID	index_colheaderzIndex ID invalidmatchN)read_csvr   	set_indextmassert_frame_equalpytestraises
ValueError)	all_parsersr   parser	no_headerr   dataresultexpectedmsgs	   &&       u/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/io/parser/test_index_col.pytest_index_col_namedr       s    FQI SF!$4@??8D>!?<FFtL
f/ ]]:S11OOHTNdO; 2111s   CC	c                     T pR p\        R. R
OR. ROR. ROR. RO/\        . RORR7      R7      p. ROpVP                  \        V4      VR.R7      p\        P
                  ! WS4       R	# )z+1,2,3,4,hello
5,6,7,8,world
9,10,11,12,foo
abcdmessagenameindex)namesr   N)      	   )      
   )         )         )helloworldfoo)r"   r#   r$   r%   r&   )r   r   r   r   r   r   )r   r   r   r   r+   r   s   &     r   test_index_col_named2r;   5   sh    FD 	ij#z3
K-I>H ,E__Xd^5YK_PF&+    c                     R pT pRp\         P                  ! \        VR7      ;_uu_ 4        VP                  \	        V4      RR7       RRR4       R#   + '       g   i     R# ; i)za,b
1,2z)The value of index_col couldn't be 'True'r   Tr   N)r   r   r   r   r   )r   r   r   r   s   &   r   test_index_col_is_truer>   G   sE    DF
5C	z	-	-$7 
.	-	-	-s   AA#	c                     R pT pVP                  \        V4      4      p\        . RO. RO. RO.. RO. ROR7      p\        P                  ! W44       R# )z$A,B,C
foo,1,2,3
bar,4,5,6
baz,7,8,9
r*   columnsN)r,   r/   r2   )r5   r-   r0   )r3   r6   r.   )r:   barbaz)ABCr   r   r   r   r   r   r   r   r   r   s   &    r   test_infer_index_colrI   Q   sL    D
 F__Xd^,F	Iy)#H
 &+r<   zindex_col,kwargsrA   xyzr*   r'   r+   c                     R pT pVP                  \        V4      VR7      p\        R/ VB p\        P                  ! WV4       R# )zx,y,zr   N rG   )r   r   kwargsr   r   r   r   s   &&&    r   test_index_col_empty_datarQ   c   s@    R DF__Xd^y_AF"6"H&+r<   c                     R pT pVP                  \        V4      RR7      p\        RR.R7      p\        P                  ! W44       R# )zx,yFr   rJ   rK   rA   NrG   rH   s   &    r   test_empty_with_index_col_falserT      s@     DF__Xd^u_=F#s,H&+r<   index_names r:   rB   NotReallyUnnamedz
Unnamed: 0c                    T pVP                   R 8X  d9   RV9   d2   \        P                  P                  RR7      pVP	                  V4       RP                  . VORN4      pVP                  \        V4      ^ ^.R7      p\        R. RO/\        P                  ! RR	.R
R..4      R7      pV Uu. uF  q'       d   TMRNK  	  upVP                  n        \        P                  ! Wg4       R# u upi )pyarrowrV   z!One case raises, others are wrongreason,zcol
a,c,1
a,d,2
b,c,3
b,d,4r   colr"   r#   r$   r%   r)   Nr,   r/   r2   r5   )enginer   markxfailapplymarkerjoinr   r   r   r   from_productr*   r+   r   r   )	r   rU   requestr   r`   r   r   r   r(   s	   &&&      r   test_multi_index_namingrf      s     F}}	!bK&7{{  (K LD! 88EkE#DEFD__Xd^1v_>F	Z%<%<sCj3PS*=U%VH @KK{tDDd2{KHNN&+ Ls   .C,c           	          T pR pVP                  \        V4      ^ ^.R7      p\        R. RO/\        RR.. R	O.. R
O. RO.R7      R7      p\        P
                  ! W44       R# )z$,Unnamed: 2,
a,c,1
a,d,2
b,c,3
b,d,4r   z
Unnamed: 2r"   r#   )levelscodesr)   N)r$   r%   r$   r%   r^   )    rj   r,   r,   )rj   r,   r/   r2   )r   r   r   r   r   r   )r   r   r   r   r   s   &    r   ,test_multi_index_naming_not_all_at_beginningrk      sd    F5D__Xd^1v_>F	+,#J-lL5Q
H &+r<   c                 *   Tp\         P                  ! . RO4      p\        \        P                  P                  ^4      P                  R4      V. ROR7      pVP                  V 4       VP                  V . ROR7      p\        P                  ! WT4       R# )rD   r@   r   N)rD   r,   r/   rm   )rE   r,   r/   )r2   r2   rJ   rK   rL   )rj   r,   r/   )r   from_tuplesr   nprandomdefault_rngstandard_normalto_csvr   r   r   )	temp_filer   r   midxr   r   s   &&    r   %test_no_multi_index_level_names_emptyrw      su     F!!"IJD
		a 008H
 OOI__Y)_<F&+r<   c                    T pR p\         P                  ! RR.RR.R7      p\        R.4      p\        ^^..WCR7      pVP	                  \        V4      ^ ^ ^.R7      p\        P                  ! We4       \        RR	.4      p\        RR.RR
7      p\        RR.RR..WGR7      pVP	                  \        V4      R^ R7      p\        P                  ! We4       R# )z
I11,A,A
I12,B,B
I2,1,3
rD   rE   I11I12rM   I2r@   )r   r   zA.1r'   13N)rD   rE   )rD   zB.1)r   ro   r   r   r   r   r   r   )r   r   r   rv   idxr   r   col_idxs   &       r   test_header_with_index_colr      s     FD
 !!:|"<UENSD
-C1a&;H__Xd^q!Q_HF&+S%L!G
E
*C3*sCj1NH__Xd^uQ_GF&+r<   c           	         Tp^dp\        R\        V^,           4      R\        P                  P	                  ^4      P                  V^,           4      /4      pVP                  V RR7       VP                  4       ;_uu_ 4       pVP                  RV4       VP                  V ^ .R7      pRRR4       \        P                  ! XVP                  R4      4       R#   + '       g   i     L8; i)d   r"   r#   Fr)   z,pandas.core.algorithms._MINIMUM_COMP_ARR_LENr   N)r   rangerp   rq   rr   rs   rt   contextsetattrr   r   r   r   )ru   r   monkeypatchr   ARR_LENdfmr   s   &&&     r   test_index_col_large_csvr      s     FG	w{#&&q)99'A+F	

B IIiuI%					!			@'Jqc: 
 &",,s"34	 
	s   'CC)	c           	          T pVP                  \        R 4      ^ ^.^ R7      p\        . \        . 4      \        P
                  ! RR.RR..RR.R7      R	7      p\        P                  ! W#4       R
# )a0,a1,a2
b0,b1,b2
r   r   a1a2b1b2a0b0rM   r@   N)r   r   r   r   r   from_arraysr   r   r   r   r   r   s   &   r   )test_index_col_multiindex_columns_no_datar     sw     F__'(!Q1  F 
Bi&&D\D$<(t
H &+r<   c           	          T pVP                  \        R 4      ^ .^ R7      p\        . RR.\        . RR7      R7      p\        P
                  ! W#4       R# )z	a0,a1,a2
r   r   r   r   r'   rA   r*   N)r   r   r   r   r   r   r   s   &   r   test_index_col_header_no_datar     sR     F__Xl3QC1_MF
tBT"H
 &+r<   c                     T pVP                  \        R 4      ^ ^.R7      p\        . \        P                  ! . RO. RO.4      R7      p\
        P                  ! W#4       R# )r   r   rS   N)r   r   r   )r   r   r   )r   r   r   r   r   r   r   r   s   &   r   test_multiindex_columns_no_datar   $  sV     F__X&<=q!f_MF
J**,>@R+STH &+r<   c                     T pVP                  \        R 4      ^ ^.^ R7      p\        RR..\        P                  ! RR.RR..RR.R	7      \        R.4      R
7      p\        P                  ! W#4       R# )z a0,a1,a2
b0,b1,b2
data,data,datar   r   r   r   r   r   r   r   rM   r   N)r   r   r   r   r   r   r   r   r   s   &   r   +test_multiindex_columns_index_col_with_datar   /  s     F__561vQR  F 
&	&&D\D$<(t
 VHoH &+r<   c                     T pVP                  \        R 4      RR.R.RR/R7      p\        R^ .R^./R7      P                  R4      p\        P
                  ! W#RR7       R# )	z0,1r"   r#   UInt8)r+   r   dtype)r   F)check_index_typeN)r   r   r   r   r   r   r   s   &   r   test_infer_types_boolean_sumr   @  s{     F__Cj%Gn	  F  !	
 in  &UCr<   z
dtype, val01c           	      H   R pT pV\         8X  dA   VP                  R8X  d0   VP                  \        P                  P                  RR7      4       VP                  \        V4      RRV/R7      p\        R^./\        V.RVR7      R7      p\        P                  ! Wg4       R	# )
za,b
01,2rY   z0Cannot disable type-inference for pyarrow enginerZ   r"   )r   r   r#   )r(   r   r)   N)objectr_   rb   r   r`   ra   r   r   r   r   r   r   )r   r   valre   r   r   r   r   s   &&&&    r    test_specify_dtype_for_index_colr   X  s     DF6==I5KK%WX	
 __Xd^s3,_OF#s5#S+NOH&+r<   c                     T pR pVP                  \        V4      ^ ^.^R7      p\        P                  ! . RORR.R7      p\	        . R	O.VR.R7      p\
        P                  ! W54       R# )
za,b,c,d
e,f,g,h
x,y,1,2
r   r#   frM   rK   r   N))r"   e)r$   g)r%   h)rJ   r,   r/   )r   r   r   ro   r   r   r   )r   r   r   r   colsr   s   &     r   -test_multiindex_columns_not_leading_index_colr   f  ss     FD __1v  F
 !!,S#JD +SEBH&+r<   rn   )int64r,   ))__doc__ior   numpyrp   r   pandasr   r   r   pandas._testing_testingr   r`   filterwarnings
pytestmarkusefixturesxfail_pyarrowskip_pyarrowparametrizer    r;   r>   rI   r   rQ   rT   rf   rk   rw   r   slowr   r   r   r   r   r   r   r   r   rO   r<   r   <module>r      s      
 [[''C
 ''8{{&&~6 u6< 7<2,$8 , ," 		?+,	O,-	
Yc
GU2C-@AB	
Yc
GU2C-@AB	y3*guRc/BCD	y3*guRc/BCDFC5//qc
K	
 #JC5//qc
K	
 FC5//qc
K	
 #JC5//qc
K	
9#&N,O& P, , , 	R		U		\*	,	,$ , , , , , ,. 5 5( , ,  	, 	, , , , ,  D D. 'EF
, G
, , ,r<   