&Vfi3UdZddlmZddlmZmZmZmZmZddl Z ddl m Z ddl m Z mZddlmZddlmZmZmZerdd lmZmZed edZGd d Zd diZeedddZeedddZdpdZdqdZdqdZiZ de!d<de d<de d <de d!<de d <de d"<ee d#dd$Z"iZ#d%e!d&<de#d<de#d!<de#d"<ee#d#dd$Z$drd)Z%d diZ&d*e!d+<ee&d,dd-Z'edsd0Z(edtd1Z(dud4Z(iZ)d*e!d5<de)d6<de)d <ee)dd7Z*ee)d8ddZ+dvd9Z,iZ-d:e!d;<de-d6<de-d <dddZ.ee-d?ddZ/ddZ?de?d<dZ@e?>ZAe=>ZBd||_||_||_||_dSN)fnamerdefaultsmax_fname_arg_count)selfrrrrs Kc:\PYTHON\DbComparer\venv\Lib\site-packages\pandas/compat/numpy/function.py__init__zCompatValidator.__init__4s'    #6   c0|s|sdS||jn|}||jn|}||jn|}|dkrt||||jdS|dkrt |||jdS|dkrt |||||jdStd|d)Nargskwargsbothzinvalid validation method '')rrrr rrr ValueError)rr#r$rrrs r__call__zCompatValidator.__call__@s F 4#m #*  $ $$  !'F V   %':DM J J J J J x   E64= 9 9 9 9 9 v   $tV%8$-     D6DDDEE Er!)NNN)rrrr)__name__ __module__ __qualname__r r(r!rrr3sc! 7 7 7 7 7  ! FFFFFFFr!routargminr%)rrrargmaxskipnabool | ndarray | Nonertuple[bool, Any]cHt|ts||f|z}d}||fS)NT) isinstancer )r1r#s rprocess_skipnar6hs3&'""fny4 4<r!boolcLt||\}}t|||S)a If 'Series.argmin' is called via the 'numpy' library, the third parameter in its signature is 'out', which takes either an ndarray or 'None', so check if the 'skipna' parameter is either an instance of ndarray or is None, since 'skipna' itself should be a boolean )r6validate_argminr1r#r$s rvalidate_argmin_with_skipnar;p,"&$//LFDD&!!! Mr!cLt||\}}t|||S)a If 'Series.argmax' is called via the 'numpy' library, the third parameter in its signature is 'out', which takes either an ndarray or 'None', so check if the 'skipna' parameter is either an instance of ndarray or is None, since 'skipna' itself should be a boolean )r6validate_argmaxr:s rvalidate_argmax_with_skipnar?|r<r!zdict[str, int | str | None]ARGSORT_DEFAULTSaxis quicksortkindorderstableargsort)rrrzdict[str, int | None]ARGSORT_DEFAULTS_KIND ascendingbool | int | Nonect|s||f|z}d}t||dtt|}|S)a! If 'Categorical.argsort' is called via the 'numpy' library, the first parameter in its signature is 'axis', which takes either an integer or 'None', so check if the 'ascending' parameter has either integer type or is None, since 'ascending' itself should be a boolean NT)r)r validate_argsort_kindrr7)rIr#r$s rvalidate_argsort_with_ascendingrNsT) 1|d" $A>>>>T9%%I r!zdict[str, Any] CLIP_DEFAULTScliprLr rcdSrr,rBr#r$s rvalidate_clip_with_axisrSCr!cdSrr,rRs rrSrSrTr!ndarray | AxisNoneTAxisNoneT | Nonec`t|tr|f|z}d}t|||S)a If 'NDFrame.clip' is called via the numpy library, the third parameter in its signature is 'out', which can takes an ndarray, so check if the 'axis' parameter is an instance of ndarray, since 'axis' itself should either be an integer or None N)r5r validate_cliprRs rrSrSs?$  w~$ Kr!CUM_FUNC_DEFAULTSdtype)rrcumsumct|s |f|z}d}n)t|tjrt |}t ||||S)z If this function is called via the 'numpy' library, the third parameter in its signature is 'dtype', which takes either a 'numpy' dtype or 'None', so check if the 'skipna' parameter is a boolean or not Tr)r r5npbool_r7validate_cum_func)r1r#r$names rvalidate_cum_func_with_skipnarcs^ 6??y4 FBH % %fdF$//// Mr!zdict[str, bool | None]ALLANY_DEFAULTSFkeepdimsallany)r-rer$)r)rBr[r-reminmaxCzdict[str, str]RESHAPE_DEFAULTSreshapeREPEAT_DEFAULTSrepeatROUND_DEFAULTSround SORT_DEFAULTSsort)rrzdict[str, Any | None]STAT_FUNC_DEFAULTSinitialoverwrite_inputsumprodmeanmedianSTAT_DDOF_FUNC_DEFAULTSzdict[str, str | None] TAKE_DEFAULTSraisemodetakeconvertndarray | bool | Nonecjt|ts||f|z}d}t||dd|S)z If this function is called via the 'numpy' library, the third parameter in its signature is 'axis', which takes either an ndarray or 'None', so check if the 'convert' parameter is either an instance of ndarray or is None NTrLr%)rr)r5r validate_take)rr#r$s rvalidate_take_with_convertrHsG '7##wzD $AfEEEE Nr!axes transposerbstrc|g}t|t|z }t|t|zdkrtd|ddS)z 'args' and 'kwargs' should be empty, except for allowed kwargs because all of their necessary parameters are explicitly listed in the function signature Nrz?numpy operations are not valid with groupby. Use .groupby(...). () instead)setlenr )rbr#r$alloweds rvalidate_groupby_funcr\sq  [[3w<< 'F 4yy3v;;""% 2!% 2 2 2   #"r!)rhrirvrwrxstdvarrct|t|zdkr+|tvrtd|dtddS)z 'args' and 'kwargs' should be empty because all of their necessary parameters are explicitly listed in the function signature rzAnumpy operations are not valid with resample. Use .resample(...).rztoo many arguments passed inN)rRESAMPLER_NUMPY_OPSr TypeError)rr#r$s rvalidate_resampler_funcrqsn  4yy3v;;"" ( ( ()9&,999 6777 #"r!AxisInt | Nonendimintcb|dS||ks|dkr||zdkrtd|ddSdS)a Ensure that the axis argument passed to min, max, argmin, or argmax is zero or None, as otherwise it will be incorrectly ignored. Parameters ---------- axis : int or None ndim : int, default 1 Raises ------ ValueError Nrz4`axis` must be fewer than the number of dimensions ())r')rBrs rvalidate_minmax_axisrsQ | t||qTD[1__WPTWWWXXX!__r!)ryrxrhrirvrwcj|tvrt|||St|}|||S)Nr^)_validation_funcsvalidate_stat_func)rr#r$validation_funcs r validate_funcrs? %%%!$e<<<<'.O ?4 ( ((r!)r1r2rr3)r1r2rr7)rIrJrr7)rBr rr)rBrrr)rBrVrrW)r1r7rr7)rrrr7r)rbrrr)rrrr)r/)rBrrrrr)rr)U__doc__ __future__rtypingrrrrrnumpyr_r pandas._libs.libr r pandas.errorsr pandas.util._validatorsr rrpandas._typingrrrrARGMINMAX_DEFAULTSr9r>r6r;r?r@__annotations__validate_argsortrHrMrNrOrYrSrZravalidate_cumsumrcrd validate_all validate_anyLOGICAL_FUNC_DEFAULTSvalidate_logical_funcMINMAX_DEFAULTS validate_min validate_maxrkvalidate_reshapermvalidate_repeatrovalidate_roundrq validate_sortrscopy SUM_DEFAULTS PROD_DEFAULTS MEAN_DEFAULTSMEDIAN_DEFAULTSr validate_sum validate_prod validate_meanvalidate_medianrzvalidate_stat_ddof_funcr{rrTRANSPOSE_DEFAULTSvalidate_transposerrrrrrr,r!rrsQ"#"""""211111 1  T400I)F)F)F)F)F)F)F)FXT]!/hv1"/hv1         132222& !#?I1V 021111 "f!%g"&h'&     "' ----A     *%'&&&&!'%#Of!"/Xf!     +-,,,,# 5Q 5Q !%%88'(=hOOO$tOO5Q 5Q %,S>1111"?If!$*4.0000!/8F#(.... '&a.0 //// f# f g VHMMM ,....."7 5!&&((  V Z Y!!## !!## $))++%*!"# !&:$_%7IIIf!  A  A "/8F354444#' !%&+ #)/*A(SSS') )))) e f VHMMM     d^$_k&a      $J 8 8 8 8YYYYY*      ))))))r!