
    <>i                     L    S SK Jr  S SKJrJr  S SKrS SKrS SK	r
SS jrSS jrg)    )OrderedDict)datetimeNc                    S[         R                  " 5       4S[         R                  " 5       4S[         R                  " 5       4S[         R                  " 5       4S[         R
                  " 5       4S[         R                  " 5       4S[         R                  " 5       4S[         R                  " 5       4S	[         R                  " 5       4S
[         R                  " 5       4/
n[        5       n/ nU H  u  pEUR                  [         R                  " U[         R                  " U5      5      5        [        R                   " SUS9[        R                   " SUS9S[        R                   " SUS9/X$'   M     UR                  [         R                  " S[         R                  " [         R"                  " 5       5      5      5        [        R$                  " SS/SS9S[        R$                  " S/SS9[        R$                  " / SQSS9/US'   UR                  [         R                  " S[         R                  " [         R&                  " S5      5      5      5        [        R$                  " / SQSS9SS[        R$                  " / SQSS9/US'   U (       a9  UR                  [         R                  " S[         R                  " 5       5      5        [(        R*                  " U5      n[         R,                  " U5      nXg4$ )z
Dataframe with numpy arrays columns of every possible primitive type.

Returns
-------
df: pandas.DataFrame
schema: pyarrow.Schema
    Arrow schema definition that is in line with the constructed df.
i1i2i4i8u1u2u4u8f4f8
   dtype   N   str1   äobjectr   23
datetime64ms)z2007-07-13T01:23:34.123456789N2010-08-13T05:46:57.437699912zdatetime64[ms])z2007-07-13T02Nr   __index_level_0__)paint8int16int32int64uint8uint16uint32uint64float32float64r   appendfieldlist_nparangestringarray	timestamppd	DataFrameschema)include_indexdtypesarraysfieldsr   arrow_dtypedfr6   s           \/var/www/html/land-tabula/venv/lib/python3.13/site-packages/pyarrow/tests/pandas_examples.pydataframe_with_arraysr>      s    RWWY$
!3RXXZ 4"4RXXZ 4"5RYY[!D"))+#6RZZ\"T2::<$8	:F ]FF$bhhubhh{&;<=IIb&IIau%IIau%	
 % MM"((5"((299;"789
#tH-
#h'
1	F5M MM"((<",,t2D)EFG
 3 (	) 	
 3 (	)F< bhh2BHHJ?@	f	BYYvF:    c                 t   [        5       n/ nUR                  [        R                  " S[        R                  " [        R
                  " 5       5      5      5        / SQ/ SQS/ [        R                  " / SQS-  [        R
                  S9SSS2   /US'   UR                  [        R                  " S[        R                  " [        R                  " 5       5      5      5        / SQ/ S	QS/ [        R                  " / SQS-  5      SSS2   /US'   UR                  [        R                  " S
[        R                  " [        R                  " 5       5      5      5        SS/SS// SQ/ /US
'   UR                  [        R                  " S[        R                  " [        R                  " 5       5      5      5        SS/SS// SQ/ /US'   / [        SSS5      [        SSS5      /[        SSS5      /S[        SSS5      [        SSS5      //n[        SSS5      [        SSS5      [        SS S 5      // [        S!S"S 5      /S[        S#S#S#5      [        S$S#S5      [        SSS5      //n[        R                  " 5       U4[        R                  " 5       U4[        R                  " S%5      U4[        R                  " S&5      U4[        R                   " S'5      U4/nU(       d  U[        R                   " S(5      U4/-  nU HK  u  pxU S)3n	[        R                  " U5      n
[        R                  " X5      nUR                  U5        XU	'   MM     U (       a9  UR                  [        R                  " S*[        R
                  " 5       5      5        ["        R$                  " U5      n[        R&                  " U5      nX4$ )+a  
Dataframe with list columns of every possible primitive type.

Returns
-------
df: pandas.DataFrame
schema: pyarrow.Schema
    Arrow schema definition that is in line with the constructed df.
parquet_compatible: bool
    Exclude types not supported by parquet
r%   )
r   r            r            	   )r   r   rA   rB   rC   NrA   r   double)
              ?       @      @      @g      @g      @g      @g       @g      "@)rI   rJ   rK   rL   rM   
bytes_list   1   f)rO      2   3str_listr   r   r   i  r   i        i  rD   rE   i  rG   i  rB         ;      r   r      sr   usns_listr    )r   r,   r!   r-   r.   r%   r/   r2   r+   binaryr1   r   r   date32date64time32time64r4   r5   r6   )r7   parquet_compatibler9   r:   	date_data	time_datatemporal_pairs
value_typedata
field_name
field_typer-   r<   r6   s                 r=   dataframe_with_listsrl   S   s!    ]FF
MM"((7BHHRXXZ$89:&

/!3xx	!!$1	&F7O MM"((8RXXbjjl%;<=0

9A=>ssCF8 MM"((<"))+)>?@	t	
F< MM"((:rxx		'<=>	d	
F: 		dAq	4b"-.	dAq		dAq	4a+,I 
b"b	41a=$r2r*:;
	b!R	aARARA7I 
i 	i 	3#	4)$	4)$N YYt_i(
 	
 +
"|5)
XXj)
0e!z + bhh2BHHJ?@	f	BYYvF:r?   )F)FF)collectionsr   datetimer   r   numpyr/   pandasr4   pyarrowr!   r>   rl    r?   r=   <module>rs      s"   $ $    6rYr?   