a
    é´«j²$  ã                   @  sš   d dl mZ d dlZd dlZd dlmZ d dlmZ d dl	m
ZmZmZmZmZ G dd„ dƒZG dd„ deƒZG d	d
„ d
eƒZG dd„ deƒZdd„ ZdS )é    )ÚannotationsN)Úapi)Ú
extensionsÚindexersÚinterchangeÚtypesÚtypingc                   @  s   e Zd Zddd„ZdS )ÚBaseNc                 C  sJ   t dd„ t|ƒD ƒƒ}|d ur2t t|ƒt|ƒ ƒ}t |ƒ}t ||¡ d S )Nc                 s  s$   | ]}|  d ¡s|dkr|V  qdS )Ú__r   N)Ú
startswith)Ú.0Úf© r   úX/var/www/html/laksyashrimp/venv/lib/python3.9/site-packages/pandas/tests/api/test_api.pyÚ	<genexpr>   s   zBase.check.<locals>.<genexpr>)ÚsortedÚdirÚsetÚtmZassert_almost_equal)ÚselfÚ	namespaceÚexpectedÚignoredÚresultr   r   r   Úcheck   s    ÿz
Base.check)N)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r	      s   r	   c                   @  s¼   e Zd ZU g d¢Zg d¢Zg d¢Zg d¢Zg d¢Zg Zde	d< g Z
de	d< g d	¢Zg d
¢Zg d¢ZdgZg d¢Zg Zde	d< g Zde	d< g d¢Zejs e d¡ dd„ Zdd„ Zdd„ ZdS )Ú	TestPDApi)ÚtestsÚlocaleZconftestZ_version_meson)	r   ÚarraysÚoptionsÚtestÚtestingÚerrorsZplottingÚioZtseries)ÚcompatÚcoreÚpandasÚutilÚ_built_with_meson)Z
IndexSliceZNaTZNA)(Z
ArrowDtypeZCategoricalZCategoricalIndexÚ	DataFrameZ
DateOffsetZDatetimeIndexZ	ExcelFileZExcelWriterÚFlagsZGrouperZHDFStoreÚIndexZ
MultiIndexZPeriodZPeriodIndexZ
RangeIndexZSeriesZSparseDtypeZStringDtypeZ	TimedeltaZTimedeltaIndexÚ	TimestampZIntervalZIntervalIndexÚCategoricalDtypeÚPeriodDtypeÚIntervalDtypeÚDatetimeTZDtypeZBooleanDtypeZ	Int8DtypeZ
Int16DtypeZ
Int32DtypeZ
Int64DtypeZ
UInt8DtypeZUInt16DtypeZUInt32DtypeZUInt64DtypeZFloat32DtypeZFloat64DtypeZNamedAggz	list[str]Údeprecated_classesÚmodules)ÚarrayZbdate_rangeÚconcatZcrosstabÚcutZ
date_rangeZinterval_rangeÚevalZ	factorizeZget_dummiesZfrom_dummiesZ
infer_freqZisnaZisnullZlreshapeZmeltZnotnaZnotnullÚoffsetsÚmergeZmerge_orderedZ
merge_asofZperiod_rangeZpivotZpivot_tableZqcutZshow_versionsZtimedelta_rangeÚuniqueZvalue_countsZwide_to_long)Zreset_optionZdescribe_optionÚ
get_optionZoption_contextZ
set_optionZset_eng_float_format)Zread_clipboardZread_csvZ
read_excelZread_fwfZread_gbqZread_hdfZ	read_htmlZread_xmlÚ	read_jsonZread_pickleZread_sasZread_sqlZread_sql_queryZread_sql_tableZ
read_stataZ
read_tableZread_featherZread_parquetZread_orcZ	read_spssZjson_normalize)Úto_datetimeZ
to_numericZ	to_pickleZto_timedeltaÚdeprecated_funcs_in_futureÚdeprecated_funcs)Ú_configZ_libsZ_is_numpy_devZ_pandas_datetime_CAPIZ_pandas_parser_CAPIÚ_testingZ_typingÚ_versionc                 C  sX   | j | j | j | j | j | j | j | j | j | j	 | j
 }| jt|| jd� d S )N)r   r   r   )Ú
public_libÚprivate_libÚmiscr5   ÚclassesÚfuncsÚfuncs_optionÚ
funcs_readÚ
funcs_jsonÚfuncs_toÚprivate_modulesr   Úpdr   )r   Z
checktheser   r   r   Útest_apiÇ   s.    ÿþýüûúùø	÷
öÿzTestPDApi.test_apic                 C  sr   t | j| j | j | j | j | j | j | j | j	 ƒt | j
ƒ }t tjƒ}|| }|r^J ‚|| }|rnJ ‚d S ©N)r   rE   rG   r5   rH   rI   rJ   rK   rL   rM   r4   rO   Ú__all__)r   r   ÚactualZ
extraneousÚmissingr   r   r   Útest_api_all×   s4    ÿþýüûúùøÿ
ö
zTestPDApi.test_api_allc              	   C  sT   | j | j | j }|D ]8}t t¡� tt|ƒ}W d   ƒ q1 sD0    Y  qd S rQ   )r4   rA   r@   r   Úassert_produces_warningÚFutureWarningÚgetattrrO   )r   Zdeprecated_listZdeprÚ_r   r   r   Ú	test_deprë   s    ÿþÿzTestPDApi.test_deprN)r   r   r   r   rE   rF   rG   rH   r4   Ú__annotations__r5   rI   rJ   rK   rL   rM   r@   rA   rN   rO   r+   ÚappendrP   rU   rZ   r   r   r   r   r   !   s(   
,#
	
r   c                   @  sl   e Zd Zg d¢Zg d¢Zg d¢ZddgZg d¢Zg d¢Zdd	„ Z	d
d„ Z
dd„ Zdd„ Zdd„ Zdd„ ZdS )ÚTestApi)r   r   r   r   r   )ZDataFrameGroupByZDatetimeIndexResamplerGroupbyZ	ExpandingZExpandingGroupbyZExponentialMovingWindowZExponentialMovingWindowGroupbyZ
JsonReaderZNaTTypeZNATypeZPeriodIndexResamplerGroupbyZ	ResamplerZRollingZRollingGroupbyZSeriesGroupByZStataReaderZTimedeltaIndexResamplerGroupbyZTimeGrouperZWindow).Zis_any_real_numeric_dtypeZis_array_likeZis_boolZis_bool_dtypeZis_categorical_dtypeZ
is_complexZis_complex_dtypeZis_datetime64_any_dtypeZis_datetime64_dtypeZis_datetime64_ns_dtypeZis_datetime64tz_dtypeZis_dict_likeZis_dtype_equalZis_extension_array_dtypeZis_file_likeZis_floatZis_float_dtypeZis_hashableZis_int64_dtypeÚ
is_integerZis_integer_dtypeZis_intervalZis_interval_dtypeZis_iteratorZis_list_likeZis_named_tupleZ	is_numberZis_numeric_dtypeZis_object_dtypeZis_period_dtypeZis_reZis_re_compilableZ	is_scalarZis_signed_integer_dtypeZ	is_sparseZis_string_dtypeZis_timedelta64_dtypeZis_timedelta64_ns_dtypeZis_unsigned_integer_dtypeZpandas_dtypeZinfer_dtypeZunion_categoricalsr0   r3   r2   r1   Zfrom_dataframer,   )Zcheck_array_indexerZBaseIndexerZFixedForwardWindowIndexerZVariableOffsetWindowIndexer)	Z
no_defaultZExtensionDtypeZregister_extension_dtypeZregister_dataframe_accessorZregister_index_accessorZregister_series_accessorZtakeZExtensionArrayZExtensionScalarOpsMixinc                 C  s   |   t| j¡ d S rQ   )r   r   Úallowed_api_dirs©r   r   r   r   rP   U  s    zTestApi.test_apic                 C  s   |   t| j¡ d S rQ   )r   Ú
api_typingÚallowed_typingr`   r   r   r   Útest_api_typingX  s    zTestApi.test_api_typingc                 C  s   |   t| j¡ d S rQ   )r   Ú	api_typesÚallowed_api_typesr`   r   r   r   Útest_api_types[  s    zTestApi.test_api_typesc                 C  s   |   t| j¡ d S rQ   )r   Úapi_interchangeÚallowed_api_interchanger`   r   r   r   Útest_api_interchange^  s    zTestApi.test_api_interchangec                 C  s   |   t| j¡ d S rQ   )r   Úapi_indexersÚallowed_api_indexersr`   r   r   r   Útest_api_indexersa  s    zTestApi.test_api_indexersc                 C  s   |   t| j¡ d S rQ   )r   Úapi_extensionsÚallowed_api_extensionsr`   r   r   r   Útest_api_extensionsd  s    zTestApi.test_api_extensionsN)r   r   r   r_   rb   re   rh   rk   rn   rP   rc   rf   ri   rl   ro   r   r   r   r   r]   ö   s   0r]   c                   @  s$   e Zd Zg d¢Zdd„ Zdd„ ZdS )ÚTestTesting)Zassert_frame_equalZassert_series_equalZassert_index_equalZassert_extension_array_equalc                 C  s   ddl m} |  || j¡ d S )Nr   )r$   )r)   r$   r   rI   )r   r$   r   r   r   Útest_testingp  s    zTestTesting.test_testingc                 C  s:   t jtdd�� tjj W d   ƒ n1 s,0    Y  d S )NÚfoo©Úmatch)ÚpytestZraisesÚAttributeErrorrO   r*   rr   r`   r   r   r   Útest_util_in_top_levelu  s    z"TestTesting.test_util_in_top_levelN)r   r   r   rI   rq   rw   r   r   r   r   rp   h  s   rp   c                  C  sN   d} t jt| d�� tjj}W d   ƒ n1 s00    Y  |tjju sJJ ‚d S )Nz0PandasArray has been renamed NumpyExtensionArrayrs   )r   rV   rW   rO   r!   ZPandasArrayZNumpyExtensionArray)ÚmsgÚresr   r   r   Útest_pandas_array_aliasz  s    &rz   )Ú
__future__r   ru   r)   rO   r   Zpandas._testingrC   r   Z
pandas.apir   rm   r   rj   r   rg   r   rd   r   ra   r	   r   r]   rp   rz   r   r   r   r   Ú<module>   s   	 Vr