
    *g$                        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      Z G d de      Z G d	 d
e      Z G d de      Zd Zy)    )annotationsN)api)
extensionsindexersinterchangetypestypingc                      e Zd ZddZy)BaseNc                    t        d t        |      D              }| t        t        |      t        |      z
        }t        |      }t        j                  ||       y )Nc              3  P   K   | ]  }|j                  d       r|dk7  s|   yw)__r   N)
startswith).0fs     c/var/www/html/articles-backend/trend/venv/lib/python3.12/site-packages/pandas/tests/api/test_api.py	<genexpr>zBase.check.<locals>.<genexpr>   s'      
Q\\$-?ADVA
s   &&&)sorteddirsettmassert_almost_equal)self	namespaceexpectedignoredresults        r   checkz
Base.check   sX    
  
9~
 
 CK#g,67F(#
vx0    N)__name__
__module____qualname__r    r   r   r   r      s    1r   r   c                      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j+                  d       d Zd Zd Zy)	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                d   | j                   | j                  z   | j                  z   | j                  z   | j                  z   | j
                  z   | j                  z   | j                  z   | j                  z   | j                  z   | j                  z   }| j                  t        || j                         y )N)r   r   r   )
public_libprivate_libmiscrd   classesfuncsfuncs_option
funcs_read
funcs_jsonfuncs_toprivate_modulesr   pdr   )r   
checktheses     r   test_apizTestPDApi.test_api   s    OOii ll ll	
 jj   oo oo mm	 ""
# 	 	

R*dll
Kr   c                   t        | j                  | j                  z   | j                  z   | j                  z   | j
                  z   | j                  z   | j                  z   | j                  z   | j                  z         t        | j                        z
  }t        t        j                        }||z
  }|rJ ||z
  }|rJ y r    )r   r   r   rd   r   r   r   r   r   r   rc   r   __all__)r   r   actual
extraneousmissings        r   test_api_allzTestPDApi.test_api_all   s    OOiill ll jj	
   oo oo mm

 ''(
) RZZh&
~V#{7r   c                    | j                   | j                  z   | j                  z   }|D ]4  }t        j                  t
              5  t        t        |      }d d d        6 y # 1 sw Y   AxY wr    )rc   r   r   r   assert_produces_warningFutureWarninggetattrr   )r   deprecated_listdepr_s       r   	test_deprzTestPDApi.test_depr   sq    ####$--. 	
 $ 	&D++M: &B%& &	&& &s   A!!A*	N)r!   r"   r#   r   r   r   r   r   rc   __annotations__rd   r   r   r   r   r   r   r   r   r   r7   appendr   r   r   r$   r   r   r&   r&   !   s     @G
J LK 'D)GX %'	& GY EFLJ0 ##J JH -/	. #%i$O z*L (&r   r&   c                  `    e Zd Zg dZg dZg dZddgZg dZg dZd Z	d	 Z
d
 Zd Zd Zd Zy)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_categoricalsrS   rV   rU   rT   from_dataframer>   )check_array_indexerBaseIndexerFixedForwardWindowIndexerVariableOffsetWindowIndexer)	
no_defaultExtensionDtyperegister_extension_dtyperegister_dataframe_accessorregister_index_accessorregister_series_accessortakeExtensionArrayExtensionScalarOpsMixinc                D    | j                  t        | j                         y r    )r   r   allowed_api_dirsr   s    r   r   zTestApi.test_apiU  s    

3--.r   c                D    | j                  t        | j                         y r    )r   
api_typingallowed_typingr  s    r   test_api_typingzTestApi.test_api_typingX  s    

:t223r   c                D    | j                  t        | j                         y r    )r   	api_typesallowed_api_typesr  s    r   test_api_typeszTestApi.test_api_types[  s    

9d445r   c                D    | j                  t        | j                         y r    )r   api_interchangeallowed_api_interchanger  s    r   test_api_interchangezTestApi.test_api_interchange^  s    

?D$@$@Ar   c                D    | j                  t        | j                         y r    )r   api_indexersallowed_api_indexersr  s    r   test_api_indexerszTestApi.test_api_indexersa  s    

<!:!:;r   c                D    | j                  t        | j                         y r    )r   api_extensionsallowed_api_extensionsr  s    r   test_api_extensionszTestApi.test_api_extensionsd  s    

>4#>#>?r   N)r!   r"   r#   r  r  r   r$  r(  r,  r   r  r!  r%  r)  r-  r$   r   r   r   r      sW    N(/`  0=
/46B<@r   r   c                       e Zd Zg dZd Zd Zy)TestTesting)assert_frame_equalassert_series_equalassert_index_equalassert_extension_array_equalc                H    ddl m} | j                  || j                         y )Nr   )r.   )r5   r.   r   r   )r   r.   s     r   test_testingzTestTesting.test_testingp  s    "

7DJJ'r   c                    t        j                  t        d      5  t        j                  j
                   d d d        y # 1 sw Y   y xY w)Nfoomatch)pytestraisesAttributeErrorr   r6   r7  r  s    r   test_util_in_top_levelz"TestTesting.test_util_in_top_levelu  s0    ]]>7 	GGKK	 	 	s   A  A	N)r!   r"   r#   r   r5  r=  r$   r   r   r/  r/  h  s    E(
r   r/  c                     d} t        j                  t        |       5  t        j                  j
                  }d d d        t        j                  j                  u sJ y # 1 sw Y   (xY w)Nz0PandasArray has been renamed NumpyExtensionArrayr8  )r   r   r   r   r+   PandasArrayNumpyExtensionArray)msgress     r   test_pandas_array_aliasrC  z  sU    
<C		#	#M	= $ii##$ "))/////$ $s   A  A))
__future__r   r:  r5   r   r   pandas._testingr   r   
pandas.apir   r+  r   r'  r   r#  r   r  r	   r  r   r&   r   r/  rC  r$   r   r   <module>rG     sY    "     1 1 R& R&jo@d o@d$ $0r   