o
    Û­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rt t|ƒt|ƒ ƒ}t |ƒ}t ||¡ d S )Nc                 s  s&   � | ]}|  d ¡s|dkr|V  qdS )Ú__r   N)Ú
startswith)Ú.0Úf© r   úV/var/www/html/CropPilot/venv/lib/python3.10/site-packages/pandas/tests/api/test_api.pyÚ	<genexpr>   s   € 
ÿÿzBase.check.<locals>.<genexpr>)ÚsortedÚdirÚsetÚtmÚ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sPe d¡ dd„ Zdd„ Zdd„ ZdS )Ú	TestPDApi)ÚtestsÚlocaleÚconftestÚ_version_meson)	r   ÚarraysÚoptionsÚtestÚtestingÚerrorsÚplottingÚioÚtseries)ÚcompatÚcoreÚpandasÚutilÚ_built_with_meson)Ú
IndexSliceÚNaTÚNA)(Ú
ArrowDtypeÚCategoricalÚCategoricalIndexÚ	DataFrameÚ
DateOffsetÚDatetimeIndexÚ	ExcelFileÚExcelWriterÚFlagsÚGrouperÚHDFStoreÚIndexÚ
MultiIndexÚPeriodÚPeriodIndexÚ
RangeIndexÚSeriesÚSparseDtypeÚStringDtypeÚ	TimedeltaÚTimedeltaIndexÚ	TimestampÚIntervalÚIntervalIndexÚCategoricalDtypeÚPeriodDtypeÚIntervalDtypeÚDatetimeTZDtypeÚBooleanDtypeÚ	Int8DtypeÚ
Int16DtypeÚ
Int32DtypeÚ
Int64DtypeÚ
UInt8DtypeÚUInt16DtypeÚUInt32DtypeÚUInt64DtypeÚFloat32DtypeÚFloat64DtypeÚNamedAggz	list[str]Údeprecated_classesÚmodules)ÚarrayÚbdate_rangeÚconcatÚcrosstabÚcutÚ
date_rangeÚinterval_rangeÚevalÚ	factorizeÚget_dummiesÚfrom_dummiesÚ
infer_freqÚisnaÚisnullÚlreshapeÚmeltÚnotnaÚnotnullÚoffsetsÚmergeÚmerge_orderedÚ
merge_asofÚperiod_rangeÚpivotÚpivot_tableÚqcutÚshow_versionsÚtimedelta_rangeÚuniqueÚvalue_countsÚwide_to_long)Úreset_optionÚdescribe_optionÚ
get_optionÚoption_contextÚ
set_optionÚset_eng_float_format)Úread_clipboardÚread_csvÚ
read_excelÚread_fwfÚread_gbqÚread_hdfÚ	read_htmlÚread_xmlÚ	read_jsonÚread_pickleÚread_sasÚread_sqlÚread_sql_queryÚread_sql_tableÚ
read_stataÚ
read_tableÚread_featherÚread_parquetÚread_orcÚ	read_spssÚjson_normalize)Úto_datetimeÚ
to_numericÚ	to_pickleÚto_timedeltaÚdeprecated_funcs_in_futureÚdeprecated_funcs)Ú_configÚ_libsÚ_is_numpy_devÚ_pandas_datetime_CAPIÚ_pandas_parser_CAPIÚ_testingÚ_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Úmiscr^   ÚclassesÚfuncsÚfuncs_optionÚ
funcs_readÚ
funcs_jsonÚfuncs_toÚprivate_modulesr   Úpdr   )r   Ú
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 ‚|| }|r7J ‚d S r   )r   r§   r©   r^   rª   r«   r¬   r­   r®   r¯   r]   r±   Ú__all__)r   r   ÚactualÚ
extraneousÚmissingr   r   r   Útest_api_all×   s4   ÿþýüûúùøÿ
ö
zTestPDApi.test_api_allc              	   C  sT   | j | j | j }|D ]}t t¡� tt|ƒ}W d   ƒ n1 s"w   Y  qd S r   )r]   rž   r�   r   Úassert_produces_warningÚFutureWarningÚgetattrr±   )r   Údeprecated_listÚdeprÚ_r   r   r   Ú	test_deprë   s   ÿþÿÿ€ÿzTestPDApi.test_deprN)r   r   r   r   r§   r¨   r©   rª   r]   Ú__annotations__r^   r«   r¬   r­   r®   r¯   r�   rž   r°   r±   r1   Úappendr³   r¸   r¿   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   )ÚDataFrameGroupByÚDatetimeIndexResamplerGroupbyÚ	ExpandingÚExpandingGroupbyÚExponentialMovingWindowÚExponentialMovingWindowGroupbyÚ
JsonReaderÚNaTTypeÚNATypeÚPeriodIndexResamplerGroupbyÚ	ResamplerÚRollingÚRollingGroupbyÚSeriesGroupByÚStataReaderÚTimedeltaIndexResamplerGroupbyÚTimeGrouperÚWindow).Úis_any_real_numeric_dtypeÚis_array_likeÚis_boolÚis_bool_dtypeÚis_categorical_dtypeÚ
is_complexÚis_complex_dtypeÚis_datetime64_any_dtypeÚis_datetime64_dtypeÚis_datetime64_ns_dtypeÚis_datetime64tz_dtypeÚis_dict_likeÚis_dtype_equalÚis_extension_array_dtypeÚis_file_likeÚis_floatÚis_float_dtypeÚis_hashableÚis_int64_dtypeÚ
is_integerÚis_integer_dtypeÚis_intervalÚis_interval_dtypeÚis_iteratorÚis_list_likeÚis_named_tupleÚ	is_numberÚis_numeric_dtypeÚis_object_dtypeÚis_period_dtypeÚis_reÚis_re_compilableÚ	is_scalarÚis_signed_integer_dtypeÚ	is_sparseÚis_string_dtypeÚis_timedelta64_dtypeÚis_timedelta64_ns_dtypeÚis_unsigned_integer_dtypeÚpandas_dtypeÚinfer_dtypeÚunion_categoricalsrM   rP   rO   rN   Úfrom_dataframer8   )Úcheck_array_indexerÚBaseIndexerÚFixedForwardWindowIndexerÚVariableOffsetWindowIndexer)	Ú
no_defaultÚExtensionDtypeÚregister_extension_dtypeÚregister_dataframe_accessorÚregister_index_accessorÚregister_series_accessorÚtakeÚExtensionArrayÚExtensionScalarOpsMixinc                 C  ó   |   t| j¡ d S r   )r   r   Úallowed_api_dirs©r   r   r   r   r³   U  ó   zTestApi.test_apic                 C  r  r   )r   Ú
api_typingÚallowed_typingr  r   r   r   Útest_api_typingX  r  zTestApi.test_api_typingc                 C  r  r   )r   Ú	api_typesÚallowed_api_typesr  r   r   r   Útest_api_types[  r  zTestApi.test_api_typesc                 C  r  r   )r   Úapi_interchangeÚallowed_api_interchanger  r   r   r   Útest_api_interchange^  r  zTestApi.test_api_interchangec                 C  r  r   )r   Úapi_indexersÚallowed_api_indexersr  r   r   r   Útest_api_indexersa  r  zTestApi.test_api_indexersc                 C  r  r   )r   Úapi_extensionsÚallowed_api_extensionsr  r   r   r   Útest_api_extensionsd  r  zTestApi.test_api_extensionsN)r   r   r   r  r  r  r  r  r  r³   r  r  r  r  r  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)Úassert_frame_equalÚassert_series_equalÚassert_index_equalÚassert_extension_array_equalc                 C  s   ddl m} |  || j¡ d S )Nr   )r(   )r/   r(   r   r«   )r   r(   r   r   r   Útest_testingp  s   zTestTesting.test_testingc                 C  s<   t jtdd�� tjj W d   ƒ d S 1 sw   Y  d S )NÚfoo©Úmatch)ÚpytestÚraisesÚAttributeErrorr±   r0   r&  r  r   r   r   Útest_util_in_top_levelu  s   
"ÿz"TestTesting.test_util_in_top_levelN)r   r   r   r«   r%  r,  r   r   r   r   r   h  s    r   c                  C  sN   d} t jt| d�� tjj}W d   ƒ n1 sw   Y  |tjju s%J ‚d S )Nz0PandasArray has been renamed NumpyExtensionArrayr'  )r   r¹   rº   r±   r%   ÚPandasArrayÚNumpyExtensionArray)ÚmsgÚresr   r   r   Útest_pandas_array_aliasz  s
   
ÿr1  )Ú
__future__r   r)  r/   r±   r   Úpandas._testingr¤   r   Ú
pandas.apir   r  r   r  r   r  r   r  r   r  r	   r    rÂ   r   r1  r   r   r   r   Ú<module>   s    	 Vr