
    Pi?9                        d dl mZ d dlZd dlZd dlZd dl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mZ d dlmZ  G d d          Z G d d	e          Z G d
 de          Z G d de          Z  G d de          Z! G d de          Z"d$dZ#ej$        j%        ej$        &                    ddddd ej'        dej$        (                    d                     d!d"g          d#                         Z)dS )%    )annotationsN)api)	executors
extensionsindexersinterchangetypestyping)aliasesc                      e Zd ZddZdS )BaseNc                    t          d t          |          D                       }|,t          t          |          t          |          z
            }t          |          }t          j        ||           d S )Nc              3  P   K   | ]!}|                     d           s
|dk    |V  "dS )__r   N)
startswith).0fs     m/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/pandas/tests/api/test_api.py	<genexpr>zBase.check.<locals>.<genexpr>   sI       
 
Q\\$-?-?
DEDVDVADVDVDVDV
 
    )sorteddirsettmassert_almost_equal)self	namespaceexpectedignoredresults        r   checkz
Base.check   s    
  
 
9~~
 
 
 
 
 CKK#g,,677F(##
vx00000r   N)__name__
__module____qualname__r!    r   r   r   r      s(        1 1 1 1 1 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                    d           d Zd Z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col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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_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read_iceberg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                    | j         | j        z   | j        z   | j        z   | j        z   | j        z   | j        z   | j        z   | j        z   | j	        z   | j
        z   }|                     t          || j                   d S )N)r   r   r   )
public_libprivate_libmiscrf   classesfuncsfuncs_option
funcs_read
funcs_jsonfuncs_toprivate_modulesr!   pdr   )r   
checktheses     r   test_apizTestPDApi.test_api   s    Oi l l	
 j   o o m	 "
# 	 	

R*dl
KKKK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 d S r"   )r   r   r   rf   r   r   r   r   r   r   re   r   __all__)r   r   actual
extraneousmissings        r   test_api_allzTestPDApi.test_api_all   s    Oil l j	
   o o m

 

 '((
) RZh&
~V#{r   c                    | j         | j        z   | j        z   }|D ]H}t          j        t
                    5  t          t          |          }d d d            n# 1 swxY w Y   Id S r"   )re   r   r   r   assert_produces_warningFutureWarninggetattrr   )r   deprecated_listdepr_s       r   	test_deprzTestPDApi.test_depr   s    ##$-. 	
 $ 	& 	&D+M:: & &B%%& & & & & & & & & & & & & & &	& 	&s   AA	A	N)r#   r$   r%   r   r   r   r   r   re   __annotations__rf   r   r   r   r   r   r   r   r   r   r9   appendr   r   r   r&   r   r   r(   r(   (   s_         @??G
 
 
J LKKK '&&D) ) )GX %'&&&& G     EF  L  J0 ##J JIIH -/.... #%$$$$  O  +z***L L 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gZ	g d	Z
d
 Zd Zd Zd Zd Zd Zd Zd ZdS )TestApi)r   r	   r   r   r   r
   	internals)DataFrameGroupByDatetimeIndexResamplerGroupby	ExpandingExpandingGroupbyExponentialMovingWindowExponentialMovingWindowGroupby
Expression
FrozenList
JsonReaderNaTTypeNAType	NoDefaultPeriodIndexResamplerGroupby	ResamplerRollingRollingGroupbySeriesGroupByStataReader	SASReaderTimedeltaIndexResamplerGroupbyTimeGrouperWindowr   )-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_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_categoricalsrU   rX   rW   rV   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ExtensionScalarOpsMixinBaseExecutionEngine)AAggFuncType	AlignJoinAnyAllAnyArrayLike	ArrayLike	AstypeArgAxesAxis	CSVEngineColspaceArgTypeCompressionOptionsCorrelationMethodDropKeepDtypeDtypeArgDtypeBackendDtypeObjExcelWriterIfSheetExistsExcelWriterMergeCellsFilePathFillnaOptionsFloatFormatTypeFormattersTypeFromDictOrientHTMLFlavorsIgnoreRaise
IndexLabelInterpolateOptions
JSONEngineJSONSerializableJoinHowJoinValidateMergeHowMergeValidate
NaPositionNsmallestNlargestKeepOpenFileErrorsOrderedParquetCompressionOptionsQuantileInterpolation
ReadBufferReadCsvBufferReadPickleBufferReindexMethodScalarSequenceNotStr	SliceTypeSortKindStorageOptionsSuffixesTakeIndexerTimeAmbiguousTimeGrouperOriginTimeNonexistentTimeUnitTimedeltaConvertibleTypesTimestampConvertibleTypesToStataByteorderToTimestampHow
UpdateJoinUsecolsArgTypeWindowingRankTypeWriteBufferWriteExcelBuffer
XMLParsersc                F    |                      t          | j                   d S r"   )r!   r   allowed_api_dirsr   s    r   r   zTestApi.test_api  s    

3-.....r   c                F    |                      t          | j                   d S r"   )r!   
api_typingallowed_typingra  s    r   test_api_typingzTestApi.test_api_typing  s    

:t233333r   c                F    |                      t          | j                   d S r"   )r!   	api_typesallowed_api_typesra  s    r   test_api_typeszTestApi.test_api_types  s    

9d455555r   c                F    |                      t          | j                   d S r"   )r!   api_interchangeallowed_api_interchangera  s    r   test_api_interchangezTestApi.test_api_interchange  s    

?D$@AAAAAr   c                F    |                      t          | j                   d S r"   )r!   api_indexersallowed_api_indexersra  s    r   test_api_indexerszTestApi.test_api_indexers  s    

<!:;;;;;r   c                F    |                      t          | j                   d S r"   )r!   api_extensionsallowed_api_extensionsra  s    r   test_api_extensionszTestApi.test_api_extensions  s    

>4#>?????r   c                F    |                      t          | j                   d S r"   )r!   api_executorsallowed_api_executorsra  s    r   test_api_executorszTestApi.test_api_executors  s    

=$"<=====r   c                F    |                      t          | j                   d S r"   )r!   api_aliasesallowed_api_aliasesra  s    r   test_api_typing_aliaseszTestApi.test_api_typing_aliases  s    

; 899999r   N)r#   r$   r%   r`  rd  rh  rl  rp  rt  rx  r|  r   re  ri  rm  rq  ru  ry  r}  r&   r   r   r   r      s           N2. . .^  0=  
 
 
 33B B BH/ / /4 4 46 6 6B B B< < <@ @ @> > >: : : : :r   r   c                      e Zd Zd ZdS )
TestErrorsc                p    g d}|                      t          j        t          j        j        |           d S )N)_CurrentDeprecationWarningabcctypescowr   )r!   r   r1   r   )r   r   s     r   test_errorszTestErrors.test_errors  s2    HHH

29bi/
AAAAAr   N)r#   r$   r%   r  r&   r   r   r  r    s(        B B B B Br   r  c                      e Zd Zd ZdS )TestUtilc                R    |                      t          j        ddgg d           d S )N
hash_arrayhash_pandas_object)_decorators_test_decorators_exceptions_validatorscapitalize_first_letterversion_print_versions_testerr  )r!   r   r8   ra  s    r   	test_utilzTestUtil.test_util  sD    

G/0	 	 	 	 	
 	
 	
 	
 	
r   N)r#   r$   r%   r  r&   r   r   r  r    s#        
 
 
 
 
r   r  c                  "    e Zd Zg dZd Zd ZdS )TestTesting)assert_frame_equalassert_series_equalassert_index_equalassert_extension_array_equalc                H    ddl m} |                     || j                   d S )Nr   )r0   )r7   r0   r!   r   )r   r0   s     r   test_testingzTestTesting.test_testing  s0    """"""

7DJ'''''r   c                    t          j        t          d          5  t          j        j         d d d            d S # 1 swxY w Y   d S )Nfoo)match)pytestraisesAttributeErrorr   r8   r  ra  s    r   test_util_in_top_levelz"TestTesting.test_util_in_top_level  s    ]>777 	 	GKK	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s   ;??N)r#   r$   r%   r   r  r  r&   r   r   r  r    sC          E( ( (
    r   r  module_namestrrecurseboolreturnlist[tuple[str, str, object]]c                d   t          j        |           }g }t          j        |          D ]X\  }}t	          |dd          }t          |t                    r-|                    d          r|                    | ||f           Y|s|S t          |j	        t                    sJ t          j        |j	                  j        g}t          j        |          D ]X}|j        }|                    d          s|dk    r%|                    t#          |j         d| |j                             Y|S )a  
    Get all pandas objects within a module.

    An object is determined to be part of pandas if it has a string
    __module__ attribute that starts with ``"pandas"``.

    Parameters
    ----------
    module_name : str
        Name of the module to search.
    recurse : bool
        Whether to search submodules.

    Returns
    -------
        List of all objects that are determined to be a part of pandas.
    r$   Nr7   r   r   .r  )	importlibimport_moduleinspect
getmembersr   
isinstancer  r   r   __file__pathlibPathparentpkgutilwalk_packagesnameextendget_pandas_objectsr#   ispkg)	r  r  moduleobjsr  objmodule_dunderpathsmodule_infos	            r   r  r    sO   ( $[11FD'// 2 2	c\488mS)) 	2m.F.Fx.P.P 	2KKdC0111  fos+++++\&/**12E,U33 
 
??3 	4;#6#6&/::D::KDUVVV	
 	
 	
 	
 Kr   r7   z
pandas.apizpandas.arrayszpandas.errorsz	pandas.iozPrivate imports)reason)markszpandas.plottingpandas.testingc           	        | dv}t          | |          }d |D             }t          |          dk    s'J d                    d |D                                   g }|D ]k\  } }}t          j        |j                  }	 t          ||           1# t          $ r. |                    | |t          |          |j        f           Y hw xY wt          |          dk    s'J d                    d |D                                   dS )	z^
    Ensures that all public objects have their __module__ set to the public import path.
    )r7   r  r  c                    g | ]I\  }}}|j         |k    s8d |v r|j         dk    s)|dk    r|j         dk    1||t          |          |j         fJS )r+  r7   r>   )r$   type)r   r  r  r  s       r   
<listcomp>z*test_attributes_module.<locals>.<listcomp>(  su     	 	 	"KsNk))4CNh$>$>%%#.H*D*D 
dDIIs~6 +E*D*Dr   r   
c              3  4   K   | ]}t          |          V  d S r"   r  r   es     r   r   z)test_attributes_module.<locals>.<genexpr>2  (      (B(BAQ(B(B(B(B(B(Br   c              3  4   K   | ]}t          |          V  d S r"   r  r  s     r   r   z)test_attributes_module.<locals>.<genexpr><  r  r   N)
r  lenjoinr  r  r$   r   	Exceptionr   r  )r  r  r  failuresr  r  r  s          r   test_attributes_moduler    sM   " !==Gk7;;;D	 	&*	 	 	H x==Atyy(B(B(B(B(BBB H"& L LT3(88	LFD!!!! 	L 	L 	LOO[$S		3>JKKKKK	Lx==Atyy(B(B(B(B(BBBs    B5C	C	)r  r  r  r  r  r  )*
__future__r   r  r  r  r  r  r7   r   r   pandas._testingr   r   
pandas.apir   rw  r   rs  r   ro  r   rk  r	   rg  r
   rc  pandas.api.typingr   r{  r   r(   r   r  r  r  r  markslowparametrizeparamxfailr  r&   r   r   <module>r     s   " " " " " "                                        5 4 4 4 4 41 1 1 1 1 1 1 1 R& R& R& R& R& R& R& R&j: : : : :d : : :DB B B B B B B B
 
 
 
 
t 
 
 
$    $   $) ) ) )X [(9(9AR(9(S(STTT C C  C C Cr   