o
    vh                     @   sf  d dl Zd dlZd dlZd dlmZ ejde	ddfe	ddfe	dd	fe	d
dfe	ddfe	ddfe	ddfe	ddfe	ddfe	ddfe	ddfe	ddfe
dgj	dfe
d gdj	dfedgdfe	d dfgd!d" Zejd#g d$i d%gd&i dgdi d	gdi dgdi dgdi dgdi dgd
i dgdi dgdi dgdi dgdi dgdi dgd'i dgd(i d)gg d*g d+g d,g d-d.i d/gd0i d1gd2d3did4gd2d3d5id6gd2d3d7id8gd2d3d9idgd2d9d:d;d<gg d=g d>g d?g d@dAdBdCdDdEgdFdG ZdS )H    Ndtype_to_arrow_c_fmtzpandas_dtype, c_stringboolbint8cuint8Cint16suint16Sint32iuint32Iint64luint64Lfloat16efloat32ffloat64gauzdatetime64[ns]ztsn:Oc                 C   s   t | |ksJ dS )z/Test ``dtype_to_arrow_c_fmt`` utility function.Nr   )pandas_dtypec_string r!   a/var/www/html/hyperkenya/venv/lib/python3.10/site-packages/pandas/tests/interchange/test_utils.pytest_dtype_to_arrow_c_fmt   s   r#   zpa_dtype, args_kwargs, c_stringnullnbool_stringbinaryz)time32r   tts)r*   msttm)time64usttu)r0   nsttndate32tdDdate64tdm	timestampunitztss:r.   ztsm:r2   ztsu:r5   UTC)r<   tzztsn:UTC)durationr+   tDs)r?   r-   tDm)r?   r1   tDu)r?   r4   tDn
decimal128      )	precisionscalezd:4,2c                 C   sh   t d}|st||  }nt|trt|| | }n
t|| di |}t|}t||ks2J d S )Npyarrowr!   )pytestimportorskipgetattr
isinstancetuplepd
ArrowDtyper   )pa_dtypeargs_kwargsr    papa_type
arrow_typer!   r!   r"   $test_dtype_to_arrow_c_fmt_arrowdtype+   s   
&

rV   )numpynprJ   pandasrO   pandas.core.interchange.utilsr   markparametrizedtypeSeriesastypeCategoricalDtyper#   rV   r!   r!   r!   r"   <module>   s    	
	
$