
    MhP@             
         S r SSKJr  SSKJrJrJrJr  SSKrSSK	r	SSK
Jr  SSKJrJrJrJrJrJrJr  SSKrSSKrSSKrSSKJrJr  SSKJr  SS	KJrJrJ r   SS
K!J"r"  SSK#J$r$  SSK%J&r&  SSK'J(r(  SSK)J*r+  SSK,J-r-J.r.J/r/J0r0J1r1J2r2J3r3  SSK4J5r5J6r6J7r7J8r8  SSK9J:r:  SSK;J<r<J=r=J>r>  SSK?J@r@  SSKAJBrBJCrCJDrDJErEJFrFJGrG  SSKHJIrIJJrJJKrKJLrLJMrMJNrNJOrOJPrP  SSKQJRrRJSrSJTrT  SSKUJVrVJWrW  SSKXJYrY  SSKZJ[r[J\r\J]r]J^r^  SSK_J`r`JaraJbrcJdrdJereJfrfJgrg  SSKhJiri  SSKjJkrk  SSKlJmrm  SSKnJoroJprp  SSKqJrrr  SS KsJtrt  SS!KuJvrv  SS"KwJxryJzrzJ{r{  SS#K|J}r}J~r~  SS$KJrJr  SS%KJr  SS&KJrJrJrJrJrJr  SSKJs  Js  Jar  SS'KJr  SS(KJrJr  SS)KJrJr  SS*KJr  SS+KJr  SS,KJrJr  SS-KJr  SS.KJr  SSKJs  Js  Jr  SS/KJrJrJr  SSKr\(       aV  SS0KJr  SS1KJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJr  SS2KJr  SS3KJr  S4/rS5S4S6S7S8S9S4S:S;S<.	rS= r " S> S4\aGR                  \}5      rg)?zG
Data structure for 1-dimensional cross-sectional and time series data
    )annotations)HashableIterableMappingSequenceN)dedent)IOTYPE_CHECKINGAnyCallableLiteralcastoverload)using_copy_on_writewarn_copy_on_write)_get_option)lib
propertiesreshape)is_range_indexer)PYPY)	REF_COUNT)import_optional_dependency)function)ChainedAssignmentErrorInvalidIndexError_chained_assignment_method_msg_chained_assignment_msg&_chained_assignment_warning_method_msg_chained_assignment_warning_msg_check_cacher)AppenderSubstitutiondeprecate_nonkeyword_argumentsdoc)find_stack_level)validate_ascendingvalidate_bool_kwargvalidate_percentile)astype_is_view)LossySetitemError"construct_1d_arraylike_from_scalarfind_common_typeinfer_dtype_frommaybe_box_nativemaybe_cast_pointwise_result)is_dict_like
is_integeris_iteratoris_list_likeis_object_dtype	is_scalarpandas_dtypevalidate_all_hashable)CategoricalDtypeExtensionDtypeSparseDtype)ABCDataFrame	ABCSeries)is_hashable)isnana_value_for_dtypenotnaremove_na_arraylike)
algorithmsbasecommonmissingnanopsops	roperator)CachedAccessor)SeriesApply)ExtensionArray)ListAccessorStructAccessor)CategoricalAccessor)SparseAccessor)StringDtype)arrayextract_arraysanitize_array)NDFramemake_doc)disallow_ndim_indexingunpack_1tuple)CombinedDatetimelikeProperties)DatetimeIndexIndex
MultiIndexPeriodIndexdefault_indexensure_index)maybe_droplevels)check_bool_indexercheck_dict_or_set_indexers)SingleArrayManagerSingleBlockManager)selectn)_shared_docs)ensure_key_mappednargsort)StringMethods)to_datetime)INFO_DOCSTRING
SeriesInfoseries_sub_kwargs)BlockValuesRefs) AggFuncTypeAnyAllAnyArrayLike	ArrayLikeAxisAxisIntCorrelationMethodDropKeepDtypeDtypeObjFilePath	FrequencyIgnoreRaiseIndexKeyFunc
IndexLabelLevelMutableMappingT
NaPositionNumpySorterNumpyValueArrayLikeQuantileInterpolationReindexMethodRenamerScalarSelfSingleManagerSortKindStorageOptionsSuffixesValueKeyFuncWriteBuffernpt	DataFrameSeriesGroupBySeriesindexz{0 or 'index'}zXaxis : {0 or 'index'}
        Unused. Parameter needed for compatibility with DataFrame.z[inplace : bool, default False
        If True, performs operation inplace and returns None.
np.ndarray z
index : array-like, optional
    New labels for the index. Preferably an Index object to avoid
    duplicating data.
axis : int or str, optional
    Unused.)	axesklassaxes_single_argaxisinplaceunique
duplicatedoptional_byoptional_reindexc                >   ^  U 4S jnST R                    S3Ul         U$ )z&
Install the scalar coercion methods.
c                   > [        U 5      S:X  aR  [        R                  " STR                   STR                   S3[        [        5       S9  T" U R                  S   5      $ [        ST 35      e)N   zCalling zX on a single element Series is deprecated and will raise a TypeError in the future. Use z(ser.iloc[0]) instead
stacklevelr   zcannot convert the series to )lenwarningswarn__name__FutureWarningr&   iloc	TypeError)self	converters    D/var/www/html/env/lib/python3.13/site-packages/pandas/core/series.pywrapper_coerce_method.<locals>.wrapper   su    t9>MM9--. / ))**?A +- TYYq\**7	{CDD    __)r   )r   r   s   ` r   _coerce_methodr      s(    

E I../r2GNr   c                  %  ^  \ rS rSr% SrSr\\\R                  4r
S\S'   S/rS\S'   SS	1\R                  -  r1 S
kr\R"                  R$                  \R$                  -  \" / 5      -  rSr\" \R"                  R,                  R.                  \R"                  R,                  R                  S9rS\S'   SSSSS\R2                  4       GSGS jjr GSH     GSIS jjr\GSJS j5       rS r\GSKS j5       rS r\GSLS j5       r \GSMS j5       r!\GSMS j5       r"\GSNS j5       r#\#RH                  GSOS j5       r#\S 5       r%\S 5       r&\GSPS j5       r'\(" \R"                  RR                  R                  5      \GSQS j5       5       r)GSRGSSS  jjr*GSTS! jr+GSUGSVS" jjr, GSH     GSWS# jjr-SS$.GSXS% jjr.\/" \05      r1\/" \25      r3\GSYS& j5       r4GSZGS[S) jjr5GSZGS\S* jjr6S+ r7S, r8GS]S- jr9GS^S. jr:GS_GS`S0 jjr;GSaS1 jr<GSbGScS3 jjr=GSbGScS4 jjr>GSbGScS5 jjr?GSbGScS6 jjr@GS_GSdS7 jjrA\GSLS8 j5       rBS9 rCGSaS: jrDGSaS; jrEGSaS< jrFGSLU 4S= jjrG GSe       GSfU 4S> jjjrHGSUGSgS? jjrI\J GShS@S@S@S@SA.           GSiSC jjj5       rK\J GShS@S@S@SD.           GSjSE jjj5       rK\J GShS@S@S@SF.           GSkSG jjj5       rK GSUS/\R2                  S/S/SA.           GSlSH jjjrKGSmSI jrL\J          GSn                 GSoSJ jj5       rM\J         GSp                 GSqSK jj5       rM          GSr                     GSsSL jjrM\N" \OSM   \PSN   \Q" SO5      SP9    GSt         GSuSQ jj5       rRGSvSR jrSGSwSS jrT\J    GSxST j5       rU\JS@SU.GSySV jj5       rU\V" SWSX/SYSZ9\W4   GSxS[ jj5       rU\R2                  4GSzS\ jjrX GS{     GS|S] jjrY\(" \Q" S^5      5      \(" \PS_   \O-  5      SS'SS2S2S2\R2                  S24               GS}S` jj5       5       rZGSTSa jr[GSbGS~Sb jjr\GSU 4Sc jjr]\JS@S@S@Sd.       GSSe jj5       r^\JS@S@Sf.       GSSg jj5       r^\JS@S@S@Sd.       GSSh jj5       r^SiS/S/Sd.       GSU 4Sj jjjr^GSGSSk jjr_GSGSSl jjr`GSGSSm jjraGSZGSSn jjrb\J GS     GSSo jj5       rc\J GSh     GSSp jj5       rc\J  GS     GSSq jj5       rc  GS     GSSr jjrc  GS       GSSs jjrd  GS       GSSu jjre\N" S SvSB\Q" Sw5      Sx9GSGSSy jj5       rfGSGSSz jjrgGSS{ jrhS| riS} rj\N" \R"                  R                  S S~9  GS       GSS jj5       rk GS   GSS jjrl\N" \PS   \Q" S5      \OSM   S~9    GS           GSU 4S jjj5       rm GSU       GSS jjrnGSS jroGSS jrp\JS@S@S@S@S@S@S@S.               GSS jj5       rq\JS@S@S@S@S@S@S.               GSS jj5       rq\JS@S@S@S@S@S@S@S.               GSS jj5       rqS'S2S/SSS/SS.               GSS jjrq\JS@S@S@S@S@S@S@S@S.                   GSS jj5       rr\JS@S@S@S@S@S@S@S@S@S.	                   GSS jj5       rr\JS@S@S@S@S@S@S@S@S@S.	                   GSS jj5       rrS'SS2S/SSS2S/SS.	                   GSU 4S jjjrr    GS         GSS jjrs GS     GSS jjrt GS     GSS jjru\N" \OSM   \Q" S5      \Q" S5      S9 GS       GSS jj5       rvGSS jrwGS_GSS jjrx   GS       GSS jjry GSU     GSS jjrzGSUGSS jjr{\Q" S5      r|\Q" S5      r}\N" \PS   \OSM   \OS(   \|\}S9GSGSS jj5       r~\~r\N" \PS   \OSM   \OS(   S9 GSZ     GSS jj5       r\R2                  S4SS.         GSS jjjr        GSS jrGSLS jr\J GShS@S@S@S@S.             GSS jjj5       r\J GShS@S@S@S@S@S.             GSS jjj5       r\J GShS@S@S@S@S@S.             GSS jjj5       r GSUSSS/SSS.             GSU 4S jjjjr\(" S5      \" \OSM   \OS   SvSvSvS9\(" \GR                  R                  5      S'SS.     GSU 4S jjj5       5       5       r\N" \GR                  \OSM   \OS   S9 GSUSSSSSSSS.             GSU 4S jjjj5       r\J GShS@S@S@S.         GSS jjj5       r\J GShS@S@S@S@S.         GSS jjj5       r\J GShS@S@S@S@S.         GSS jjj5       r\N" \GR                  5      \R2                  4\R2                  S'S2S/S.         GSU 4S jjjj5       r\J GShS@S@S@S@S@S.               GSS jjj5       r\J GShS@S@S@S@S@S@S.               GSS jjj5       r\J GShS@S@S@S@S@S@S.               GSS jjj5       r GSUS'SSSS/SS.               GSU 4S jjjjrGSU 4S jjr\N" \40 \D6     GS           GSS jj5       rGSS jrGSGSS jjrGSS jr GS   GSS jjr    GSS jr\N" \GR&                  \OSM   S~9GSS j5       r\N" \GR&                  \OSM   S~9GSU 4S jj5       r\N" \GR*                  \OSM   S~9GSU 4S jj5       r\N" \GR*                  \OSM   S~9GSU 4S jj5       r\JS@S@S@S@S.         GSS jj5       r\JS@S@S@S.         GSS jj5       rS'S/SS/S.         GSS jjr   GS       GSS jjrGSHGSS jjrS/rS\S'   \" \5      rS'rS\S'   SrS\S'   \GR@                  " S'SS9r\" S\5      r\" S\5      r\" S\5      r\" S\GRT                  GRV                  5      r\" S\5      r\" S\5      r\" S\5      r\GRT                  GRf                  rS rS rS rGS_GSS jjrGSHGSS jjr      GSS jrSSS'S.GSS jjr\(" \GRz                  " SS5      5         GS       GSS jj5       r\(" \GRz                  " SS5      5      GSGSS jj5       r\(" \GRz                  " SS5      5      GSGSS jj5       r\(" \GRz                  " SS5      5      GSGSS jj5       r\(" \GRz                  " SS5      5      GSGSS jj5       r\(" \GRz                  " SS5      5      GSGSS jj5       r\(" \GRz                  " GS S5      5      GSGSGS jj5       r\(" \GRz                  " GSS5      5      GSGSGS jj5       r\(" \GRz                  " GSS5      5      GSGSGS jj5       r\r\(" \GRz                  " GSS5      5      GSGSGS jj5       r\(" \GRz                  " GSS5      5         GS       GSGS	 jj5       r\r\(" \GRz                  " GS
S5      5      GSGSGS jj5       r\(" \GRz                  " GSS5      5      GSGSGS jj5       r\r\r\(" \GRz                  " GSS5      5      GSGSGS jj5       r\r\(" \GRz                  " GSS5      5      GSGSGS jj5       r\(" \GRz                  " GSS5      5      GSGSGS jj5       r\(" \GRz                  " GSS5      5      GSGSGS jj5       r\(" \GRz                  " GSS5      5      GSGSGS jj5       r\(" \GRz                  " GSS5      5      GSGSGS jj5       r\(" \GRz                  " GSS5      5      GSGSGS jj5       r\(" \GRz                  " GSS5      5      GSGSGS jj5       r\(" \GRz                  " GSS5      5      GSGSGS jj5       rS'S2S/SGS .       GSGS! jjr\(" \" GS"StGS#95      S'S/S2GS$.       GSGS% jj5       r\(" \" GS&StGS#95         GS       GSGS' jj5       r\N" \" GS(StGS#95         GS     GSGS) jj5       r\N" \" GS*StGS#95         GS     GSGS+ jj5       r\N" \" GS,StGS#95          GS       GSGS- jj5       r\N" \" GS.StGS#95          GS       GSGS/ jj5       r\N" \" GS0StGS#95         GS     GSGS1 jj5       r\N" \" GS2StGS#95         GS     GSGS3 jj5       r\N" \" GS4StGS#95          GS       GSGS5 jj5       r\N" \" GS6StGS#95          GS       GSGS7 jj5       r\N" \" GS8StGS#95          GS       GSGS9 jj5       r\N" \" GS:StGS#95         GS     GSGS; jj5       r\N" \" GS<StGS#95         GS     GSGS= jj5       r\r\r\N" \" GS>StGS#95      GSGSGS? jj5       r\N" \" GS@StGS#95      GSGSGSA jj5       r\N" \" GSBStGS#95      GSGSGSC jj5       r\N" \" GSDSt5      5      GSGSGSE jj5       rGSFrU =r$ (  r   i  a
  
One-dimensional ndarray with axis labels (including time series).

Labels need not be unique but must be a hashable type. The object
supports both integer- and label-based indexing and provides a host of
methods for performing operations involving the index. Statistical
methods from ndarray have been overridden to automatically exclude
missing data (currently represented as NaN).

Operations between Series (+, -, /, \*, \*\*) align values based on their
associated index values-- they need not be the same length. The result
index will be the sorted union of the two indexes.

Parameters
----------
data : array-like, Iterable, dict, or scalar value
    Contains data stored in Series. If data is a dict, argument order is
    maintained.
index : array-like or Index (1d)
    Values must be hashable and have the same length as `data`.
    Non-unique index values are allowed. Will default to
    RangeIndex (0, 1, 2, ..., n) if not provided. If data is dict-like
    and index is None, then the keys in the data are used as the index. If the
    index is not None, the resulting Series is reindexed with the index values.
dtype : str, numpy.dtype, or ExtensionDtype, optional
    Data type for the output Series. If not specified, this will be
    inferred from `data`.
    See the :ref:`user guide <basics.dtypes>` for more usages.
name : Hashable, default None
    The name to give to the Series.
copy : bool, default False
    Copy input data. Only affects Series or 1d ndarray input. See examples.

Notes
-----
Please reference the :ref:`User Guide <basics.series>` for more information.

Examples
--------
Constructing Series from a dictionary with an Index specified

>>> d = {'a': 1, 'b': 2, 'c': 3}
>>> ser = pd.Series(data=d, index=['a', 'b', 'c'])
>>> ser
a   1
b   2
c   3
dtype: int64

The keys of the dictionary match with the Index values, hence the Index
values have no effect.

>>> d = {'a': 1, 'b': 2, 'c': 3}
>>> ser = pd.Series(data=d, index=['x', 'y', 'z'])
>>> ser
x   NaN
y   NaN
z   NaN
dtype: float64

Note that the Index is first build with the keys from the dictionary.
After this the Series is reindexed with the given Index values, hence we
get all NaN as a result.

Constructing Series from a list with `copy=False`.

>>> r = [1, 2]
>>> ser = pd.Series(r, copy=False)
>>> ser.iloc[0] = 999
>>> r
[1, 2]
>>> ser
0    999
1      2
dtype: int64

Due to input data type the Series has a `copy` of
the original data even though `copy=False`, so
the data is unchanged.

Constructing Series from a 1d ndarray with `copy=False`.

>>> r = np.array([1, 2])
>>> ser = pd.Series(r, copy=False)
>>> ser.iloc[0] = 999
>>> r
array([999,   2])
>>> ser
0    999
1      2
dtype: int64

Due to input data type the Series has a `view` on
the original data, so
the data is changed as well.
seriesr   _namez	list[str]	_metadatar   name>   dtcatstrsparsei  )r%   r   _mgrNc                l   U[         R                  La#  [        R                  " S[        [        5       S9  OSnSn[        U[        [        45      (       a  Uc  Uc  USL d  Uc  U(       dG  [        R                  " S[        U5      R                   S[        U 5      R                   S3[        SS9  [        5       (       a  UR                  SS9n[        R                  " X5        U(       a  [        R!                  U S	U5        g X@l        g [        U[$        [&        [(        45      n[+        US
S 5      n	Un
[        U[(        [,        R.                  45      (       aK  USLaF  [        5       (       a7  Ub$  [1        UR2                  [5        U5      5      (       a  UR                  5       nUc  SnU(       Ga  [        U[        [        45      (       dF  [7        SSS9nUS:X  a  [        R8                  " X5      nOUS:X  a  [        R8                  " X5      nSnO%[        5       (       a  U(       d  UR                  SS9nU(       dG  [        R                  " S[        U5      R                   S[        U 5      R                   S3[        SS9  U(       a  UR                  5       n[        R!                  U S	U5        [        R                  " X5        g [        U[        5      (       as  [        5       (       ad  U(       d]  UR                  SS9nU(       dG  [        R                  " S[        U5      R                   S[        U 5      R                   S3[        SS9  [:        R<                  " XA[        U 5      5      nUb  [?        U5      nUb  U RA                  U5      nUc9  Ub  UO
[C        S5      n[E        U5      (       d  Ub  [G        [5        U5      SS9nO/ n[        U[H        5      (       a  [K        S5      eS n[        U[&        5      (       aY  Ub  URM                  USS9n[        5       (       a  URN                  nURP                  nOURP                  R                  5       nSnGO[        U[,        R.                  5      (       a'  [E        UR2                  5      (       a  [S        S5      eGO[        U[$        5      (       aI  Uc'  URT                  nURV                  R                  SS9nGOeURY                  X%S9nSnURV                  nGOF[        U[Z        5      (       a  U R]                  XU5      u  pS nSnGO[        U[        [        45      (       a  Uc  URT                  nO2URT                  R_                  U5      (       a  U(       a  [a        S5      eU(       dI  [        R                  " S[        U5      R                   S[        U 5      R                   S3[        SS9  SnOi[        U[(        5      (       a  OS[b        Rd                  " U5      n[g        U5      (       a-  [E        U5      (       d  Uc  [,        R2                  " [        5      nUc(  [g        U5      (       d  U/n[C        [E        U5      5      nO&[g        U5      (       a  [b        Rh                  " X5        [        U[        [        45      (       a-  Ub  URM                  USUS9nOfU(       a  UR                  5       nON[k        XX55      n[7        SSS9nUS:X  a  [        R8                  " XUS9nOUS:X  a  [        R8                  " X5      n[        R                  " X5        X@l        U Rm                  SU5        U
cQ  U(       aI  U	[,        Rn                  :X  a4  U R2                  U	:w  a#  [        R                  " S[p        [        5       S9  g g g g g )NzZThe 'fastpath' keyword in pd.Series is deprecated and will be removed in a future version.r   Fz
Passing a z to zK is deprecated and will raise in a future version. Use public APIs instead.   deepr   dtypezmode.data_managerT)silentblockrR   r   compatz8initializing a Series from a MultiIndex is not supportedcopyzVCannot construct a Series from an ndarray with compound dtype.  Use DataFrame instead.zkCannot pass both SingleBlockManager `data` argument and a different `index` argument. `copy` must be False.ignore)r   errorsr   )refszDtype inference on a pandas object (Series, Index, ExtensionArray) is deprecated. The Series constructor will keep the original dtype in the future. Call `infer_objects` on the result to get the old behavior.)9r   
no_defaultr   r   DeprecationWarningr&   
isinstancerd   rc   typer   r   r   rU   __init__object__setattr__r   r   r[   rL   getattrnpndarrayr*   r   r7   r   
from_arrayibasemaybe_extract_namer_   _validate_dtyper^   r   r@   r\   NotImplementedErrorastype_references_values
ValueErrorr   r   reindexr   
_init_dictequalsAssertionErrorcommaybe_iterable_to_listr4   require_length_matchrT   	_set_axisobject_r   )r   datar   r   r   r   fastpath	allow_mgris_pandas_object
data_dtypeoriginal_dtypemanagerr   s                r   r   Series.__init__  s    3>>)MM2"+-	 H	t02DEFF$, d!4!4 5T$t*:M:M9N O/ / '  #$$yyey,T(""4$7  !	%dVUN,KLT7D1
d^RZZ8995 %8%:%:=N4::|E?R$S$S99;D<D d%79K$LMM%&9$Gg%-88ED'-88ED 	$&&tyyey, d!4!4 5T$t*:M:M9N O/ / '  yy{tWd3T(d.//4G4I4IRV99%9(D d!4!4 5T$t*:M:M9N O/ / '  ''DJ? 'E((/E<".EM!4DE5zzU.),u*=eLdJ''%J  dE"" {{5u{5"$$''|| ||((*Dbjj))4:: !>   f%%}

yy~~5~1||E|5yyg&&//$u=KDED13EFGG}

ZZ&&u-- %>   d!4!4 5T$t*:M:M9N O/ / '  !	n----d3DD!!#d))(=%%v!#d),E$$$T1 d/1CDEE {{xd{Kyy{!$u;D!"5dCG'!)44TtLG#)44TA$	q% !&6:;SzzZ'R "/1 ( <T&6!r   c                d   U(       a3  [        UR                  5       5      n[        UR                  5       5      nO;Ub,  [	        U5      (       d  Ub  [        [        U5      SS9nO/ nUnO[        S5      / pT[        XTUS9nU(       a  Ub  UR                  USS9nUR                  UR                  4$ )a  
Derive the "_mgr" and "index" attributes of a new Series from a
dictionary input.

Parameters
----------
data : dict or dict-like
    Data used to populate the new Series.
index : Index or None, default None
    Index for the new Series: if None, use dict keys.
dtype : np.dtype, ExtensionDtype, or None, default None
    The dtype for the new Series: if None, infer from data.

Returns
-------
_data : BlockManager for the new Series
index : index for the new Series
Fr   r   )r   r   r   )tuplekeyslistvaluesr   r@   r7   r^   r   r   r   r   )r   r   r   r   r   r   ss          r   r   Series._init_dict_  s    2 
 %D$++-(F 5zzU.+L,?ND(+R& 6U3 E%		%e	,Avvqwwr   c                    [         $ N)r   r   s    r   _constructorSeries._constructor  s    r   c                    [         R                  XS9nS Ul        [        U 5      [         L a  U$ U R	                  U5      $ Nr   )r   	_from_mgrr   r   r   )r   mgrr   sers       r   _constructor_from_mgrSeries._constructor_from_mgr  sB    s.	: J   %%r   c                    SSK Jn  U$ )ze
Used when a manipulation result has one higher dimension as the
original, such as Series.to_frame()
r   r   )pandas.core.framer   )r   r   s     r   _constructor_expanddimSeries._constructor_expanddim  s     	0r   c                    SSK Jn  UR                  " XR                  S9n[	        U 5      [
        L a  U$ U R                  U5      $ )Nr   r   r   )r  r   r   r   r   r   r  )r   r   r   r   dfs        r   _constructor_expanddim_from_mgr&Series._constructor_expanddim_from_mgr  s?    /  884: I **2..r   c                .    U R                   R                  $ r   )r   _can_hold_nar   s    r   r  Series._can_hold_na  s    yy%%%r   c                .    U R                   R                  $ )z|
Return the dtype object of the underlying data.

Examples
--------
>>> s = pd.Series([1, 2, 3])
>>> s.dtype
dtype('int64')
)r   r   r   s    r   r   Series.dtype  s     yyr   c                    U R                   $ )z}
Return the dtype object of the underlying data.

Examples
--------
>>> s = pd.Series([1, 2, 3])
>>> s.dtypes
dtype('int64')
r   r   s    r   dtypesSeries.dtypes  s     zzr   c                    U R                   $ )a  
Return the name of the Series.

The name of a Series becomes its index or column name if it is used
to form a DataFrame. It is also used whenever displaying the Series
using the interpreter.

Returns
-------
label (hashable object)
    The name of the Series, also the column name if part of a DataFrame.

See Also
--------
Series.rename : Sets the Series name when given a scalar input.
Index.name : Corresponding Index property.

Examples
--------
The Series name can be set initially when calling the constructor.

>>> s = pd.Series([1, 2, 3], dtype=np.int64, name='Numbers')
>>> s
0    1
1    2
2    3
Name: Numbers, dtype: int64
>>> s.name = "Integers"
>>> s
0    1
1    2
2    3
Name: Integers, dtype: int64

The name of a Series within a DataFrame is its column name.

>>> df = pd.DataFrame([[1, 2], [3, 4], [5, 6]],
...                   columns=["Odd Numbers", "Even Numbers"])
>>> df
   Odd Numbers  Even Numbers
0            1             2
1            3             4
2            5             6
>>> df["Even Numbers"].name
'Even Numbers'
)r   r   s    r   r   Series.name  s    ` zzr   c                r    [        U[        U 5      R                   S3S9  [        R	                  U SU5        g )Nz.name)
error_namer   )r8   r   r   r   r   )r   values     r   r   r    s0    e4:3F3F2Gu0MN4%0r   c                6    U R                   R                  5       $ )a  
Return Series as ndarray or ndarray-like depending on the dtype.

.. warning::

   We recommend using :attr:`Series.array` or
   :meth:`Series.to_numpy`, depending on whether you need
   a reference to the underlying data or a NumPy array.

Returns
-------
numpy.ndarray or ndarray-like

See Also
--------
Series.array : Reference to the underlying data.
Series.to_numpy : A NumPy array representing the underlying data.

Examples
--------
>>> pd.Series([1, 2, 3]).values
array([1, 2, 3])

>>> pd.Series(list('aabc')).values
array(['a', 'a', 'b', 'c'], dtype=object)

>>> pd.Series(list('aabc')).astype('category').values
['a', 'a', 'b', 'c']
Categories (3, object): ['a', 'b', 'c']

Timezone aware datetime data is converted to UTC:

>>> pd.Series(pd.date_range('20130101', periods=3,
...                         tz='US/Eastern')).values
array(['2013-01-01T05:00:00.000000000',
       '2013-01-02T05:00:00.000000000',
       '2013-01-03T05:00:00.000000000'], dtype='datetime64[ns]')
)r   external_valuesr   s    r   r   Series.values  s    P yy((**r   c                6    U R                   R                  5       $ )a  
Return the internal repr of this data (defined by Block.interval_values).
This are the values as stored in the Block (ndarray or ExtensionArray
depending on the Block class), with datetime64[ns] and timedelta64[ns]
wrapped in ExtensionArrays to match Index._values behavior.

Differs from the public ``.values`` for certain data types, because of
historical backwards compatibility of the public attribute (e.g. period
returns object ndarray and datetimetz a datetime64[ns] ndarray for
``.values`` while it returns an ExtensionArray for ``._values`` in those
cases).

Differs from ``.array`` in that this still returns the numpy array if
the Block is backed by a numpy array (except for datetime64 and
timedelta64 dtypes), while ``.array`` ensures to always return an
ExtensionArray.

Overview:

dtype       | values        | _values       | array                 |
----------- | ------------- | ------------- | --------------------- |
Numeric     | ndarray       | ndarray       | NumpyExtensionArray   |
Category    | Categorical   | Categorical   | Categorical           |
dt64[ns]    | ndarray[M8ns] | DatetimeArray | DatetimeArray         |
dt64[ns tz] | ndarray[M8ns] | DatetimeArray | DatetimeArray         |
td64[ns]    | ndarray[m8ns] | TimedeltaArray| TimedeltaArray        |
Period      | ndarray[obj]  | PeriodArray   | PeriodArray           |
Nullable    | EA            | EA            | EA                    |

)r   internal_valuesr   s    r   r   Series._values?  s    @ yy((**r   c                    [        U R                  [        5      (       a  g U R                  R                  R                  $ r   )r   r   rc   _blockr   r   s    r   r   Series._referencesa  s-    dii!344yy$$$r   c                6    U R                   R                  5       $ r   )r   array_valuesr   s    r   rR   Series.arrayh  s     yy%%''r   r   c                    [         R                  " S[        SS9  U R                  R	                  US9n[        U[        R                  5      (       a   [        5       (       a  SUR                  l
        U$ )a  
Return the flattened underlying data as an ndarray or ExtensionArray.

.. deprecated:: 2.2.0
    Series.ravel is deprecated. The underlying array is already 1D, so
    ravel is not necessary.  Use :meth:`to_numpy` for conversion to a numpy
    array instead.

Returns
-------
numpy.ndarray or ExtensionArray
    Flattened data of the Series.

See Also
--------
numpy.ndarray.ravel : Return a flattened array.

Examples
--------
>>> s = pd.Series([1, 2, 3])
>>> s.ravel()  # doctest: +SKIP
array([1, 2, 3])
zSeries.ravel is deprecated. The underlying array is already 1D, so ravel is not necessary.  Use `to_numpy()` for conversion to a numpy array instead.r   r   )orderF)r   r   r   r   ravelr   r   r   r   flags	writeable)r   r'  arrs      r   r(  Series.raveln  sa    0 	 	
 ll  u -c2::&&+>+@+@"'CII
r   c                ,    [        U R                  5      $ )z"
Return the length of the Series.
)r   r   r   s    r   __len__Series.__len__  s     499~r   c                   [         R                  " S[        SS9  U R                  R	                  U5      nU R                  X R                  SS9n[        UR                  [        5      (       aL  UR                  R                  n[        SU R                  5      Ul        UR                  R                  U5        UR                  U SS9$ )	aX  
Create a new view of the Series.

.. deprecated:: 2.2.0
    ``Series.view`` is deprecated and will be removed in a future version.
    Use :meth:`Series.astype` as an alternative to change the dtype.

This function will return a new Series with a view of the same
underlying values in memory, optionally reinterpreted with a new data
type. The new data type must preserve the same size in bytes as to not
cause index misalignment.

Parameters
----------
dtype : data type
    Data type object or one of their string representations.

Returns
-------
Series
    A new Series object as a view of the same data in memory.

See Also
--------
numpy.ndarray.view : Equivalent numpy function to create a new view of
    the same data in memory.

Notes
-----
Series are instantiated with ``dtype=float64`` by default. While
``numpy.ndarray.view()`` will return a view with the same data type as
the original array, ``Series.view()`` (without specified dtype)
will try using ``float64`` and may fail if the original data type size
in bytes is not the same.

Examples
--------
Use ``astype`` to change the dtype instead.
zxSeries.view is deprecated and will be removed in a future version. Use ``astype`` as an alternative to change the dtype.r   r   Fr   r   rn   viewmethod)r   r   r   rR   r2  r   r   r   r   rd   r!  r   r   r   add_reference__finalize__)r   r   
res_valuesres_serblks        r   r2  Series.view  s    P 	D		
 ZZ__U+
##Jjju#Mgll$677,,%%C-t/?/?@CHHH""3'##D#88r   c                    U R                   n[        R                  " X1S9n[        5       (       aF  [	        UR
                  UR
                  5      (       a!  UR                  5       nSUR                  l        U$ )a  
Return the values as a NumPy array.

Users should not call this directly. Rather, it is invoked by
:func:`numpy.array` and :func:`numpy.asarray`.

Parameters
----------
dtype : str or numpy.dtype, optional
    The dtype to use for the resulting NumPy array. By default,
    the dtype is inferred from the data.

copy : bool or None, optional
    Unused.

Returns
-------
numpy.ndarray
    The values in the series converted to a :class:`numpy.ndarray`
    with the specified `dtype`.

See Also
--------
array : Create a new array from data.
Series.array : Zero-copy view to the array backing the Series.
Series.to_numpy : Series method for similar behavior.

Examples
--------
>>> ser = pd.Series([1, 2, 3])
>>> np.asarray(ser)
array([1, 2, 3])

For timezone-aware data, the timezones may be retained with
``dtype='object'``

>>> tzser = pd.Series(pd.date_range('2000', periods=2, tz="CET"))
>>> np.asarray(tzser, dtype="object")
array([Timestamp('2000-01-01 00:00:00+0100', tz='CET'),
       Timestamp('2000-01-02 00:00:00+0100', tz='CET')],
      dtype=object)

Or the values may be localized to UTC and the tzinfo discarded with
``dtype='datetime64[ns]'``

>>> np.asarray(tzser, dtype="datetime64[ns]")  # doctest: +ELLIPSIS
array(['1999-12-31T23:00:00.000000000', ...],
      dtype='datetime64[ns]')
r  F)	r   r   asarrayr   r*   r   r2  r)  r*  )r   r   r   r   r+  s        r   	__array__Series.__array__  sU    h jj-  ^FLL#))%L%L((*C"'CII
r   api_versionc               J    [        S5      nUR                  R                  XS9$ )z
Provide entry point to the Consortium DataFrame Standard API.

This is developed and maintained outside of pandas.
Please report any issues to https://github.com/data-apis/dataframe-api-compat.
dataframe_api_compatr?  )r   pandas_standard$convert_to_standard_compliant_column)r   r@  rB  s      r   __column_consortium_standard__%Series.__column_consortium_standard__  s2      ::PQ 00UU V 	
r   c                    U R                   /$ )z'
Return a list of the row axis labels.
r   r   s    r   r   Series.axes'  s    
 

|r   r   r   c                     U R                   U   $ )zs
Return the i-th value or values in the Series by location.

Parameters
----------
i : int

Returns
-------
scalar
)r   )r   ir   s      r   _ixsSeries._ixs1  s     ||Ar   c                    U R                   R                  XS9nU R                  X3R                  S9nU R                  Ul        UR                  U 5      $ )N)r   r   )r   	get_slicer  r   r   r6  )r   slobjr   r   outs        r   _sliceSeries._slice?  sN     ii!!%!3((88(<JJ	%%r   c                   [        U5        [        R                  " X5      nU[        L a/  [	        5       (       d  [        5       (       a  U R                  SS9$ U $ [        U5      n[        U[        [        45      (       a  [        U5      n[        U5      (       aL  U R                  R                  (       a1  [        R                   " S["        [%        5       S9  U R&                  U   $ U(       a  U R)                  U5      $ [+        U5      (       a  [        U5      n[-        U5      (       a)  [        U[.        5      (       d   U R)                  U5      nU$ [        U[.        5      (       a  U R;                  U5      $ [        R<                  " U5      (       a@  [?        U R                  U5      n[@        RB                  " U[D        S9nU RG                  U5      $ U RI                  U5      $ ! [0        [2        [4        4 aJ    [        U[        5      (       a2  [        U R                  [6        5      (       a  U R9                  U5      s $  Nf = f)NFr   Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`r   r  )%rb   r   apply_if_callableEllipsisr   r   r   r6   r   r   r   rX   r2   r   _should_fallback_to_positionalr   r   r   r&   r   
_get_valuer3   r>   sliceKeyErrorr   r   r\   _get_values_tuple_getitem_sliceis_bool_indexerra   r   r<  bool_get_rows_with_mask	_get_with)r   keykey_is_scalarresults       r   __getitem__Series.__getitem__G  s   "3'##C.(?"$$(:(<(<yyey,,K!#cD%=))$Cc??tzzHHMM; +- <<$$??3'' ss)CsJsE$:$:7- c5!!&&s++s##$TZZ5C**S-C++C00~~c""# i):; 7 c5))jZ.P.P  11#667s    G% %AIIc                T   [        U[        5      (       a  [        S5      e[        U[        5      (       a  U R	                  U5      $ [        U5      (       d  U R                  U   $ [        U[        [        R                  [        [        [        45      (       d  [        U5      n[        R                  " USS9nUS:X  a[  U R                  R                   (       d  U R                  U   $ ["        R$                  " S[&        [)        5       S9  U R*                  U   $ U R                  U   $ )NzWIndexing a Series with DataFrame is not supported, use the appropriate DataFrame columnFskipnaintegerrU  r   )r   r<   r   r   r\  r4   locr   r   r   rL   r   r[   r   infer_dtyper   rX  r   r   r   r&   r   )r   rb  key_types      r   ra  Series._get_with  s    c<((B  U##))#..c""88C= #bjj.&%PQQs)C??3u5 y  ::<<xx}$? "/1 yy~% xx}r   c                   [         R                  " U6 (       a0  [        R                  " U R                  U   5      n[        U5        U$ [        U R                  [        5      (       d  [        S5      eU R                  R                  U5      u  p4U R                  U R                  U   USS9n[        U[        5      (       a%  UR                  R                  U R                  5        UR                  U 5      $ )N0key of type tuple not found and not a MultiIndexFr1  )r   any_noner   r<  r   rW   r   r   r\   r[  get_loc_levelr   rZ  r   add_referencesr6  )r   rb  rd  indexer	new_indexnew_sers         r   r\  Series._get_values_tuple  s    << ZZS 12F"6*M$**j11MNN "ZZ55c:##DLL$9QV#Wgu%%LL''		2##D))r   c                    U R                   R                  U5      nU R                  X"R                  S9R	                  U 5      $ r   )r   get_rows_with_maskr  r   r6  )r   rt  new_mgrs      r   r`  Series._get_rows_with_mask  s:    ))..w7))')ERRSWXXr   Fc                f   U(       a  U R                   U   $ U R                  R                  U5      n[        U5      (       a  U R                   U   $ [	        U R                  [
        5      (       a  U R                  nU R                   U   n[        U5      S:X  a  UR                  S:X  a  US   $ XC   n[        Xa5      nU R                  XVU R                  SS9n[	        U[        5      (       a%  UR                  R                  U R                  5        UR                  U 5      $ U R                  U   $ )z
Quickly retrieve single value at passed index label.

Parameters
----------
label : object
takeable : interpret the index as indexers, default False

Returns
-------
scalar value
r   r   Fr   r   r   )r   r   get_locr2   r   r\   r   nlevelsr`   r   r   rZ  r   rs  r6  r   )r   labeltakeablerk  mi
new_valuesru  rv  s           r   rY  Series._get_value  s    <<&& jj  'c??<<$$djj*--Bc*J:!#

a!!}$I(:I''$))% ( G #u%%++DII6''-- 99S>!r   c                   Sn[         (       dH  [        5       (       a9  [        R                  " U 5      S::  a  [        R
                  " [        [        SS9  O[         (       d  [        5       (       d  [        R                  " U 5      nSn[        5       (       d  [        U 5      (       a  US-  nXE::  at  [        5       (       dE  [        5       (       dV  U R                  R                  S   R                  R                  5       (       a   Sn[        R
                  " [        [        SS9  [!        U5        ["        R$                  " X5      nU R'                  5       nU[(        L a  [+        S 5      n[-        U[*        5      (       a*  U R.                  R1                  USS	9nU R3                  XrUS
9$  U R5                  XUS
9  U(       a  U Rk                  SS9  g g ! [6         a    [9        U5      (       a`  U R.                  R:                  (       d  X R<                  U'    N][        R
                  " S[        [?        5       S9  U R3                  X5         NX R<                  U'    N[@        [B        [D        4 a/    U R.                  RG                  U5      nU R3                  Xr5         N[H         Ga]  n[-        U[J        5      (       a+  [-        U R.                  [L        5      (       d  [7        S5      Ue["        RN                  " U5      (       a  [Q        U R.                  U5      n[R        RT                  " U[V        S9n[Y        U5      (       ap  [[        U5      [[        U 5      :w  aX  [-        U[\        5      (       dC  [_        U R`                  5      (       d)  URc                  5       S   nU R3                  Xr5         S nAg  U Re                  U) USUS9  O! [H         a    X Rf                  U'    Of = f S nAg U Ri                  XUS
9   S nAGNFS nAff = f)NT   r   r   r   r   Fgetitemkindr   Series.__setitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To set a value by position, use `ser.iloc[pos] = value`rp  r  )r   r   r   )6r   r   sysgetrefcountr   r   r   r   r   r!   r   blocksr   has_referencer    r   rb   r   rV  %_check_is_chained_assignment_possiblerW  rZ  r   r   _convert_slice_indexer_set_values_set_with_enginer[  r2   rX  rk  r&   r   r   r+   r~  r   r   r\   r^  ra   r   r<  r_  r4   r   r   r5   r   nonzero_wherer   	_set_with_maybe_update_cacher)	r   rb  r  r   ctr	ref_countcacher_needs_updatingrt  errs	            r   __setitem__Series.__setitem__  s5   t+--t$)+-CPQ 133//$'CI%''M$,?,?Q	"$$*,,		((+00>>@@ 3]q 	#3'##C. $ J J L(?+Cc5!!jj77)7LG##G#>>C	6!!#4!8H !%%d%3 !G  	& #zz@@$)HHSM
 MMK &#3#5 $$S0 !&:'89 	-jj((-GW,  #	6#u%%jZ.P.P F ""3''(S9jjD1 !''E
c$i/&uf55+DJJ77
 "kkmA.G$$W4+KKeTKE( +%*IIcN+  s5G#	6s]   *G AP3PPA P
P(DP 3OP O"P !O""P *P  PTc                n    U R                   R                  U5      nU R                  R                  XBUS9  g )Nr  )r   r~  r   setitem_inplace)r   rb  r  r   rk  s        r   r  Series._set_with_engineY  s/    jj  % 			!!#4!8r   c                |   [        U[        5      (       a   e[        U5      (       a  [        U5      nU R                  R
                  (       d  U R                  XUS9  g [        R                  " USS9nUS:X  a3  [        R                  " S[        [        5       S9  U R                  XUS9  g U R                  XUS9  g )Nr  Frh  rj  r  r   )r   r   r3   r   r   rX  _set_labelsr   rl  r   r   r   r&   r  )r   rb  r  r   rm  s        r   r  Series._set_with_  s     c5))))ss)Czz88Sd3
 s59H9$G "/1   $ 7  $ 7r   c                    [         R                  " U5      nU R                  R                  U5      nUS:H  nUR	                  5       (       a  [        X    S35      eU R                  XBUS9  g )Nz not in indexr  )r   asarray_tuplesafer   get_indexeranyr[  r  )r   rb  r  r   rt  masks         r   r  Series._set_labels  sa    ##C("jj44S9"}88::ci[677d3r   c                    [        U[        [        45      (       a  UR                  nU R                  R                  XUS9U l        U R                  5         g )N)rt  r  r   )r   r[   r   r   r   setitemr  )r   rb  r  r   s       r   r  Series._set_values  sC    cE6?++++CII%%cT%J	!!#r   c                    U(       d   U R                   R                  U5      nOUnU R	                  XB5        g! [         a    X R                  U'    gf = f)aH  
Quickly set single value at passed label.

If label is not contained, a new object is created with the label
placed at the end of the result index.

Parameters
----------
label : object
    Partial indexing with MultiIndex not allowed.
value : object
    Scalar value.
takeable : interpret the index as indexers, default False
N)r   r~  r[  rk  r  )r   r  r  r  rk  s        r   
_set_valueSeries._set_value  sT     jj((/ C$  "'s   9 AAc                     [        U SS5      SL$ )z3Return boolean indicating if self is cached or not._cacherNr   r   s    r   
_is_cachedSeries._is_cached  s     tY-T99r   c                :    [        U SS5      nUb
  US   " 5       nU$ )zreturn my cacher or Noner  Nr   r  )r   cachers     r   _get_cacherSeries._get_cacher  s&    y$/AY[Fr   c                ,    [        U S5      (       a  U ?gg)z
Reset the cacher.
r  N)hasattrr  r   s    r   _reset_cacherSeries._reset_cacher  s     4## $r   c                ^    [        5       (       a  gU[        R                  " U5      4U l        g)zK
Set the _cacher attribute on the calling object with a weakref to
cacher.
N)r   weakrefrefr  )r   itemr  s      r   _set_as_cachedSeries._set_as_cached  s%    
   gkk&12r   c                    g r    r   s    r   _clear_item_cacheSeries._clear_item_cache  s    r   c                   > U R                   (       aF  U R                  (       a5  U R                  5       nUb!  UR                  (       a  U R	                  SSS9  g[
        TU ]  5       $ )z;
See NDFrame._check_is_chained_assignment_possible.__doc__
referentT)tforce)_is_viewr  r  _is_mixed_type_check_setitem_copysuperr  )r   r  	__class__s     r   r  ,Series._check_is_chained_assignment_possible  sQ     ==T__""$C3#5#5((:T(Bw<>>r   c                L  > [        5       (       a  g[        U SS5      nUbu  US   " 5       nUc  U ?Oe[        U 5      [        U5      :X  a.  U R                  UR
                  ;   a  UR                  US   XS9  OUR                  R                  US   S5        [        TU ])  XUS9  g)z*
See NDFrame._maybe_update_cacher.__doc__
Nr  r   r   r  )clearverify_is_copyr   )r   r   r  r   r   columns_maybe_cache_changed_item_cachepopr  r  )r   r  r  r   r  r  r  s         r   r  Series._maybe_update_cacher  s       y$/#AY[C {LTc#h&499+C ((D(J ##F1It4$ 	% 	
r   c                    [         R                  " SSU05        U R                  R                  U5      nU R                  R                  U5      nU R                  XCSS9R                  U SS9$ )aZ  
Repeat elements of a Series.

Returns a new Series where each element of the current Series
is repeated consecutively a given number of times.

Parameters
----------
repeats : int or array of ints
    The number of repetitions for each element. This should be a
    non-negative integer. Repeating 0 times will return an empty
    Series.
axis : None
    Unused. Parameter needed for compatibility with DataFrame.

Returns
-------
Series
    Newly created Series with repeated elements.

See Also
--------
Index.repeat : Equivalent function for Index.
numpy.repeat : Similar method for :class:`numpy.ndarray`.

Examples
--------
>>> s = pd.Series(['a', 'b', 'c'])
>>> s
0    a
1    b
2    c
dtype: object
>>> s.repeat(2)
0    a
0    a
1    b
1    b
2    c
2    c
dtype: object
>>> s.repeat([1, 2, 3])
0    a
1    b
1    b
2    c
2    c
2    c
dtype: object
r  r   Fr1  repeatr3  )nvvalidate_repeatr   r  r   r   r6  )r   repeatsr   ru  r  s        r   r  Series.repeat  so    f 	2~.JJ%%g.	\\((1
  5 IVV W 
 	
r   .)dropr   r   allow_duplicatesr   c                   g r   r  r   levelr  r   r   r  s         r   reset_indexSeries.reset_index4       	r   )r   r   r  c                   g r   r  r  s         r   r  r  @  r  r   )r  r   r  c                   g r   r  r  s         r   r  r  L  r  r   c               @   [        US5      nU(       Ga$  [        [        U 5      5      nUb  [        U[        [
        45      (       d  U/nOUnU Vs/ s H  oR                  R                  U5      PM     nn[        U5      U R                  R                  :  a  U R                  R                  U5      nU(       a  X`l        g[        5       (       a%  U R                  SS9n	Xil        U	R                  U SS9$ U R                  U R                  R                  5       USU R                  S9R                  U SS9$ U(       a  [!        S5      eU["        R$                  L a  U R&                  c  S	nOU R&                  nU R)                  U5      n
U
R+                  XUS
9$ s  snf )a	  
Generate a new DataFrame or Series with the index reset.

This is useful when the index needs to be treated as a column, or
when the index is meaningless and needs to be reset to the default
before another operation.

Parameters
----------
level : int, str, tuple, or list, default optional
    For a Series with a MultiIndex, only remove the specified levels
    from the index. Removes all levels by default.
drop : bool, default False
    Just reset the index, without inserting it as a column in
    the new DataFrame.
name : object, optional
    The name to use for the column containing the original Series
    values. Uses ``self.name`` by default. This argument is ignored
    when `drop` is True.
inplace : bool, default False
    Modify the Series in place (do not create a new object).
allow_duplicates : bool, default False
    Allow duplicate column labels to be created.

    .. versionadded:: 1.5.0

Returns
-------
Series or DataFrame or None
    When `drop` is False (the default), a DataFrame is returned.
    The newly created columns will come first in the DataFrame,
    followed by the original Series values.
    When `drop` is True, a `Series` is returned.
    In either case, if ``inplace=True``, no value is returned.

See Also
--------
DataFrame.reset_index: Analogous function for DataFrame.

Examples
--------
>>> s = pd.Series([1, 2, 3, 4], name='foo',
...               index=pd.Index(['a', 'b', 'c', 'd'], name='idx'))

Generate a DataFrame with default index.

>>> s.reset_index()
  idx  foo
0   a    1
1   b    2
2   c    3
3   d    4

To specify the name of the new column use `name`.

>>> s.reset_index(name='values')
  idx  values
0   a       1
1   b       2
2   c       3
3   d       4

To generate a new Series with the default set `drop` to True.

>>> s.reset_index(drop=True)
0    1
1    2
2    3
3    4
Name: foo, dtype: int64

The `level` parameter is interesting for Series with a multi-level
index.

>>> arrays = [np.array(['bar', 'bar', 'baz', 'baz']),
...           np.array(['one', 'two', 'one', 'two'])]
>>> s2 = pd.Series(
...     range(4), name='foo',
...     index=pd.MultiIndex.from_arrays(arrays,
...                                     names=['a', 'b']))

To remove a specific level from the Index, use `level`.

>>> s2.reset_index(level='a')
       a  foo
b
one  bar    0
two  bar    1
one  baz    2
two  baz    3

If `level` is not set, all levels are removed from the Index.

>>> s2.reset_index()
     a    b  foo
0  bar  one    0
1  bar  two    1
2  baz  one    2
3  baz  two    3
r   NFr   r  r3  )r   r   r   z<Cannot reset_index inplace on a Series to create a DataFramer   )r  r  r  )r(   r^   r   r   r   r   r   _get_level_numberr  	droplevelr   r   r6  r   r   r   r   r   r   r   to_framer  )r   r  r  r   r   r  ru  
level_listlevrv  r	  s              r   r  r  X  s   Z &gy9%c$i0I !%%77"'J!&JKUV:Cjj::3?:
Vz?TZZ%7%77 $

 4 4Z @I&
4 3 %&&)))/ )++D+GG((LL%%'yuDJJ ) ,tM,:; N  s~~% 99$D99Dt$B>>9I "  9 Ws   $Fc                P    [         R                  " 5       nU R                  " S0 UD6$ )z9
Return a string representation for a particular Series.
r  )fmtget_series_repr_params	to_string)r   repr_paramss     r   __repr__Series.__repr__  s$    
 002~~,,,r   c                    g r   r  r   bufna_repfloat_formatheaderr   lengthr   r   max_rowsmin_rowss              r   r  Series.to_string       	r   c                    g r   r  r  s              r   r  r  
  r  r   c                   [         R                  " U UUUUUUUU
U	S9
nUR                  5       n[        U[        5      (       d*  [        S[        [        U5      R                  5       35      eUc  U$ [        US5      (       a  UR                  U5        g[        USSS9 nUR                  U5        SSS5        g! , (       d  f       g= f)a.  
Render a string representation of the Series.

Parameters
----------
buf : StringIO-like, optional
    Buffer to write to.
na_rep : str, optional
    String representation of NaN to use, default 'NaN'.
float_format : one-parameter function, optional
    Formatter function to apply to columns' elements if they are
    floats, default None.
header : bool, default True
    Add the Series header (index name).
index : bool, optional
    Add index (row) labels, default True.
length : bool, default False
    Add the Series length.
dtype : bool, default False
    Add the Series dtype.
name : bool, default False
    Add the Series name if not None.
max_rows : int, optional
    Maximum number of rows to show before truncating. If None, show
    all.
min_rows : int, optional
    The number of rows to display in a truncated repr (when number
    of rows is above `max_rows`).

Returns
-------
str or None
    String representation of Series if ``buf=None``, otherwise None.

Examples
--------
>>> ser = pd.Series([1, 2, 3]).to_string()
>>> ser
'0    1\n1    2\n2    3'
)	r   r  r  r   r   r  r  r   r  z.result must be of type str, type of result is Nwritewzutf-8)encoding)r  SeriesFormatterr  r   r   r   reprr   r   r  r  open)r   r  r  r  r  r   r  r   r   r  r   	formatterrd  fs                 r   r  r    s    j ''%
	 $$& &#&&   $T&\%:%: ;<> 
 ;MsG$$		&!  #sW5GGFO 6 65s    B;;
C	r   storage_optionsa  Examples
            --------
            >>> s = pd.Series(["elk", "pig", "dog", "quetzal"], name="animal")
            >>> print(s.to_markdown())
            |    | animal   |
            |---:|:---------|
            |  0 | elk      |
            |  1 | pig      |
            |  2 | dog      |
            |  3 | quetzal  |

            Output markdown with a tabulate option.

            >>> print(s.to_markdown(tablefmt="grid"))
            +----+----------+
            |    | animal   |
            +====+==========+
            |  0 | elk      |
            +----+----------+
            |  1 | pig      |
            +----+----------+
            |  2 | dog      |
            +----+----------+
            |  3 | quetzal  |
            +----+----------+)r   r  examplesc                J    U R                  5       R                  " U4X#US.UD6$ )al  
Print {klass} in Markdown-friendly format.

Parameters
----------
buf : str, Path or StringIO-like, optional, default None
    Buffer to write to. If None, the output is returned as a string.
mode : str, optional
    Mode in which file is opened, "wt" by default.
index : bool, optional, default True
    Add index (row) labels.

{storage_options}

**kwargs
    These parameters will be passed to `tabulate                 <https://pypi.org/project/tabulate>`_.

Returns
-------
str
    {klass} in Markdown-friendly format.

Notes
-----
Requires the `tabulate <https://pypi.org/project/tabulate>`_ package.

{examples}
)moder   r  )r  to_markdown)r   r  r  r   r  kwargss         r   r  Series.to_markdownn  s3    H }}**

LR
 	
r   c                R    [        [        U R                  5      [        U 5      5      $ )aj  
Lazily iterate over (index, value) tuples.

This method returns an iterable tuple (index, value). This is
convenient if you want to create a lazy iterator.

Returns
-------
iterable
    Iterable of tuples containing the (index, value) pairs from a
    Series.

See Also
--------
DataFrame.items : Iterate over (column name, Series) pairs.
DataFrame.iterrows : Iterate over DataFrame rows as (index, Series) pairs.

Examples
--------
>>> s = pd.Series(['A', 'B', 'C'])
>>> for index, value in s.items():
...     print(f"Index : {index}, Value : {value}")
Index : 0, Value : A
Index : 1, Value : B
Index : 2, Value : C
)zipiterr   r   s    r   itemsSeries.items  s    6 4

#T$Z00r   c                    U R                   $ )z
Return alias for index.

Returns
-------
Index
    Index of the Series.

Examples
--------
>>> s = pd.Series([1, 2, 3], index=[0, 1, 2])
>>> s.keys()
Index([0, 1, 2], dtype='int64')
rH  r   s    r   r   Series.keys  s     zzr   c                   g r   r  r   intos     r   to_dictSeries.to_dict       	r   )r  c                   g r   r  r  s     r   r  r    s    r   z3.0r   r  )versionallowed_argsr   c                   [         R                  " U5      n[        U R                  5      (       d  [	        U R                  [
        5      (       a  U" S U R                  5        5       5      $ U" U R                  5       5      $ )a  
Convert Series to {label -> value} dict or dict-like object.

Parameters
----------
into : class, default dict
    The collections.abc.MutableMapping subclass to use as the return
    object. Can be the actual class or an empty instance of the mapping
    type you want.  If you want a collections.defaultdict, you must
    pass it initialized.

Returns
-------
collections.abc.MutableMapping
    Key-value representation of Series.

Examples
--------
>>> s = pd.Series([1, 2, 3, 4])
>>> s.to_dict()
{0: 1, 1: 2, 2: 3, 3: 4}
>>> from collections import OrderedDict, defaultdict
>>> s.to_dict(into=OrderedDict)
OrderedDict([(0, 1), (1, 2), (2, 3), (3, 4)])
>>> dd = defaultdict(list)
>>> s.to_dict(into=dd)
defaultdict(<class 'list'>, {0: 1, 1: 2, 2: 3, 3: 4})
c              3  @   #    U  H  u  pU[        U5      4v   M     g 7fr   )r/   ).0kvs      r   	<genexpr>!Series.to_dict.<locals>.<genexpr>  s     L|tq1.q12|s   )r   standardize_mappingr5   r   r   r:   r  )r   r  into_cs      r   r  r    s^    J ((.4::&&*TZZ*P*PLtzz|LLL $**,''r   c                   U[         R                  L a(  U R                  nUc  [        S5      nO[	        U/5      nO[	        U/5      nU R
                  R                  U5      nU R                  X3R                  S9nUR                  U SS9$ )aa  
Convert Series to DataFrame.

Parameters
----------
name : object, optional
    The passed name should substitute for the series name (if it has
    one).

Returns
-------
DataFrame
    DataFrame representation of Series.

Examples
--------
>>> s = pd.Series(["a", "b", "c"],
...               name="vals")
>>> s.to_frame()
  vals
0    a
1    b
2    c
r   r   r  r3  )
r   r   r   r^   r[   r   	to_2d_mgrr
  r   r6  )r   r   r  r   r	  s        r   r  Series.to_frame#  s|    4 3>>!99D|'*-TFmGii!!'*11#HH1EtJ77r   c                    [        US5      nU(       a  U O&U R                  U=(       a    [        5       (       + 5      nXl        U$ )z
Set the Series name.

Parameters
----------
name : str
inplace : bool
    Whether to modify `self` directly or return a copy.
deep : bool|None, default None
    Whether to do a deep copy, a shallow copy, or Copy on Write(None)
r   )r(   r   r   r   )r   r   r   r   r  s        r   	_set_nameSeries._set_nameK  s8     &gy9d499T-O:M:O6O#P
r   a
  
        Examples
        --------
        >>> ser = pd.Series([390., 350., 30., 20.],
        ...                 index=['Falcon', 'Falcon', 'Parrot', 'Parrot'],
        ...                 name="Max Speed")
        >>> ser
        Falcon    390.0
        Falcon    350.0
        Parrot     30.0
        Parrot     20.0
        Name: Max Speed, dtype: float64
        >>> ser.groupby(["a", "b", "a", "b"]).mean()
        a    210.0
        b    185.0
        Name: Max Speed, dtype: float64
        >>> ser.groupby(level=0).mean()
        Falcon    370.0
        Parrot     25.0
        Name: Max Speed, dtype: float64
        >>> ser.groupby(ser > 100).mean()
        Max Speed
        False     25.0
        True     370.0
        Name: Max Speed, dtype: float64

        **Grouping by Indexes**

        We can groupby different levels of a hierarchical index
        using the `level` parameter:

        >>> arrays = [['Falcon', 'Falcon', 'Parrot', 'Parrot'],
        ...           ['Captive', 'Wild', 'Captive', 'Wild']]
        >>> index = pd.MultiIndex.from_arrays(arrays, names=('Animal', 'Type'))
        >>> ser = pd.Series([390., 350., 30., 20.], index=index, name="Max Speed")
        >>> ser
        Animal  Type
        Falcon  Captive    390.0
                Wild       350.0
        Parrot  Captive     30.0
                Wild        20.0
        Name: Max Speed, dtype: float64
        >>> ser.groupby(level=0).mean()
        Animal
        Falcon    370.0
        Parrot     25.0
        Name: Max Speed, dtype: float64
        >>> ser.groupby(level="Type").mean()
        Type
        Captive    210.0
        Wild       185.0
        Name: Max Speed, dtype: float64

        We can also choose to include `NA` in group keys or not by defining
        `dropna` parameter, the default setting is `True`.

        >>> ser = pd.Series([1, 2, 3, 3], index=["a", 'a', 'b', np.nan])
        >>> ser.groupby(level=0).sum()
        a    3
        b    3
        dtype: int64

        >>> ser.groupby(level=0, dropna=False).sum()
        a    3
        b    3
        NaN  3
        dtype: int64

        >>> arrays = ['Falcon', 'Falcon', 'Parrot', 'Parrot']
        >>> ser = pd.Series([390., 350., 30., 20.], index=arrays, name="Max Speed")
        >>> ser.groupby(["a", "b", "a", np.nan]).mean()
        a    210.0
        b    350.0
        Name: Max Speed, dtype: float64

        >>> ser.groupby(["a", "b", "a", np.nan], dropna=False).mean()
        a    210.0
        b    350.0
        NaN   20.0
        Name: Max Speed, dtype: float64
        groupbyc	                    SSK Jn	  Uc  Uc  [        S5      eU(       d  [        S5      eU R                  U5      nU	" U UUUUUUUUS9	$ )Nr   r   z*You have to supply one of 'by' and 'level'z(as_index=False only valid with DataFrame)	objr   r   r  as_indexsort
group_keysobserveddropna)pandas.core.groupby.genericr   r   _get_axis_number)
r   byr   r  r6  r7  r8  r9  r:  r   s
             r   r3  Series.groupby^  sd    B 	>=RZHIIFGG$$T*!

 
	
r   c                f    [        U R                  5      R                  5       R                  S5      $ )a  
Return number of non-NA/null observations in the Series.

Returns
-------
int
    Number of non-null values in the Series.

See Also
--------
DataFrame.count : Count non-NA cells for each column or row.

Examples
--------
>>> s = pd.Series([0.0, 1.0, np.nan])
>>> s.count()
2
int64)rA   r   sumr   r   s    r   countSeries.count  s'    & T\\"&&(//88r   c                .   U R                   n[        U[        R                  5      (       a  [        R
                  " X!S9nOUR                  US9nU R                  U[        [        U5      5      U R                  SU R                  S9R                  U SS9$ )a  
Return the mode(s) of the Series.

The mode is the value that appears most often. There can be multiple modes.

Always returns Series even if only one value is returned.

Parameters
----------
dropna : bool, default True
    Don't consider counts of NaN/NaT.

Returns
-------
Series
    Modes of the Series in sorted order.

Examples
--------
>>> s = pd.Series([2, 4, 2, 2, 4, None])
>>> s.mode()
0    2.0
dtype: float64

More than one mode:

>>> s = pd.Series([2, 4, 8, 2, 4, None])
>>> s.mode()
0    2.0
1    4.0
dtype: float64

With and without considering null value:

>>> s = pd.Series([2, 4, None, None, 4, None])
>>> s.mode(dropna=False)
0   NaN
dtype: float64
>>> s = pd.Series([2, 4, None, None, 4, None])
>>> s.mode()
0    4.0
dtype: float64
)r:  F)r   r   r   r   r  r3  )r   r   r   r   rC   r  _moder   ranger   r   r   r6  )r   r:  r   r7  s       r   r  Series.mode  s    Z fbjj))#?JV4J   J(** ! 
 ,tF,
+	,r   c                    > [         TU ]  5       $ )ay  
Return unique values of Series object.

Uniques are returned in order of appearance. Hash table-based unique,
therefore does NOT sort.

Returns
-------
ndarray or ExtensionArray
    The unique values returned as a NumPy array. See Notes.

See Also
--------
Series.drop_duplicates : Return Series with duplicate values removed.
unique : Top-level unique method for any 1-d array-like object.
Index.unique : Return Index with unique values from an Index object.

Notes
-----
Returns the unique values as a NumPy array. In case of an
extension-array backed Series, a new
:class:`~api.extensions.ExtensionArray` of that type with just
the unique values is returned. This includes

    * Categorical
    * Period
    * Datetime with Timezone
    * Datetime without Timezone
    * Timedelta
    * Interval
    * Sparse
    * IntegerNA

See Examples section.

Examples
--------
>>> pd.Series([2, 1, 3, 3], name='A').unique()
array([2, 1, 3])

>>> pd.Series([pd.Timestamp('2016-01-01') for _ in range(3)]).unique()
<DatetimeArray>
['2016-01-01 00:00:00']
Length: 1, dtype: datetime64[ns]

>>> pd.Series([pd.Timestamp('2016-01-01', tz='US/Eastern')
...            for _ in range(3)]).unique()
<DatetimeArray>
['2016-01-01 00:00:00-05:00']
Length: 1, dtype: datetime64[ns, US/Eastern]

An Categorical will return categories in the order of
appearance and with the same dtype.

>>> pd.Series(pd.Categorical(list('baabc'))).unique()
['b', 'a', 'c']
Categories (3, object): ['a', 'b', 'c']
>>> pd.Series(pd.Categorical(list('baabc'), categories=list('abc'),
...                          ordered=True)).unique()
['b', 'a', 'c']
Categories (3, object): ['a' < 'b' < 'c']
)r  r   r   r  s    r   r   Series.unique(	  s    ~ w~r   )keepr   ignore_indexc                   g r   r  r   rK  r   rL  s       r   drop_duplicatesSeries.drop_duplicatesi	  s     	r   )rK  rL  c                   g r   r  rN  s       r   rO  rP  s	  r   r   c                   g r   r  rN  s       r   rO  rP  y	  r   r   firstc                  > [        US5      n[        TU ]	  US9nU(       a  [        [	        U5      5      Ul        U(       a  U R                  U5        gU$ )uv  
Return Series with duplicate values removed.

Parameters
----------
keep : {'first', 'last', ``False``}, default 'first'
    Method to handle dropping duplicates:

    - 'first' : Drop duplicates except for the first occurrence.
    - 'last' : Drop duplicates except for the last occurrence.
    - ``False`` : Drop all duplicates.

inplace : bool, default ``False``
    If ``True``, performs operation inplace and returns None.

ignore_index : bool, default ``False``
    If ``True``, the resulting axis will be labeled 0, 1, …, n - 1.

    .. versionadded:: 2.0.0

Returns
-------
Series or None
    Series with duplicates dropped or None if ``inplace=True``.

See Also
--------
Index.drop_duplicates : Equivalent method on Index.
DataFrame.drop_duplicates : Equivalent method on DataFrame.
Series.duplicated : Related method on Series, indicating duplicate
    Series values.
Series.unique : Return unique values as an array.

Examples
--------
Generate a Series with duplicated entries.

>>> s = pd.Series(['llama', 'cow', 'llama', 'beetle', 'llama', 'hippo'],
...               name='animal')
>>> s
0     llama
1       cow
2     llama
3    beetle
4     llama
5     hippo
Name: animal, dtype: object

With the 'keep' parameter, the selection behaviour of duplicated values
can be changed. The value 'first' keeps the first occurrence for each
set of duplicated entries. The default value of keep is 'first'.

>>> s.drop_duplicates()
0     llama
1       cow
3    beetle
5     hippo
Name: animal, dtype: object

The value 'last' for parameter 'keep' keeps the last occurrence for
each set of duplicated entries.

>>> s.drop_duplicates(keep='last')
1       cow
3    beetle
4     llama
5     hippo
Name: animal, dtype: object

The value ``False`` for parameter 'keep' discards all sets of
duplicated entries.

>>> s.drop_duplicates(keep=False)
1       cow
3    beetle
5     hippo
Name: animal, dtype: object
r   rK  N)r(   r  rO  r^   r   r   _update_inplace)r   rK  r   rL  rd  r  s        r   rO  rP  	  sP    j &gy9(d(3(V5FL  (Mr   c                t    U R                  US9nU R                  X R                  SS9nUR                  U SS9$ )aw  
Indicate duplicate Series values.

Duplicated values are indicated as ``True`` values in the resulting
Series. Either all duplicates, all except the first or all except the
last occurrence of duplicates can be indicated.

Parameters
----------
keep : {'first', 'last', False}, default 'first'
    Method to handle dropping duplicates:

    - 'first' : Mark duplicates as ``True`` except for the first
      occurrence.
    - 'last' : Mark duplicates as ``True`` except for the last
      occurrence.
    - ``False`` : Mark all duplicates as ``True``.

Returns
-------
Series[bool]
    Series indicating whether each value has occurred in the
    preceding values.

See Also
--------
Index.duplicated : Equivalent method on pandas.Index.
DataFrame.duplicated : Equivalent method on pandas.DataFrame.
Series.drop_duplicates : Remove duplicate values from Series.

Examples
--------
By default, for each set of duplicated values, the first occurrence is
set on False and all others on True:

>>> animals = pd.Series(['llama', 'cow', 'llama', 'beetle', 'llama'])
>>> animals.duplicated()
0    False
1    False
2     True
3    False
4     True
dtype: bool

which is equivalent to

>>> animals.duplicated(keep='first')
0    False
1    False
2     True
3    False
4     True
dtype: bool

By using 'last', the last occurrence of each set of duplicated values
is set on False and all others on True:

>>> animals.duplicated(keep='last')
0     True
1    False
2     True
3    False
4    False
dtype: bool

By setting keep on ``False``, all duplicates are True:

>>> animals.duplicated(keep=False)
0     True
1    False
2     True
3    False
4     True
dtype: bool
rU  Fr1  r   r3  )_duplicatedr   r   r6  )r   rK  resrd  s       r   r   Series.duplicated	  sG    X D)""3jju"E""4"==r   c                   U R                  U5      n[        R                  " 5          [        R                  " S5        U R                  " X/UQ70 UD6nSSS5        WS:X  aO  [        R
                  " S[        U 5      R                   S3[        [        5       S9  U R                  R                  $ U R                  U   $ ! , (       d  f       Nr= f)aa  
Return the row label of the minimum value.

If multiple values equal the minimum, the first row label with that
value is returned.

Parameters
----------
axis : {0 or 'index'}
    Unused. Parameter needed for compatibility with DataFrame.
skipna : bool, default True
    Exclude NA/null values. If the entire Series is NA, the result
    will be NA.
*args, **kwargs
    Additional arguments and keywords have no effect but might be
    accepted for compatibility with NumPy.

Returns
-------
Index
    Label of the minimum value.

Raises
------
ValueError
    If the Series is empty.

See Also
--------
numpy.argmin : Return indices of the minimum values
    along the given axis.
DataFrame.idxmin : Return index of first occurrence of minimum
    over requested axis.
Series.idxmax : Return index *label* of the first occurrence
    of maximum of values.

Notes
-----
This method is the Series version of ``ndarray.argmin``. This method
returns the label of the minimum, while ``ndarray.argmin`` returns
the position. To get the position, use ``series.values.argmin()``.

Examples
--------
>>> s = pd.Series(data=[1, None, 4, 1],
...               index=['A', 'B', 'C', 'D'])
>>> s
A    1.0
B    NaN
C    4.0
D    1.0
dtype: float64

>>> s.idxmin()
'A'

If `skipna` is False and there is an NA value in the data,
the function returns ``nan``.

>>> s.idxmin(skipna=False)
nan
r   Nr  The behavior of zu.idxmin with all-NA values, or any-NA and skipna=False, is deprecated. In a future version this will raise ValueErrorr   )r<  r   catch_warningssimplefilterargminr   r   r   r   r&   r   	_na_valuer   r   ri  argsr  rK  s         r   idxminSeries.idxmin0
  s    ~ $$T*$$& !!(+D:4:6:A ' 7MM"4:#6#6"7 85 5 +- ::'''zz!}# '&   -C  
Cc                   U R                  U5      n[        R                  " 5          [        R                  " S5        U R                  " X/UQ70 UD6nSSS5        WS:X  aO  [        R
                  " S[        U 5      R                   S3[        [        5       S9  U R                  R                  $ U R                  U   $ ! , (       d  f       Nr= f)ar  
Return the row label of the maximum value.

If multiple values equal the maximum, the first row label with that
value is returned.

Parameters
----------
axis : {0 or 'index'}
    Unused. Parameter needed for compatibility with DataFrame.
skipna : bool, default True
    Exclude NA/null values. If the entire Series is NA, the result
    will be NA.
*args, **kwargs
    Additional arguments and keywords have no effect but might be
    accepted for compatibility with NumPy.

Returns
-------
Index
    Label of the maximum value.

Raises
------
ValueError
    If the Series is empty.

See Also
--------
numpy.argmax : Return indices of the maximum values
    along the given axis.
DataFrame.idxmax : Return index of first occurrence of maximum
    over requested axis.
Series.idxmin : Return index *label* of the first occurrence
    of minimum of values.

Notes
-----
This method is the Series version of ``ndarray.argmax``. This method
returns the label of the maximum, while ``ndarray.argmax`` returns
the position. To get the position, use ``series.values.argmax()``.

Examples
--------
>>> s = pd.Series(data=[1, None, 4, 3, 4],
...               index=['A', 'B', 'C', 'D', 'E'])
>>> s
A    1.0
B    NaN
C    4.0
D    3.0
E    4.0
dtype: float64

>>> s.idxmax()
'C'

If `skipna` is False and there is an NA value in the data,
the function returns ``nan``.

>>> s.idxmax(skipna=False)
nan
r   Nr  r\  zu.idxmax with all-NA values, or any-NA and skipna=False, is deprecated. In a future version this will raise ValueErrorr   )r<  r   r]  r^  argmaxr   r   r   r   r&   r   r`  ra  s         r   idxmaxSeries.idxmax
  s    @ $$T*$$& !!(+D:4:6:A ' 7MM"4:#6#6"7 85 5 +- ::'''zz!}# '&re  c                    [         R                  " X#5        U R                  R                  U[	        5       S9nU R                  XDR                  S9R                  U SS9$ )a  
Round each value in a Series to the given number of decimals.

Parameters
----------
decimals : int, default 0
    Number of decimal places to round to. If decimals is negative,
    it specifies the number of positions to the left of the decimal point.
*args, **kwargs
    Additional arguments and keywords have no effect but might be
    accepted for compatibility with NumPy.

Returns
-------
Series
    Rounded values of the Series.

See Also
--------
numpy.around : Round values of an np.array.
DataFrame.round : Round values of a DataFrame.

Examples
--------
>>> s = pd.Series([0.1, 1.3, 2.7])
>>> s.round()
0    0.0
1    1.0
2    3.0
dtype: float64
)decimals	using_cowr   roundr3  )r  validate_roundr   rm  r   r  r   r6  )r   rk  rb  r  rz  s        r   rm  Series.round
  s]    @ 	$'))//8?R?T/U))')ERR S 
 	
r   c                    g r   r  r   qinterpolations      r   quantileSeries.quantile
  r   r   c                    g r   r  rq  s      r   rt  ru         	r   c                    g r   r  rq  s      r   rt  ru    rw  r   c                b   [        U5        U R                  5       nUR                  XSS9nUR                  S:X  a  UR                  SS2S4   n[        U5      (       aC  U R                  Ul        [        U[        R                  S9nU R                  XEU R                  S9$ UR                  S   $ )a  
Return value at the given quantile.

Parameters
----------
q : float or array-like, default 0.5 (50% quantile)
    The quantile(s) to compute, which can lie in range: 0 <= q <= 1.
interpolation : {'linear', 'lower', 'higher', 'midpoint', 'nearest'}
    This optional parameter specifies the interpolation method to use,
    when the desired quantile lies between two data points `i` and `j`:

        * linear: `i + (j - i) * (x-i)/(j-i)`, where `(x-i)/(j-i)` is
          the fractional part of the index surrounded by `i > j`.
        * lower: `i`.
        * higher: `j`.
        * nearest: `i` or `j` whichever is nearest.
        * midpoint: (`i` + `j`) / 2.

Returns
-------
float or Series
    If ``q`` is an array, a Series will be returned where the
    index is ``q`` and the values are the quantiles, otherwise
    a float will be returned.

See Also
--------
core.window.Rolling.quantile : Calculate the rolling quantile.
numpy.percentile : Returns the q-th percentile(s) of the array elements.

Examples
--------
>>> s = pd.Series([1, 2, 3, 4])
>>> s.quantile(.5)
2.5
>>> s.quantile([.25, .5, .75])
0.25    1.75
0.50    2.50
0.75    3.25
dtype: float64
F)rr  rs  numeric_onlyr   Nr   r  )r   r   )r)   r  rt  ndimr   r4   r   r[   r   float64r   )r   rr  rs  r	  rd  idxs         r   rt  ru    s    \ 	A ]]_qER;;![[A&F??))FK,C$$VTYY$GG ;;q>!r   c                f   U R                  USSS9u  pA[        U5      S:X  a  [        R                  $ UR	                  [
        [        R                  SS9nUR	                  [
        [        R                  SS9nUS;   d  [        U5      (       a  [        R                  " XVX#S9$ [        SU S	35      e)
ae  
Compute correlation with `other` Series, excluding missing values.

The two `Series` objects are not required to be the same length and will be
aligned internally before the correlation function is applied.

Parameters
----------
other : Series
    Series with which to compute the correlation.
method : {'pearson', 'kendall', 'spearman'} or callable
    Method used to compute correlation:

    - pearson : Standard correlation coefficient
    - kendall : Kendall Tau correlation coefficient
    - spearman : Spearman rank correlation
    - callable: Callable with input two 1d ndarrays and returning a float.

    .. warning::
        Note that the returned matrix from corr will have 1 along the
        diagonals and will be symmetric regardless of the callable's
        behavior.
min_periods : int, optional
    Minimum number of observations needed to have a valid result.

Returns
-------
float
    Correlation with other.

See Also
--------
DataFrame.corr : Compute pairwise correlation between columns.
DataFrame.corrwith : Compute pairwise correlation with another
    DataFrame or Series.

Notes
-----
Pearson, Kendall and Spearman correlation are currently computed using pairwise complete observations.

* `Pearson correlation coefficient <https://en.wikipedia.org/wiki/Pearson_correlation_coefficient>`_
* `Kendall rank correlation coefficient <https://en.wikipedia.org/wiki/Kendall_rank_correlation_coefficient>`_
* `Spearman's rank correlation coefficient <https://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient>`_

Automatic data alignment: as with all pandas operations, automatic data alignment is performed for this method.
``corr()`` automatically considers values with matching indices.

Examples
--------
>>> def histogram_intersection(a, b):
...     v = np.minimum(a, b).sum().round(decimals=1)
...     return v
>>> s1 = pd.Series([.2, .0, .6, .2])
>>> s2 = pd.Series([.3, .6, .0, .1])
>>> s1.corr(s2, method=histogram_intersection)
0.3

Pandas auto-aligns the values with matching indices

>>> s1 = pd.Series([1, 2, 3], index=[0, 1, 2])
>>> s2 = pd.Series([1, 2, 3], index=[2, 1, 0])
>>> s1.corr(s2)
-1.0
innerFjoinr   r   r   na_valuer   )pearsonspearmankendall)r4  min_periodszHmethod must be either 'pearson', 'spearman', 'kendall', or a callable, 'z' was supplied)
alignr   r   nanto_numpyfloatcallablerG   nancorrr   )r   otherr4  r  thisthis_valuesother_valuess          r   corrSeries.corrS  s    L jjW5jAt9>66Mmm%"&&umM~~EBFF~O778F;K;K>>&  x~'
 	
r   r   c                   U R                  USSS9u  pA[        U5      S:X  a  [        R                  $ UR	                  [
        [        R                  SS9nUR	                  [
        [        R                  SS9n[        R                  " XVX#S9$ )an  
Compute covariance with Series, excluding missing values.

The two `Series` objects are not required to be the same length and
will be aligned internally before the covariance is calculated.

Parameters
----------
other : Series
    Series with which to compute the covariance.
min_periods : int, optional
    Minimum number of observations needed to have a valid result.
ddof : int, default 1
    Delta degrees of freedom.  The divisor used in calculations
    is ``N - ddof``, where ``N`` represents the number of elements.

Returns
-------
float
    Covariance between Series and other normalized by N-1
    (unbiased estimator).

See Also
--------
DataFrame.cov : Compute pairwise covariance of columns.

Examples
--------
>>> s1 = pd.Series([0.90010907, 0.13484424, 0.62036035])
>>> s2 = pd.Series([0.12528585, 0.26962463, 0.51111198])
>>> s1.cov(s2)
-0.01685762652715874
r  Fr  r   r  )r  ddof)r  r   r   r  r  r  rG   nancov)r   r  r  r  r  r  r  s          r   cov
Series.cov  su    N jjW5jAt9>66Mmm%"&&umM~~EBFF~O}};
 	
r   r   a  
        Difference with previous row

        >>> s = pd.Series([1, 1, 2, 3, 5, 8])
        >>> s.diff()
        0    NaN
        1    0.0
        2    1.0
        3    1.0
        4    2.0
        5    3.0
        dtype: float64

        Difference with 3rd previous row

        >>> s.diff(periods=3)
        0    NaN
        1    NaN
        2    NaN
        3    2.0
        4    4.0
        5    6.0
        dtype: float64

        Difference with following row

        >>> s.diff(periods=-1)
        0    0.0
        1   -1.0
        2   -1.0
        3   -2.0
        4   -3.0
        5    NaN
        dtype: float64

        Overflow in input dtype

        >>> s = pd.Series([1, 0], dtype=np.uint8)
        >>> s.diff()
        0      NaN
        1    255.0
        dtype: float64)r   extra_paramsother_klassr  c                    [         R                  " U R                  U5      nU R                  X R                  SS9R                  U SS9$ )aH  
First discrete difference of element.

Calculates the difference of a {klass} element compared with another
element in the {klass} (default is element in previous row).

Parameters
----------
periods : int, default 1
    Periods to shift for calculating difference, accepts negative
    values.
{extra_params}
Returns
-------
{klass}
    First differences of the Series.

See Also
--------
{klass}.pct_change: Percent change over given number of periods.
{klass}.shift: Shift index by desired number of periods with an
    optional time freq.
{other_klass}.diff: First discrete difference of object.

Notes
-----
For boolean dtypes, this uses :meth:`operator.xor` rather than
:meth:`operator.sub`.
The result is calculated according to current dtype in {klass},
however dtype of the result is always float64.

Examples
--------
{examples}
Fr1  diffr3  )rC   r  r   r   r   r6  )r   periodsrd  s      r   r  Series.diff  sK    j w7  zz FSS T 
 	
r   c                ^    U R                  [        [        U R                  U5      5      5      $ )a  
Compute the lag-N autocorrelation.

This method computes the Pearson correlation between
the Series and its shifted self.

Parameters
----------
lag : int, default 1
    Number of lags to apply before performing autocorrelation.

Returns
-------
float
    The Pearson correlation between self and self.shift(lag).

See Also
--------
Series.corr : Compute the correlation between two Series.
Series.shift : Shift index by desired number of periods.
DataFrame.corr : Compute pairwise correlation of columns.
DataFrame.corrwith : Compute pairwise correlation between rows or
    columns of two DataFrame objects.

Notes
-----
If the Pearson correlation is not well defined return 'NaN'.

Examples
--------
>>> s = pd.Series([0.25, 0.5, 0.2, -0.05])
>>> s.autocorr()  # doctest: +ELLIPSIS
0.10355...
>>> s.autocorr(lag=2)  # doctest: +ELLIPSIS
-0.99999...

If the Pearson correlation is not well defined, then 'NaN' is returned.

>>> s = pd.Series([1, 0, 0, 0])
>>> s.autocorr()
nan
)r  r   r   shift)r   lags     r   autocorrSeries.autocorr5  s#    V yyfdjjo677r   c                   [        U[        [        45      (       a  U R                  R	                  UR                  5      n[        U5      [        U R                  5      :  d"  [        U5      [        UR                  5      :  a  [        S5      eU R                  USS9nUR                  USS9nUR                  nUR                  nOgU R                  n[        R                  " U5      nUR                  S   UR                  S   :w  a%  [        SUR                   SUR                   35      e[        U[        5      (       a=  U R                  [        R                  " XV5      UR                  SS9R!                  U SS9$ [        U[        5      (       a  [        R                  " XV5      $ [        U[        R"                  5      (       a  [        R                  " XV5      $ [%        S	['        U5       35      e)
a  
Compute the dot product between the Series and the columns of other.

This method computes the dot product between the Series and another
one, or the Series and each columns of a DataFrame, or the Series and
each columns of an array.

It can also be called using `self @ other`.

Parameters
----------
other : Series, DataFrame or array-like
    The other object to compute the dot product with its columns.

Returns
-------
scalar, Series or numpy.ndarray
    Return the dot product of the Series and other if other is a
    Series, the Series of the dot product of Series and each rows of
    other if other is a DataFrame or a numpy.ndarray between the Series
    and each columns of the numpy array.

See Also
--------
DataFrame.dot: Compute the matrix product with the DataFrame.
Series.mul: Multiplication of series and other, element-wise.

Notes
-----
The Series and other has to share the same index if other is a Series
or a DataFrame.

Examples
--------
>>> s = pd.Series([0, 1, 2, 3])
>>> other = pd.Series([-1, 2, -3, 4])
>>> s.dot(other)
8
>>> s @ other
8
>>> df = pd.DataFrame([[0, 1], [-2, 3], [4, -5], [6, 7]])
>>> s.dot(df)
0    24
1    14
dtype: int64
>>> arr = np.array([[0, 1], [-2, 3], [4, -5], [6, 7]])
>>> s.dot(arr)
array([24, 14])
zmatrices are not alignedFr1  r   zDot product shape mismatch, z vs dotr3  zunsupported type: )r   r   r<   r   unionr   r   r   r   r   r<  shape	Exceptionr   r  r  r6  r   r   r   )r   r  rE   leftrightlvalsrvalss          r   r  
Series.dotb  s   d efl344ZZ%%ekk2F6{S_,Fc%++>N0N !;<<<<f5<9DMMUM;EKKELLEKKEJJu%E{{1~Q/25;;-tEKK=Q  e\**$$u$EMM % l4l./ v&&66%''rzz**66%''0e>??r   c                $    U R                  U5      $ z2
Matrix multiplication using binary `@` operator.
)r  r   r  s     r   
__matmul__Series.__matmul__  s     xxr   c                L    U R                  [        R                  " U5      5      $ r  )r  r   	transposer  s     r   __rmatmul__Series.__rmatmul__  s     xxU+,,r   )r   c                >    [         R                  R                  XX#S9$ )N)sidesorter)rD   IndexOpsMixinsearchsorted)r   r  r  r  s       r   r  Series.searchsorted  s      !!..t.UUr   c                    SSK Jn  [        U[        [        45      (       a  U /nUR                  U5        OX/n[        S USS   5       5      (       a  Sn[        U5      eU" XRUS9$ )Nr   concatc              3  D   #    U  H  n[        U[        45      v   M     g 7fr   )r   r<   )r&  xs     r   r)  !Series._append.<locals>.<genexpr>  s     E}!z!l_--}s    r   zCto_append should be a Series or list/tuple of Series, got DataFrame)rL  verify_integrity)pandas.core.reshape.concatr  r   r   r   extendr  r   )r   	to_appendrL  r  r  	to_concatmsgs          r   _appendSeries._append  sn     	6i$//IY')IEy}EEEWCC. CS
 	
r   comparea  
        Returns
        -------
        Series or DataFrame
            If axis is 0 or 'index' the result will be a Series.
            The resulting index will be a MultiIndex with 'self' and 'other'
            stacked alternately at the inner level.

            If axis is 1 or 'columns' the result will be a DataFrame.
            It will have two columns namely 'self' and 'other'.

        See Also
        --------
        DataFrame.compare : Compare with another DataFrame and show differences.

        Notes
        -----
        Matching NaNs will not appear as a difference.

        Examples
        --------
        >>> s1 = pd.Series(["a", "b", "c", "d", "e"])
        >>> s2 = pd.Series(["a", "a", "c", "b", "e"])

        Align the differences on columns

        >>> s1.compare(s2)
          self other
        1    b     a
        3    d     b

        Stack the differences on indices

        >>> s1.compare(s2, align_axis=0)
        1  self     b
           other    a
        3  self     d
           other    b
        dtype: object

        Keep all original rows

        >>> s1.compare(s2, keep_shape=True)
          self other
        0  NaN   NaN
        1    b     a
        2  NaN   NaN
        3    d     b
        4  NaN   NaN

        Keep all original rows and also all original values

        >>> s1.compare(s2, keep_shape=True, keep_equal=True)
          self other
        0    a     a
        1    b     a
        2    c     c
        3    d     b
        4    e     e
        c                &   > [         TU ]  UUUUUS9$ )N)r  
align_axis
keep_shape
keep_equalresult_names)r  r  )r   r  r  r  r  r  r  s         r   r  Series.compare  s+    T w!!!%  
 	
r   c                   Uc  [        U R                  SS9n[        U[        5      (       a  U R                  R                  UR                  5      n[        R                  " X5      n[        R                  " [        U5      [        S9n[        R                  " SS9   [        U5       H1  u  pxU R                  X5      n	UR                  X5      n
U" X5      Xg'   M3     SSS5        O|U R                  n[        R                  " [        U5      [        S9n[        R                  " SS9   U R                   V	s/ s H
  o" X5      PM     sn	USS& SSS5        U R                   n["        R$                  " USS9n[        U R                  [&        [(        45      n[+        XR                  US9nU R-                  XUSS	9$ ! , (       d  f       Nh= fs  sn	f ! , (       d  f       N= f)
a  
Combine the Series with a Series or scalar according to `func`.

Combine the Series and `other` using `func` to perform elementwise
selection for combined Series.
`fill_value` is assumed when value is missing at some index
from one of the two objects being combined.

Parameters
----------
other : Series or scalar
    The value(s) to be combined with the `Series`.
func : function
    Function that takes two scalars as inputs and returns an element.
fill_value : scalar, optional
    The value to assume when an index is missing from
    one Series or the other. The default specifies to use the
    appropriate NaN value for the underlying dtype of the Series.

Returns
-------
Series
    The result of combining the Series with the other object.

See Also
--------
Series.combine_first : Combine Series values, choosing the calling
    Series' values first.

Examples
--------
Consider 2 Datasets ``s1`` and ``s2`` containing
highest clocked speeds of different birds.

>>> s1 = pd.Series({'falcon': 330.0, 'eagle': 160.0})
>>> s1
falcon    330.0
eagle     160.0
dtype: float64
>>> s2 = pd.Series({'falcon': 345.0, 'eagle': 200.0, 'duck': 30.0})
>>> s2
falcon    345.0
eagle     200.0
duck       30.0
dtype: float64

Now, to combine the two datasets and view the highest speeds
of the birds across the two datasets

>>> s1.combine(s2, max)
duck        NaN
eagle     200.0
falcon    345.0
dtype: float64

In the previous example, the resulting value for duck is missing,
because the maximum of a NaN and a float is a NaN.
So, in the example, we set ``fill_value=0``,
so the maximum value returned will be the value from some dataset.

>>> s1.combine(s2, max, fill_value=0)
duck       30.0
eagle     200.0
falcon    345.0
dtype: float64
NFr   r  r   all)	try_float)
same_dtyper}  )r@   r   r   r   r   r  rH   get_op_result_namer   emptyr   r   errstate	enumerategetr   r   r   maybe_convert_objectsrQ   r9   r0   r   )r   r  func
fill_valueru  new_namer  rK  r}  lvrvnpvaluesr  r7  s                 r   combineSeries.combine,  s|   P +DJJuEJeV$$ 

((5I--d:H#i.?J*'	2FA#2B33B$(LJM 3 +* 

I#i.?J*;?<< H<Rb< H
1 +yyH ,,Z5I  

[:J,KL
0jjZ

   8RW XX- +* !I +*s+   AF>*G9G
G>
GG
G"c                   SSK Jn  U R                  UR                  :X  a  U R                  R	                  UR                  5      (       a   U R                  U R                  5       U5      $ U R                  (       aQ  [        U R                  [        5      (       d2  U R                  USS9u  p1UR                  UR                  5       U5      $ U R                  R                  UR                  5      nU nUR                  R                  UR                  [        U5         5      nUR                  R                  U5      nUR                  USS9nUR                  USS9nUR                  R                  S:X  a%  UR                  R                  S:w  a  [!        U5      nU" X1/5      nUR                  USS9nUR#                  U SS	9$ )
a  
Update null elements with value in the same location in 'other'.

Combine two Series objects by filling null values in one Series with
non-null values from the other Series. Result index will be the union
of the two indexes.

Parameters
----------
other : Series
    The value(s) to be used for filling null values.

Returns
-------
Series
    The result of combining the provided Series with the other object.

See Also
--------
Series.combine : Perform element-wise operation on two Series
    using a given function.

Examples
--------
>>> s1 = pd.Series([1, np.nan])
>>> s2 = pd.Series([3, 4, 5])
>>> s1.combine_first(s2)
0    1.0
1    4.0
2    5.0
dtype: float64

Null values still persist if the location of that null value
does not exist in `other`

>>> s1 = pd.Series({'falcon': np.nan, 'eagle': 160.0})
>>> s2 = pd.Series({'eagle': 200.0, 'duck': 30.0})
>>> s1.combine_first(s2)
duck       30.0
eagle     160.0
falcon      NaN
dtype: float64
r   r  outer)r  Fr   Mcombine_firstr3  )r  r  r   r   r   r  r?   r  r   r;   r  r  
differencerA   r   r  rj   r6  )r   r  r  r  ru  
keep_other	keep_thiscombineds           r   r  Series.combine_first  sd   X 	6::$zz  --yye44"":djj++N+N"jjWj=yye44JJ$$U[[1	[[++DJJuT{,CD
JJ))*5	||IE|2ju5::??c!ekk&6&6#&=&E4-(##IE#:$$T/$BBr   c                   [         (       dL  [        5       (       a=  [        R                  " U 5      [        ::  a  [
        R                  " [        [        SS9  O[         (       dx  [        5       (       di  U R                  5       (       aT  [        R                  " U 5      n[        n[        U 5      (       a  US-  nX#::  a  [
        R                  " [        [        SS9  [        U[        5      (       d  [        U5      nUR                  U 5      n[!        U5      nU R"                  R%                  XAS9U l        U R'                  5         g)a  
Modify Series in place using values from passed Series.

Uses non-NA values from passed Series to make updates. Aligns
on index.

Parameters
----------
other : Series, or object coercible into Series

Examples
--------
>>> s = pd.Series([1, 2, 3])
>>> s.update(pd.Series([4, 5, 6]))
>>> s
0    4
1    5
2    6
dtype: int64

>>> s = pd.Series(['a', 'b', 'c'])
>>> s.update(pd.Series(['d', 'e'], index=[0, 2]))
>>> s
0    d
1    b
2    e
dtype: object

>>> s = pd.Series([1, 2, 3])
>>> s.update(pd.Series([4, 5, 6, 7, 8]))
>>> s
0    4
1    5
2    6
dtype: int64

If ``other`` contains NaNs the corresponding values are not updated
in the original Series.

>>> s = pd.Series([1, 2, 3])
>>> s.update(pd.Series([4, np.nan, 6]))
>>> s
0    4
1    2
2    6
dtype: int64

``other`` can also be a non-Series object type
that is coercible into a Series

>>> s = pd.Series([1, 2, 3])
>>> s.update([4, np.nan, 6])
>>> s
0    4
1    2
2    6
dtype: int64

>>> s = pd.Series([1, 2, 3])
>>> s.update({1: 9})
>>> s
0    1
1    9
2    3
dtype: int64
r   r   r   )r  newN)r   r   r  r  r   r   r   r   r   _is_view_after_cow_rulesr!   r   r   r   r   reindex_likerA   r   putmaskr  )r   r  r  r  r  s        r   updateSeries.update  s    F t+--t$	12* 
 1338U8U8W8W//$'C!IT""Q	:!  %((5ME""4(U|II%%4%;	!!#r   )r   	ascendingr   r  na_positionrL  rb  c                   g r   r  r   r   r  r   r  r  rL  rb  s           r   sort_valuesSeries.sort_values=       	r   )r   r  r  r  rL  rb  c                   g r   r  r  s           r   r  r  K  r  r   c                   g r   r  r  s           r   r  r  Y  r  r   	quicksortlastc               j   [        US5      nU R                  U5        U(       a  U R                  (       a  [        S5      e[	        U5      (       aC  [        [        [           U5      n[        U5      S:w  a  [        S[        U5       S35      eUS   n[        U5      nUS;  a  [        SU 35      eU(       a$  [        [        [        X5      5      R                  nOU R                  n[        X[        U5      U5      n	[        U	[        U	5      5      (       a'  U(       a  U R                  U 5      $ U R!                  S	S
9$ U R#                  U R                  U	   U R$                  U	   SS9n
U(       a  ['        [        U	5      5      U
l        U(       d  U
R)                  U SS9$ U R                  U
5        g	)uv  
Sort by the values.

Sort a Series in ascending or descending order by some
criterion.

Parameters
----------
axis : {0 or 'index'}
    Unused. Parameter needed for compatibility with DataFrame.
ascending : bool or list of bools, default True
    If True, sort values in ascending order, otherwise descending.
inplace : bool, default False
    If True, perform operation in-place.
kind : {'quicksort', 'mergesort', 'heapsort', 'stable'}, default 'quicksort'
    Choice of sorting algorithm. See also :func:`numpy.sort` for more
    information. 'mergesort' and 'stable' are the only stable  algorithms.
na_position : {'first' or 'last'}, default 'last'
    Argument 'first' puts NaNs at the beginning, 'last' puts NaNs at
    the end.
ignore_index : bool, default False
    If True, the resulting axis will be labeled 0, 1, …, n - 1.
key : callable, optional
    If not None, apply the key function to the series values
    before sorting. This is similar to the `key` argument in the
    builtin :meth:`sorted` function, with the notable difference that
    this `key` function should be *vectorized*. It should expect a
    ``Series`` and return an array-like.

Returns
-------
Series or None
    Series ordered by values or None if ``inplace=True``.

See Also
--------
Series.sort_index : Sort by the Series indices.
DataFrame.sort_values : Sort DataFrame by the values along either axis.
DataFrame.sort_index : Sort DataFrame by indices.

Examples
--------
>>> s = pd.Series([np.nan, 1, 3, 10, 5])
>>> s
0     NaN
1     1.0
2     3.0
3     10.0
4     5.0
dtype: float64

Sort values ascending order (default behaviour)

>>> s.sort_values(ascending=True)
1     1.0
2     3.0
4     5.0
3    10.0
0     NaN
dtype: float64

Sort values descending order

>>> s.sort_values(ascending=False)
3    10.0
4     5.0
2     3.0
1     1.0
0     NaN
dtype: float64

Sort values putting NAs first

>>> s.sort_values(na_position='first')
0     NaN
1     1.0
2     3.0
4     5.0
3    10.0
dtype: float64

Sort a series of strings

>>> s = pd.Series(['z', 'b', 'd', 'a', 'c'])
>>> s
0    z
1    b
2    d
3    a
4    c
dtype: object

>>> s.sort_values()
3    a
1    b
4    c
2    d
0    z
dtype: object

Sort using a key function. Your `key` function will be
given the ``Series`` of values and should return an array-like.

>>> s = pd.Series(['a', 'B', 'c', 'D', 'e'])
>>> s.sort_values()
1    B
3    D
0    a
2    c
4    e
dtype: object
>>> s.sort_values(key=lambda x: x.str.lower())
0    a
1    B
2    c
3    D
4    e
dtype: object

NumPy ufuncs work well here. For example, we can
sort by the ``sin`` of the value

>>> s = pd.Series([-4, -2, 0, 2, 4])
>>> s.sort_values(key=np.sin)
1   -2
4    4
2    0
0   -4
3    2
dtype: int64

More complicated user-defined functions can be used,
as long as they expect a Series and return an array-like

>>> s.sort_values(key=lambda x: (np.tan(x.cumsum())))
0   -4
3    2
4    4
1   -2
2    0
dtype: int64
r   zRThis Series is a view of some other array, to sort in-place you must create a copyr   zLength of ascending (z) must be 1 for Seriesr   )rS  r  zinvalid na_position: Nr   Fr1  r  r3  )r(   r<  r  r   r4   r   r   r_  r   r'   r   rg   r   rh   r   rV  r   r   r   r^   r6  )r   r   r  r   r  r  rL  rb  values_to_sortsorted_indexrd  s              r   r  r  g  s   r &gy9d# t7 
 	""Xd^Y7I9~" +C	N+;;QR  "!I&y1	//4[MBCC !&*;D*FGOON!\\Nd9o{SL#l*;<<++D1199$9''""LL&djj.FU # 
 (\):;FL&&tM&BBV$r   )r   r  r  r  r  sort_remainingrL  rb  c       	            g r   r  
r   r   r  r  r   r  r  r  rL  rb  s
             r   
sort_indexSeries.sort_index0  r  r   	r   r  r  r   r  r  r  rL  rb  c       	            g r   r  r  s
             r   r  r  @  r  r   c       	            g r   r  r  s
             r   r  r  P  r  r   c       	        .   > [         T
U ]  UUUUUUUUU	S9	$ )u  
Sort Series by index labels.

Returns a new Series sorted by label if `inplace` argument is
``False``, otherwise updates the original series and returns None.

Parameters
----------
axis : {0 or 'index'}
    Unused. Parameter needed for compatibility with DataFrame.
level : int, optional
    If not None, sort on values in specified index level(s).
ascending : bool or list-like of bools, default True
    Sort ascending vs. descending. When the index is a MultiIndex the
    sort direction can be controlled for each level individually.
inplace : bool, default False
    If True, perform operation in-place.
kind : {'quicksort', 'mergesort', 'heapsort', 'stable'}, default 'quicksort'
    Choice of sorting algorithm. See also :func:`numpy.sort` for more
    information. 'mergesort' and 'stable' are the only stable algorithms. For
    DataFrames, this option is only applied when sorting on a single
    column or label.
na_position : {'first', 'last'}, default 'last'
    If 'first' puts NaNs at the beginning, 'last' puts NaNs at the end.
    Not implemented for MultiIndex.
sort_remaining : bool, default True
    If True and sorting by level and index is multilevel, sort by other
    levels too (in order) after sorting by specified level.
ignore_index : bool, default False
    If True, the resulting axis will be labeled 0, 1, …, n - 1.
key : callable, optional
    If not None, apply the key function to the index values
    before sorting. This is similar to the `key` argument in the
    builtin :meth:`sorted` function, with the notable difference that
    this `key` function should be *vectorized*. It should expect an
    ``Index`` and return an ``Index`` of the same shape.

Returns
-------
Series or None
    The original Series sorted by the labels or None if ``inplace=True``.

See Also
--------
DataFrame.sort_index: Sort DataFrame by the index.
DataFrame.sort_values: Sort DataFrame by the value.
Series.sort_values : Sort Series by the value.

Examples
--------
>>> s = pd.Series(['a', 'b', 'c', 'd'], index=[3, 2, 1, 4])
>>> s.sort_index()
1    c
2    b
3    a
4    d
dtype: object

Sort Descending

>>> s.sort_index(ascending=False)
4    d
3    a
2    b
1    c
dtype: object

By default NaNs are put at the end, but use `na_position` to place
them at the beginning

>>> s = pd.Series(['a', 'b', 'c', 'd'], index=[3, 2, 1, np.nan])
>>> s.sort_index(na_position='first')
NaN     d
 1.0    c
 2.0    b
 3.0    a
dtype: object

Specify index level to sort

>>> arrays = [np.array(['qux', 'qux', 'foo', 'foo',
...                     'baz', 'baz', 'bar', 'bar']),
...           np.array(['two', 'one', 'two', 'one',
...                     'two', 'one', 'two', 'one'])]
>>> s = pd.Series([1, 2, 3, 4, 5, 6, 7, 8], index=arrays)
>>> s.sort_index(level=1)
bar  one    8
baz  one    6
foo  one    4
qux  one    2
bar  two    7
baz  two    5
foo  two    3
qux  two    1
dtype: int64

Does not sort by remaining levels when sorting by levels

>>> s.sort_index(level=1, sort_remaining=False)
qux  one    2
foo  one    4
baz  one    6
bar  one    8
qux  two    1
foo  two    3
baz  two    5
bar  two    7
dtype: int64

Apply a key function before sorting

>>> s = pd.Series([1, 2, 3, 4], index=['A', 'b', 'C', 'd'])
>>> s.sort_index(key=lambda x : x.str.lower())
A    1
b    2
C    3
d    4
dtype: int64
r  )r  r  )r   r   r  r  r   r  r  r  rL  rb  r  s             r   r  r  `  s8    J w!#)% " 

 
	
r   c                   US:w  a  U R                  U5        U R                  n[        U5      nUR                  5       (       al  [        R
                  " S[        [        5       S9  [        R                  " [        U 5      S[        R                  S9nU) n[        R                  " XX   US9Xx'   O[        R                  " XRS9nU R                  XpR                  U R                  [        R                  SS9n	U	R!                  U SS	9$ )
a  
Return the integer indices that would sort the Series values.

Override ndarray.argsort. Argsorts the value, omitting NA/null values,
and places the result in the same locations as the non-NA values.

Parameters
----------
axis : {0 or 'index'}
    Unused. Parameter needed for compatibility with DataFrame.
kind : {'mergesort', 'quicksort', 'heapsort', 'stable'}, default 'quicksort'
    Choice of sorting algorithm. See :func:`numpy.sort` for more
    information. 'mergesort' and 'stable' are the only stable algorithms.
order : None
    Has no effect but is accepted for compatibility with numpy.
stable : None
    Has no effect but is accepted for compatibility with numpy.

Returns
-------
Series[np.intp]
    Positions of values within the sort order with -1 indicating
    nan values.

See Also
--------
numpy.ndarray.argsort : Returns the indices that would sort this array.

Examples
--------
>>> s = pd.Series([3, 2, 1])
>>> s.argsort()
0    2
1    1
2    0
dtype: int64
r  zThe behavior of Series.argsort in the presence of NA values is deprecated. In a future version, NA values will be ordered last instead of set to -1.r   r  r  F)r   r   r   r   argsortr3  )r<  r   r?   r  r   r   r   r&   r   fullr   intpr  r   r   r   r6  )
r   r   r  r'  stabler   r  rd  notmaskrY  s
             r   r  Series.argsort  s    X 2:!!$'F|88:: MM- +- WWSY"'':FeG jjtDFOZZ2F**499BGG%   
 Y77r   c                H    [         R                  " XUS9R                  5       $ )a	  
Return the largest `n` elements.

Parameters
----------
n : int, default 5
    Return this many descending sorted values.
keep : {'first', 'last', 'all'}, default 'first'
    When there are duplicate values that cannot all fit in a
    Series of `n` elements:

    - ``first`` : return the first `n` occurrences in order
      of appearance.
    - ``last`` : return the last `n` occurrences in reverse
      order of appearance.
    - ``all`` : keep all occurrences. This can result in a Series of
      size larger than `n`.

Returns
-------
Series
    The `n` largest values in the Series, sorted in decreasing order.

See Also
--------
Series.nsmallest: Get the `n` smallest elements.
Series.sort_values: Sort Series by values.
Series.head: Return the first `n` rows.

Notes
-----
Faster than ``.sort_values(ascending=False).head(n)`` for small `n`
relative to the size of the ``Series`` object.

Examples
--------
>>> countries_population = {"Italy": 59000000, "France": 65000000,
...                         "Malta": 434000, "Maldives": 434000,
...                         "Brunei": 434000, "Iceland": 337000,
...                         "Nauru": 11300, "Tuvalu": 11300,
...                         "Anguilla": 11300, "Montserrat": 5200}
>>> s = pd.Series(countries_population)
>>> s
Italy       59000000
France      65000000
Malta         434000
Maldives      434000
Brunei        434000
Iceland       337000
Nauru          11300
Tuvalu         11300
Anguilla       11300
Montserrat      5200
dtype: int64

The `n` largest elements where ``n=5`` by default.

>>> s.nlargest()
France      65000000
Italy       59000000
Malta         434000
Maldives      434000
Brunei        434000
dtype: int64

The `n` largest elements where ``n=3``. Default `keep` value is 'first'
so Malta will be kept.

>>> s.nlargest(3)
France    65000000
Italy     59000000
Malta       434000
dtype: int64

The `n` largest elements where ``n=3`` and keeping the last duplicates.
Brunei will be kept since it is the last with value 434000 based on
the index order.

>>> s.nlargest(3, keep='last')
France      65000000
Italy       59000000
Brunei        434000
dtype: int64

The `n` largest elements where ``n=3`` with all duplicates kept. Note
that the returned Series has five elements due to the three duplicates.

>>> s.nlargest(3, keep='all')
France      65000000
Italy       59000000
Malta         434000
Maldives      434000
Brunei        434000
dtype: int64
nrK  )re   SelectNSeriesnlargestr   r  rK  s      r   r  Series.nlargest:  s!    D $$TT:CCEEr   c                H    [         R                  " XUS9R                  5       $ )ag	  
Return the smallest `n` elements.

Parameters
----------
n : int, default 5
    Return this many ascending sorted values.
keep : {'first', 'last', 'all'}, default 'first'
    When there are duplicate values that cannot all fit in a
    Series of `n` elements:

    - ``first`` : return the first `n` occurrences in order
      of appearance.
    - ``last`` : return the last `n` occurrences in reverse
      order of appearance.
    - ``all`` : keep all occurrences. This can result in a Series of
      size larger than `n`.

Returns
-------
Series
    The `n` smallest values in the Series, sorted in increasing order.

See Also
--------
Series.nlargest: Get the `n` largest elements.
Series.sort_values: Sort Series by values.
Series.head: Return the first `n` rows.

Notes
-----
Faster than ``.sort_values().head(n)`` for small `n` relative to
the size of the ``Series`` object.

Examples
--------
>>> countries_population = {"Italy": 59000000, "France": 65000000,
...                         "Brunei": 434000, "Malta": 434000,
...                         "Maldives": 434000, "Iceland": 337000,
...                         "Nauru": 11300, "Tuvalu": 11300,
...                         "Anguilla": 11300, "Montserrat": 5200}
>>> s = pd.Series(countries_population)
>>> s
Italy       59000000
France      65000000
Brunei        434000
Malta         434000
Maldives      434000
Iceland       337000
Nauru          11300
Tuvalu         11300
Anguilla       11300
Montserrat      5200
dtype: int64

The `n` smallest elements where ``n=5`` by default.

>>> s.nsmallest()
Montserrat    5200
Nauru        11300
Tuvalu       11300
Anguilla     11300
Iceland     337000
dtype: int64

The `n` smallest elements where ``n=3``. Default `keep` value is
'first' so Nauru and Tuvalu will be kept.

>>> s.nsmallest(3)
Montserrat   5200
Nauru       11300
Tuvalu      11300
dtype: int64

The `n` smallest elements where ``n=3`` and keeping the last
duplicates. Anguilla and Tuvalu will be kept since they are the last
with value 11300 based on the index order.

>>> s.nsmallest(3, keep='last')
Montserrat   5200
Anguilla    11300
Tuvalu      11300
dtype: int64

The `n` smallest elements where ``n=3`` with all duplicates kept. Note
that the returned Series has four elements due to the three duplicates.

>>> s.nsmallest(3, keep='all')
Montserrat   5200
Nauru       11300
Tuvalu      11300
Anguilla    11300
dtype: int64
r  )re   r  	nsmallestr  s      r   r  Series.nsmallest  s!    B $$TT:DDFFr   a  copy : bool, default True
            Whether to copy underlying data.

            .. note::
                The `copy` keyword will change behavior in pandas 3.0.
                `Copy-on-Write
                <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
                will be enabled by default, which means that all methods with a
                `copy` keyword will use a lazy copy mechanism to defer the copy and
                ignore the `copy` keyword. The `copy` keyword will be removed in a
                future version of pandas.

                You can already get the future behavior and improvements through
                enabling copy on write ``pd.options.mode.copy_on_write = True``a          Examples
        --------
        >>> s = pd.Series(
        ...     ["A", "B", "A", "C"],
        ...     index=[
        ...         ["Final exam", "Final exam", "Coursework", "Coursework"],
        ...         ["History", "Geography", "History", "Geography"],
        ...         ["January", "February", "March", "April"],
        ...     ],
        ... )
        >>> s
        Final exam  History     January      A
                    Geography   February     B
        Coursework  History     March        A
                    Geography   April        C
        dtype: object

        In the following example, we will swap the levels of the indices.
        Here, we will swap the levels column-wise, but levels can be swapped row-wise
        in a similar manner. Note that column-wise is the default behaviour.
        By not supplying any arguments for i and j, we swap the last and second to
        last indices.

        >>> s.swaplevel()
        Final exam  January     History         A
                    February    Geography       B
        Coursework  March       History         A
                    April       Geography       C
        dtype: object

        By supplying one argument, we can choose which index to swap the last
        index with. We can for example swap the first index with the last one as
        follows.

        >>> s.swaplevel(0)
        January     History     Final exam      A
        February    Geography   Final exam      B
        March       History     Coursework      A
        April       Geography   Coursework      C
        dtype: object

        We can also define explicitly which indices we want to swap by supplying values
        for both i and j. Here, we for example swap the first and second indices.

        >>> s.swaplevel(0, 1)
        History     Final exam  January         A
        Geography   Final exam  February        B
        History     Coursework  March           A
        Geography   Coursework  April           C
        dtype: object)r   r  r  c                    [        U R                  [        5      (       d   eU R                  U=(       a    [	        5       (       + S9nU R                  R                  X5      Ul        U$ )a>  
Swap levels i and j in a :class:`MultiIndex`.

Default is to swap the two innermost levels of the index.

Parameters
----------
i, j : int or str
    Levels of the indices to be swapped. Can pass level name as string.
{extra_params}

Returns
-------
{klass}
    {klass} with levels swapped in MultiIndex.

{examples}
r   )r   r   r\   r   r   	swaplevel)r   rK  jr   rd  s        r   r  Series.swaplevel  sS    z $**j1111 B-@-B)BCzz++A1r   c                    [        U R                  [        5      (       d  [        S5      eU R	                  SS9n[        UR                  [        5      (       d   eUR                  R                  U5      Ul        U$ )a  
Rearrange index levels using input order.

May not drop or duplicate levels.

Parameters
----------
order : list of int representing new level order
    Reference level by number or key.

Returns
-------
type of caller (new object)

Examples
--------
>>> arrays = [np.array(["dog", "dog", "cat", "cat", "bird", "bird"]),
...           np.array(["white", "black", "white", "black", "white", "black"])]
>>> s = pd.Series([1, 2, 3, 3, 5, 2], index=arrays)
>>> s
dog   white    1
      black    2
cat   white    3
      black    3
bird  white    5
      black    2
dtype: int64
>>> s.reorder_levels([1, 0])
white  dog     1
black  dog     2
white  cat     3
black  cat     3
white  bird    5
black  bird    2
dtype: int64
z/Can only reorder levels on a hierarchical axis.Nr   )r   r   r\   r  r   reorder_levels)r   r'  rd  s      r   r"  Series.reorder_levelsc  sd    J $**j11MNN%&,,
3333||2259r   c                0   [        U R                  [        5      (       a  U R                  R	                  5       u  p#O[        U 5      (       aQ  [        U R                  5      (       a7  [        R                  " [        R                  " U R                  5      5      u  p#O(U R                  5       nU(       a  UR                  SS9$ U$ U(       a  [        [        U5      5      nOU R                  R                  U5      nU R!                  X%U R"                  SS9$ )u  
Transform each element of a list-like to a row.

Parameters
----------
ignore_index : bool, default False
    If True, the resulting index will be labeled 0, 1, …, n - 1.

Returns
-------
Series
    Exploded lists to rows; index will be duplicated for these rows.

See Also
--------
Series.str.split : Split string values on specified separator.
Series.unstack : Unstack, a.k.a. pivot, Series with MultiIndex
    to produce DataFrame.
DataFrame.melt : Unpivot a DataFrame from wide format to long format.
DataFrame.explode : Explode a DataFrame from list-like
    columns to long format.

Notes
-----
This routine will explode list-likes including lists, tuples, sets,
Series, and np.ndarray. The result dtype of the subset rows will
be object. Scalars will be returned unchanged, and empty list-likes will
result in a np.nan for that row. In addition, the ordering of elements in
the output will be non-deterministic when exploding sets.

Reference :ref:`the user guide <reshaping.explode>` for more examples.

Examples
--------
>>> s = pd.Series([[1, 2, 3], 'foo', [], [3, 4]])
>>> s
0    [1, 2, 3]
1          foo
2           []
3       [3, 4]
dtype: object

>>> s.explode()
0      1
0      2
0      3
1    foo
2    NaN
3      3
3      4
dtype: object
T)r  Fr}  )r   r   r:   r   _exploder   r5   r   exploder   r<  r   r  r^   r   r  r   r   )r   rL  r   countsrd  r   s         r   r&  Series.explode  s    j djj.11!\\224NFFYY?4::66$__RZZ-EFNFFYY[F4@6%%4%0LfL(V5EJJ%%f-E  4995 QQr   c                     SSK Jn  U" XX#5      $ )af  
Unstack, also known as pivot, Series with MultiIndex to produce DataFrame.

Parameters
----------
level : int, str, or list of these, default last level
    Level(s) to unstack, can pass level name.
fill_value : scalar value, default None
    Value to use when replacing NaN values.
sort : bool, default True
    Sort the level(s) in the resulting MultiIndex columns.

Returns
-------
DataFrame
    Unstacked Series.

Notes
-----
Reference :ref:`the user guide <reshaping.stacking>` for more examples.

Examples
--------
>>> s = pd.Series([1, 2, 3, 4],
...               index=pd.MultiIndex.from_product([['one', 'two'],
...                                                 ['a', 'b']]))
>>> s
one  a    1
     b    2
two  a    3
     b    4
dtype: int64

>>> s.unstack(level=-1)
     a  b
one  1  2
two  3  4

>>> s.unstack(level=0)
   one  two
a    1    3
b    2    4
r   )unstack)pandas.core.reshape.reshaper*  )r   r  r  r7  r*  s        r   r*  Series.unstack  s    b 	8tJ55r   c                p    U R                  XS9nU R                  X0R                  SS9R                  U SS9$ )aS  
Map values of Series according to an input mapping or function.

Used for substituting each value in a Series with another value,
that may be derived from a function, a ``dict`` or
a :class:`Series`.

Parameters
----------
arg : function, collections.abc.Mapping subclass or Series
    Mapping correspondence.
na_action : {None, 'ignore'}, default None
    If 'ignore', propagate NaN values, without passing them to the
    mapping correspondence.

Returns
-------
Series
    Same index as caller.

See Also
--------
Series.apply : For applying more complex functions on a Series.
Series.replace: Replace values given in `to_replace` with `value`.
DataFrame.apply : Apply a function row-/column-wise.
DataFrame.map : Apply a function elementwise on a whole DataFrame.

Notes
-----
When ``arg`` is a dictionary, values in Series that are not in the
dictionary (as keys) are converted to ``NaN``. However, if the
dictionary is a ``dict`` subclass that defines ``__missing__`` (i.e.
provides a method for default values), then this default is used
rather than ``NaN``.

Examples
--------
>>> s = pd.Series(['cat', 'dog', np.nan, 'rabbit'])
>>> s
0      cat
1      dog
2      NaN
3   rabbit
dtype: object

``map`` accepts a ``dict`` or a ``Series``. Values that are not found
in the ``dict`` are converted to ``NaN``, unless the dict has a default
value (e.g. ``defaultdict``):

>>> s.map({'cat': 'kitten', 'dog': 'puppy'})
0   kitten
1    puppy
2      NaN
3      NaN
dtype: object

It also accepts a function:

>>> s.map('I am a {}'.format)
0       I am a cat
1       I am a dog
2       I am a nan
3    I am a rabbit
dtype: object

To avoid applying the function to missing values (and keep them as
``NaN``) ``na_action='ignore'`` can be used:

>>> s.map('I am a {}'.format, na_action='ignore')
0     I am a cat
1     I am a dog
2            NaN
3  I am a rabbit
dtype: object
)	na_actionFr1  mapr3  )_map_valuesr   r   r6  )r   argr.  r  s       r   r/  
Series.map  sJ    ` %%c%?
  ::E JWW X 
 	
r   c                    U $ )z
Sub-classes to define. Return a sliced object.

Parameters
----------
key : string / list of selections
ndim : {1, 2}
    Requested ndim of result.
subset : object, default None
    Subset to act on.
r  )r   rb  r{  subsets       r   _gotitemSeries._gotitema  s	     r   z
    See Also
    --------
    Series.apply : Invoke function on a Series.
    Series.transform : Transform function producing a Series with like indexes.
    z
    Examples
    --------
    >>> s = pd.Series([1, 2, 3, 4])
    >>> s
    0    1
    1    2
    2    3
    3    4
    dtype: int64

    >>> s.agg('min')
    1

    >>> s.agg(['min', 'max'])
    min   1
    max   4
    dtype: int64
    	aggregate)r   r   see_alsor  c                    U R                  U5        Uc  [        UR                  5       5      n[        XX4S9nUR	                  5       nU$ )N)rb  r  )r<  dictr  rK   agg)r   r  r   rb  r  oprd  s          r   r7  Series.aggregate  sE     	d# <'D$>r   	transform)r   r   c                    U R                  U5        [        5       (       d  [        5       (       a  U R                  SS9OU n[	        XQX4S9R                  5       nU$ )NFr   )r  rb  r  )r<  r   r   r   rK   r>  )r   r  r   rb  r  r  rd  s          r   r>  Series.transform  sZ     	d# #$$(:(<(< II5I! 	
 S$FPPRr   r  r   )by_rowc          	     :    [        U UUUUUS9R                  5       $ )a  
Invoke function on values of Series.

Can be ufunc (a NumPy function that applies to the entire Series)
or a Python function that only works on single values.

Parameters
----------
func : function
    Python function or NumPy ufunc to apply.
convert_dtype : bool, default True
    Try to find better dtype for elementwise function results. If
    False, leave as dtype=object. Note that the dtype is always
    preserved for some extension array dtypes, such as Categorical.

    .. deprecated:: 2.1.0
        ``convert_dtype`` has been deprecated. Do ``ser.astype(object).apply()``
        instead if you want ``convert_dtype=False``.
args : tuple
    Positional arguments passed to func after the series value.
by_row : False or "compat", default "compat"
    If ``"compat"`` and func is a callable, func will be passed each element of
    the Series, like ``Series.map``. If func is a list or dict of
    callables, will first try to translate each func into pandas methods. If
    that doesn't work, will try call to apply again with ``by_row="compat"``
    and if that fails, will call apply again with ``by_row=False``
    (backward compatible).
    If False, the func will be passed the whole Series at once.

    ``by_row`` has no effect when ``func`` is a string.

    .. versionadded:: 2.1.0
**kwargs
    Additional keyword arguments passed to func.

Returns
-------
Series or DataFrame
    If func returns a Series object the result will be a DataFrame.

See Also
--------
Series.map: For element-wise operations.
Series.agg: Only perform aggregating type operations.
Series.transform: Only perform transforming type operations.

Notes
-----
Functions that mutate the passed object can produce unexpected
behavior or errors and are not supported. See :ref:`gotchas.udf-mutation`
for more details.

Examples
--------
Create a series with typical summer temperatures for each city.

>>> s = pd.Series([20, 21, 12],
...               index=['London', 'New York', 'Helsinki'])
>>> s
London      20
New York    21
Helsinki    12
dtype: int64

Square the values by defining a function and passing it as an
argument to ``apply()``.

>>> def square(x):
...     return x ** 2
>>> s.apply(square)
London      400
New York    441
Helsinki    144
dtype: int64

Square the values by passing an anonymous function as an
argument to ``apply()``.

>>> s.apply(lambda x: x ** 2)
London      400
New York    441
Helsinki    144
dtype: int64

Define a custom function that needs additional positional
arguments and pass these additional arguments using the
``args`` keyword.

>>> def subtract_custom_value(x, custom_value):
...     return x - custom_value

>>> s.apply(subtract_custom_value, args=(5,))
London      15
New York    16
Helsinki     7
dtype: int64

Define a custom function that takes keyword arguments
and pass these arguments to ``apply``.

>>> def add_custom_values(x, **kwargs):
...     for month in kwargs:
...         x += kwargs[month]
...     return x

>>> s.apply(add_custom_values, june=30, july=20, august=25)
London      95
New York    96
Helsinki    87
dtype: int64

Use a function from the Numpy library.

>>> s.apply(np.log)
London      2.995732
New York    3.044522
Helsinki    2.484907
dtype: float64
)convert_dtyperA  rb  r  )rK   apply)r   r  rC  rb  rA  r  s         r   rD  Series.apply  s-    @ '
 %'	r   c                *   Uc`  Ub$  UR                   U R                  R                   :X  a9  [        5       (       a  U R                  US9$ U(       d  Uc  U R                  US9$ U $ [        R
                  " U R                  USS S9nU R                  XASS9$ )Nr   T)
allow_fillr  Fr1  )namesr   r   r   rC   take_ndr   r   )r   ru  rt  r   r  s        r   _reindex_indexerSeries._reindex_indexer>  s     ?DJJ4D4D!D"$$yydy++t|yydy++K''LL'dt

   5 IIr   c                    g)zK
Check if we do need a multi reindex; this is for compat with
higher dims.
Fr  )r   r   r4  r  s       r   _needs_reindex_multiSeries._needs_reindex_multiT  s    
 r   )r   r   r  r   c                   g r   r  r   r   r   r   r   r  r   s          r   renameSeries.rename[       	r   )r   r   r   r  r   c                   g r   r  rP  s          r   rQ  rR  h  rS  r   c                   g r   r  rP  s          r   rQ  rR  u  rS  r   r   c                  > Ub  U R                  U5      n[        U5      (       d  [        U5      (       a  [        TU ]  UUUUUS9$ U R                  XUS9$ )a-	  
Alter Series index labels or name.

Function / dict values must be unique (1-to-1). Labels not contained in
a dict / Series will be left as-is. Extra labels listed don't throw an
error.

Alternatively, change ``Series.name`` with a scalar value.

See the :ref:`user guide <basics.rename>` for more.

Parameters
----------
index : scalar, hashable sequence, dict-like or function optional
    Functions or dict-like are transformations to apply to
    the index.
    Scalar or hashable sequence-like will alter the ``Series.name``
    attribute.
axis : {0 or 'index'}
    Unused. Parameter needed for compatibility with DataFrame.
copy : bool, default True
    Also copy underlying data.

    .. note::
        The `copy` keyword will change behavior in pandas 3.0.
        `Copy-on-Write
        <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
        will be enabled by default, which means that all methods with a
        `copy` keyword will use a lazy copy mechanism to defer the copy and
        ignore the `copy` keyword. The `copy` keyword will be removed in a
        future version of pandas.

        You can already get the future behavior and improvements through
        enabling copy on write ``pd.options.mode.copy_on_write = True``
inplace : bool, default False
    Whether to return a new Series. If True the value of copy is ignored.
level : int or level name, default None
    In case of MultiIndex, only rename labels in the specified level.
errors : {'ignore', 'raise'}, default 'ignore'
    If 'raise', raise `KeyError` when a `dict-like mapper` or
    `index` contains labels that are not present in the index being transformed.
    If 'ignore', existing keys will be renamed and extra keys will be ignored.

Returns
-------
Series or None
    Series with index labels or name altered or None if ``inplace=True``.

See Also
--------
DataFrame.rename : Corresponding DataFrame method.
Series.rename_axis : Set the name of the axis.

Examples
--------
>>> s = pd.Series([1, 2, 3])
>>> s
0    1
1    2
2    3
dtype: int64
>>> s.rename("my_name")  # scalar, changes Series.name
0    1
1    2
2    3
Name: my_name, dtype: int64
>>> s.rename(lambda x: x ** 2)  # function, changes labels
0    1
1    2
4    3
dtype: int64
>>> s.rename({1: 3, 2: 5})  # mapping, changes labels
0    1
3    2
5    3
dtype: int64
)r   r   r  r   )r   r   )r<  r  r1   r  _renamer1  )r   r   r   r   r   r  r   r  s          r   rQ  rR    sk    n ((.DE??l511
 7? #   >>%t>DDr   a  
        Examples
        --------
        >>> s = pd.Series([1, 2, 3])
        >>> s
        0    1
        1    2
        2    3
        dtype: int64

        >>> s.set_axis(['a', 'b', 'c'], axis=0)
        a    1
        b    2
        c    3
        dtype: int64
    r   )r   r   extended_summary_subaxis_description_subsee_also_subr   r   c                   > [         TU ]  XUS9$ )Nr[  )r  set_axis)r   labelsr   r   r  s       r   r]  Series.set_axis  s    B w==r   r   )r   r   )r   r4  r   r  r  limit	tolerancec          
     *   > [         T	U ]  UUUUUUUS9$ )N)r   r4  r   r  r  r`  ra  )r  r   )
r   r   r   r4  r   r  r  r`  ra  r  s
            r   r   Series.reindex  s0    " w!  
 	
r   )r   r   r   c                   g r   r  r   mapperr   r   r   r   s         r   rename_axisSeries.rename_axis+  r  r   )r   r   r   r   c                   g r   r  re  s         r   rg  rh  7  r  r   c                   g r   r  re  s         r   rg  rh  C  r  r   c               &   > [         TU ]  UUUUUS9$ )N)rf  r   r   r   r   )r  rg  )r   rf  r   r   r   r   r  s         r   rg  rh  O  s+     w" # 
 	
r   )r   r   r  r  r   c                   g r   r  r   r^  r   r   r  r  r   r   s           r   r  Series.dropa  r  r   )r   r   r  r  r   r   c                   g r   r  rm  s           r   r  rn  o  r  r   c                   g r   r  rm  s           r   r  rn  }  r  r   raisec          
     *   > [         TU ]  UUUUUUUS9$ )a2	  
Return Series with specified index labels removed.

Remove elements of a Series based on specifying the index labels.
When using a multi-index, labels on different levels can be removed
by specifying the level.

Parameters
----------
labels : single label or list-like
    Index labels to drop.
axis : {0 or 'index'}
    Unused. Parameter needed for compatibility with DataFrame.
index : single label or list-like
    Redundant for application on Series, but 'index' can be used instead
    of 'labels'.
columns : single label or list-like
    No change is made to the Series; use 'index' or 'labels' instead.
level : int or level name, optional
    For MultiIndex, level for which the labels will be removed.
inplace : bool, default False
    If True, do operation inplace and return None.
errors : {'ignore', 'raise'}, default 'raise'
    If 'ignore', suppress error and only existing labels are dropped.

Returns
-------
Series or None
    Series with specified index labels removed or None if ``inplace=True``.

Raises
------
KeyError
    If none of the labels are found in the index.

See Also
--------
Series.reindex : Return only specified index labels of Series.
Series.dropna : Return series without null values.
Series.drop_duplicates : Return Series with duplicate values removed.
DataFrame.drop : Drop specified labels from rows or columns.

Examples
--------
>>> s = pd.Series(data=np.arange(3), index=['A', 'B', 'C'])
>>> s
A  0
B  1
C  2
dtype: int64

Drop labels B en C

>>> s.drop(labels=['B', 'C'])
A  0
dtype: int64

Drop 2nd level label in MultiIndex Series

>>> midx = pd.MultiIndex(levels=[['llama', 'cow', 'falcon'],
...                              ['speed', 'weight', 'length']],
...                      codes=[[0, 0, 0, 1, 1, 1, 2, 2, 2],
...                             [0, 1, 2, 0, 1, 2, 0, 1, 2]])
>>> s = pd.Series([45, 200, 1.2, 30, 250, 1.5, 320, 1, 0.3],
...               index=midx)
>>> s
llama   speed      45.0
        weight    200.0
        length      1.2
cow     speed      30.0
        weight    250.0
        length      1.5
falcon  speed     320.0
        weight      1.0
        length      0.3
dtype: float64

>>> s.drop(labels='weight', level=1)
llama   speed      45.0
        length      1.2
cow     speed      30.0
        length      1.5
falcon  speed     320.0
        length      0.3
dtype: float64
)r^  r   r   r  r  r   r   )r  r  )	r   r^  r   r   r  r  r   r   r  s	           r   r  rn    s1    B w|  
 	
r   c                   > [         TU ]  US9$ )a3  
Return item and drops from series. Raise KeyError if not found.

Parameters
----------
item : label
    Index of the element that needs to be removed.

Returns
-------
Value that is popped from series.

Examples
--------
>>> ser = pd.Series([1, 2, 3])

>>> ser.pop(0)
1

>>> ser
1    2
2    3
dtype: int64
)r  )r  r  )r   r  r  s     r   r  
Series.pop  s    2 w{{%%r   c                8    [        X5      R                  UUUUS9$ )N)r  max_colsverboseshow_counts)rl   render)r   rw  r  rv  memory_usagerx  s         r   infoSeries.info  s-     $-44#	 5 
 	
r   c                   U(       a  U OU R                  5       nUR                  n[        R                  " Xa5      n[	        U[
        5      (       a  UR                  X$U5        O[        R                  " U5      nU" XdUS9  U(       a  gU$ )zv
Replaces values in a Series using the fill method specified when no
replacement value is given in the replace method
)r`  r  N)r   r   rF   mask_missingr   rL   _fill_mask_inplaceget_fill_func)	r   
to_replacer4  r   r`  rd  r   r  fill_fs	            r   _replace_singleSeries._replace_single"  sn     !diik##F7fn--%%fT:**62F6T2r   c                h    U R                  US9nU(       a  X0R                  R                  US9-  nU$ )a   
Return the memory usage of the Series.

The memory usage can optionally include the contribution of
the index and of elements of `object` dtype.

Parameters
----------
index : bool, default True
    Specifies whether to include the memory usage of the Series index.
deep : bool, default False
    If True, introspect the data deeply by interrogating
    `object` dtypes for system-level memory consumption, and include
    it in the returned value.

Returns
-------
int
    Bytes of memory consumed.

See Also
--------
numpy.ndarray.nbytes : Total bytes consumed by the elements of the
    array.
DataFrame.memory_usage : Bytes consumed by a DataFrame.

Examples
--------
>>> s = pd.Series(range(3))
>>> s.memory_usage()
152

Not including the index gives the size of the rest of the data, which
is necessarily smaller:

>>> s.memory_usage(index=False)
24

The memory footprint of `object` values is ignored by default:

>>> s = pd.Series(["a", "b"])
>>> s.values
array(['a', 'b'], dtype=object)
>>> s.memory_usage()
144
>>> s.memory_usage(deep=True)
244
r   )_memory_usager   rz  )r   r   r   r(  s       r   rz  Series.memory_usage8  s:    b D)((d(33Ar   c                    [         R                  " U R                  U5      nU R                  X R                  SS9R                  U SS9$ )a  
Whether elements in Series are contained in `values`.

Return a boolean Series showing whether each element in the Series
matches an element in the passed sequence of `values` exactly.

Parameters
----------
values : set or list-like
    The sequence of values to test. Passing in a single string will
    raise a ``TypeError``. Instead, turn a single string into a
    list of one element.

Returns
-------
Series
    Series of booleans indicating if each element is in values.

Raises
------
TypeError
  * If `values` is a string

See Also
--------
DataFrame.isin : Equivalent method on DataFrame.

Examples
--------
>>> s = pd.Series(['llama', 'cow', 'llama', 'beetle', 'llama',
...                'hippo'], name='animal')
>>> s.isin(['cow', 'llama'])
0     True
1     True
2     True
3    False
4     True
5    False
Name: animal, dtype: bool

To invert the boolean values, use the ``~`` operator:

>>> ~s.isin(['cow', 'llama'])
0    False
1    False
2    False
3     True
4    False
5     True
Name: animal, dtype: bool

Passing a single string as ``s.isin('llama')`` will raise an error. Use
a list of one element instead:

>>> s.isin(['llama'])
0     True
1    False
2     True
3    False
4     True
5    False
Name: animal, dtype: bool

Strings and integers are distinct and are therefore not comparable:

>>> pd.Series([1]).isin(['1'])
0    False
dtype: bool
>>> pd.Series([1.1]).isin(['1.1'])
0    False
dtype: bool
Fr1  isinr3  )rC   r  r   r   r   r6  )r   r   rd  s      r   r  Series.isinn  sK    R v6  zz FSS T 
 	
r   c                    US:X  a  X:  nX:*  nXE-  $ US:X  a  X:  nX:  nXE-  $ US:X  a  X:  nX:*  nXE-  $ US:X  a  X:  nX:  nXE-  $ [        S5      e)aU  
Return boolean Series equivalent to left <= series <= right.

This function returns a boolean vector containing `True` wherever the
corresponding Series element is between the boundary values `left` and
`right`. NA values are treated as `False`.

Parameters
----------
left : scalar or list-like
    Left boundary.
right : scalar or list-like
    Right boundary.
inclusive : {"both", "neither", "left", "right"}
    Include boundaries. Whether to set each bound as closed or open.

    .. versionchanged:: 1.3.0

Returns
-------
Series
    Series representing whether each element is between left and
    right (inclusive).

See Also
--------
Series.gt : Greater than of series and other.
Series.lt : Less than of series and other.

Notes
-----
This function is equivalent to ``(left <= ser) & (ser <= right)``

Examples
--------
>>> s = pd.Series([2, 0, 4, 8, np.nan])

Boundary values are included by default:

>>> s.between(1, 4)
0     True
1    False
2     True
3    False
4    False
dtype: bool

With `inclusive` set to ``"neither"`` boundary values are excluded:

>>> s.between(1, 4, inclusive="neither")
0     True
1    False
2    False
3    False
4    False
dtype: bool

`left` and `right` can be any scalar value:

>>> s = pd.Series(['Alice', 'Bob', 'Carol', 'Eve'])
>>> s.between('Anna', 'Daniel')
0    False
1     True
2     True
3    False
dtype: bool
bothr  r  neitherzJInclusive has to be either string of 'both','left', 'right', or 'neither'.)r   )r   r  r  	inclusivelmaskrmasks         r   betweenSeries.between  s    R LEME  } & LELE } '!KEME } )#KELE } 1 r   c           	        [        U[        5      (       d  [        S[        U5       35      eU(       d  [	        S5      e[        U5       H_  u  p#[        U[        5      (       d  [        SU S[        U5       S35      e[        U5      S:w  d  MF  [	        SU S[        U5       S35      e   U VVs/ s H1  u  pE[        R                  " X@5      [        R                  " XP5      4PM3     nnnU R                  5       n[        U6 u  px/ UQUP V	s/ s H  n	[        U	5      S   PM     n
n	[        [        U
5      5      S	:  a  [        U
5      n/ n[        Xx5       Hk  u  pE[        U5      (       a  [!        U[        U5      US
9nO0[        U["        5      (       a  UR%                  U5      nO	['        X[S9nUR)                  U5        Mm     UnUR%                  U5      n[+        [-        [        U5      5      5      n[        XSSS2   USSS2   5       H  u  pn UR/                  XESSSS9nM     U$ s  snnf s  sn	f ! [0         a  n[	        SU SU S35      UeSnAff = f)a  
Replace values where the conditions are True.

Parameters
----------
caselist : A list of tuples of conditions and expected replacements
    Takes the form:  ``(condition0, replacement0)``,
    ``(condition1, replacement1)``, ... .
    ``condition`` should be a 1-D boolean array-like object
    or a callable. If ``condition`` is a callable,
    it is computed on the Series
    and should return a boolean Series or array.
    The callable must not change the input Series
    (though pandas doesn`t check it). ``replacement`` should be a
    1-D array-like object, a scalar or a callable.
    If ``replacement`` is a callable, it is computed on the Series
    and should return a scalar or Series. The callable
    must not change the input Series
    (though pandas doesn`t check it).

    .. versionadded:: 2.2.0

Returns
-------
Series

See Also
--------
Series.mask : Replace values where the condition is True.

Examples
--------
>>> c = pd.Series([6, 7, 8, 9], name='c')
>>> a = pd.Series([0, 0, 1, 2])
>>> b = pd.Series([0, 3, 4, 5])

>>> c.case_when(caselist=[(a.gt(0), a),  # condition, replacement
...                       (b.gt(0), b)])
0    6
1    3
2    1
3    2
Name: c, dtype: int64
z4The caselist argument should be a list; instead got zIprovide at least one boolean condition, with a corresponding replacement.z	Argument z must be a tuple; instead got .r   zE must have length 2; a condition and replacement; instead got length r   r   )r  r  r   r  Nr  F)r  r   r   r  zFailed to apply conditionz and replacement)r   r   r   r   r   r  r   r   r   rV  r   r  r.   setr-   r6   r,   r=   r   pd_arrayappendreversedrF  r  r  )r   caselistnumentry	conditionreplacementdefault
conditionsreplacementsr1  common_dtypescommon_dtypeupdated_replacementscounterpositionerrors                   r   	case_whenSeries.case_when  s   j (D))FtH~FVW  4 
 $H-JCeU++u$B4;-qQ  5zQ u %**-e*Q8  .  +3

 +3&	 %%i6%%k8 +3 	 
 ))+#&> 
=U|=UW=UV=Uc)#.q1=UVs=!"Q&+M:L#% *-j*G&	[))"D)#i.#K  Y77"-"4"4\"BK"*;"KK$++K8 +H 0Lnn\2G5Z1203"%|DbD'91
,H!,,q%t ' 	1
 M
 W2   /z9I(STUs$   28H/H5H::
IIIc                .    [         R                  " U 5      $ r   )rU   r?   r   s    r   r?   Series.isna  s    ||D!!r   c                    > [         TU ]  5       $ )z,
Series.isnull is an alias for Series.isna.
)r  isnullrI  s    r   r  Series.isnull  s    
 w~r   c                    > [         TU ]  5       $ r   )r  rA   rI  s    r   rA   Series.notna  s    w}r   c                    > [         TU ]  5       $ )z.
Series.notnull is an alias for Series.notna.
)r  notnullrI  s    r   r  Series.notnull  s    
 w  r   )r   r   howrL  c                   g r   r  r   r   r   r  rL  s        r   r:  Series.dropna       	r   )r   r  rL  c                   g r   r  r  s        r   r:  r    r  r   c               F   [        US5      n[        US5      nU R                  U=(       d    S5        U R                  (       a  [        U 5      nOU(       d  U R	                  SS9nOU nU(       a  [        [        U5      5      Ul        U(       a  U R                  U5      $ U$ )ur  
Return a new Series with missing values removed.

See the :ref:`User Guide <missing_data>` for more on which values are
considered missing, and how to work with missing data.

Parameters
----------
axis : {0 or 'index'}
    Unused. Parameter needed for compatibility with DataFrame.
inplace : bool, default False
    If True, do operation inplace and return None.
how : str, optional
    Not in use. Kept for compatibility.
ignore_index : bool, default ``False``
    If ``True``, the resulting axis will be labeled 0, 1, …, n - 1.

    .. versionadded:: 2.0.0

Returns
-------
Series or None
    Series with NA entries dropped from it or None if ``inplace=True``.

See Also
--------
Series.isna: Indicate missing values.
Series.notna : Indicate existing (non-missing) values.
Series.fillna : Replace missing values.
DataFrame.dropna : Drop rows or columns which contain NA values.
Index.dropna : Drop missing indices.

Examples
--------
>>> ser = pd.Series([1., 2., np.nan])
>>> ser
0    1.0
1    2.0
2    NaN
dtype: float64

Drop NA values from a Series.

>>> ser.dropna()
0    1.0
1    2.0
dtype: float64

Empty strings are not considered NA values. ``None`` is considered an
NA value.

>>> ser = pd.Series([np.nan, 2, pd.NaT, '', None, 'I stay'])
>>> ser
0       NaN
1         2
2       NaT
3
4      None
5    I stay
dtype: object
>>> ser.dropna()
1         2
3
5    I stay
dtype: object
r   rL  r   Nr   )	r(   r<  r  rB   r   r^   r   r   rV  )r   r   r   r  rL  rd  s         r   r:  r    s    T &gy9*<Hdia((.F-(V5FL''//Mr   c                0   [        U R                  [        5      (       d+  [        S[	        U R                  5      R
                   35      eU R                  U=(       a    [        5       (       + S9nU R                  R                  XS9n[        USU5        U$ )a  
Cast to DatetimeIndex of Timestamps, at *beginning* of period.

Parameters
----------
freq : str, default frequency of PeriodIndex
    Desired frequency.
how : {'s', 'e', 'start', 'end'}
    Convention for converting period to timestamp; start of period
    vs. end.
copy : bool, default True
    Whether or not to return a copy.

    .. note::
        The `copy` keyword will change behavior in pandas 3.0.
        `Copy-on-Write
        <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
        will be enabled by default, which means that all methods with a
        `copy` keyword will use a lazy copy mechanism to defer the copy and
        ignore the `copy` keyword. The `copy` keyword will be removed in a
        future version of pandas.

        You can already get the future behavior and improvements through
        enabling copy on write ``pd.options.mode.copy_on_write = True``

Returns
-------
Series with DatetimeIndex

Examples
--------
>>> idx = pd.PeriodIndex(['2023', '2024', '2025'], freq='Y')
>>> s1 = pd.Series([1, 2, 3], index=idx)
>>> s1
2023    1
2024    2
2025    3
Freq: Y-DEC, dtype: int64

The resulting frequency of the Timestamps is `YearBegin`

>>> s1 = s1.to_timestamp()
>>> s1
2023-01-01    1
2024-01-01    2
2025-01-01    3
Freq: YS-JAN, dtype: int64

Using `freq` which is the offset that the Timestamps will have

>>> s2 = pd.Series([1, 2, 3], index=idx)
>>> s2 = s2.to_timestamp(freq='M')
>>> s2
2023-01-31    1
2024-01-31    2
2025-01-31    3
Freq: YE-JAN, dtype: int64
unsupported Type r   )freqr  r   )
r   r   r]   r   r   r   r   r   to_timestampsetattr)r   r  r  r   new_objru  s         r   r  Series.to_timestamp  s}    @ $**k22/TZZ0@0I0I/JKLL))!C.A.C*C)DJJ+++?	),r   c                0   [        U R                  [        5      (       d+  [        S[	        U R                  5      R
                   35      eU R                  U=(       a    [        5       (       + S9nU R                  R                  US9n[        USU5        U$ )a  
Convert Series from DatetimeIndex to PeriodIndex.

Parameters
----------
freq : str, default None
    Frequency associated with the PeriodIndex.
copy : bool, default True
    Whether or not to return a copy.

    .. note::
        The `copy` keyword will change behavior in pandas 3.0.
        `Copy-on-Write
        <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
        will be enabled by default, which means that all methods with a
        `copy` keyword will use a lazy copy mechanism to defer the copy and
        ignore the `copy` keyword. The `copy` keyword will be removed in a
        future version of pandas.

        You can already get the future behavior and improvements through
        enabling copy on write ``pd.options.mode.copy_on_write = True``

Returns
-------
Series
    Series with index converted to PeriodIndex.

Examples
--------
>>> idx = pd.DatetimeIndex(['2023', '2024', '2025'])
>>> s = pd.Series([1, 2, 3], index=idx)
>>> s = s.to_period()
>>> s
2023    1
2024    2
2025    3
Freq: Y-DEC, dtype: int64

Viewing the index

>>> s.index
PeriodIndex(['2023', '2024', '2025'], dtype='period[Y-DEC]')
r  r   )r  r   )
r   r   rZ   r   r   r   r   r   	to_periodr  )r   r  r   r  ru  s        r   r  Series.to_periodf  s}    X $**m44/TZZ0@0I0I/JKLL))!C.A.C*C)DJJ((d(3	),r   z!list[Literal['index', 'columns']]_AXIS_ORDERSz
Literal[0]_info_axis_numberzLiteral['index']_info_axis_nameaG  
        The index (axis labels) of the Series.

        The index of a Series is used to label and identify each element of the
        underlying data. The index can be thought of as an immutable ordered set
        (technically a multi-set, as it may contain duplicate labels), and is
        used to index and align data in pandas.

        Returns
        -------
        Index
            The index labels of the Series.

        See Also
        --------
        Series.reindex : Conform Series to new index.
        Index : The base pandas index type.

        Notes
        -----
        For more information on pandas indexing, see the `indexing user guide
        <https://pandas.pydata.org/docs/user_guide/indexing.html>`__.

        Examples
        --------
        To create a Series with a custom index and view the index labels:

        >>> cities = ['Kolkata', 'Chicago', 'Toronto', 'Lisbon']
        >>> populations = [14.85, 2.71, 2.93, 0.51]
        >>> city_series = pd.Series(populations, index=cities)
        >>> city_series.index
        Index(['Kolkata', 'Chicago', 'Toronto', 'Lisbon'], dtype='object')

        To change the index labels of an existing Series:

        >>> city_series.index = ['KOL', 'CHI', 'TOR', 'LIS']
        >>> city_series.index
        Index(['KOL', 'CHI', 'TOR', 'LIS'], dtype='object')
        )r   r%   r   r   plotr   structr   c                   [         R                  " X5      n[        U[        5      (       a!  U R	                  U5      (       d  [        S5      eU R                  n[        USSS9n[         R                  " XEU5      nU R                  XcS9$ )Nz3Can only compare identically-labeled Series objectsTextract_numpyextract_ranger   )
rH   r  r   r   _indexed_samer   r   rS   comparison_op_construct_resultr   r  r<  res_namelvaluesrvaluesr7  s          r   _cmp_methodSeries._cmp_method  sx    ))$6eV$$T-?-?-F-FRSS,,TN&&w<
%%j%@@r   c                    [         R                  " X5      nU R                  USS9u  pU R                  n[	        USSS9n[         R
                  " XEU5      nU R                  XcS9$ )NT)align_asobjectr  r  )rH   r  _align_for_opr   rS   
logical_opr  r  s          r   _logical_methodSeries._logical_method  sd    ))$6((t(D,,TN^^Gb9
%%j%@@r   c                h    U R                  U5      u  p[        R                  R                  XU5      $ r   )r  rD   r  _arith_method)r   r  r<  s      r   r  Series._arith_method  s-    ((/!!//R@@r   c                   U n[        U[        5      (       a  UR                  R                  UR                  5      (       d  U(       a  UR                  [
        [        R                  4;  d$  UR                  [
        [        R                  4;  a"  [        R                  " S[        [        5       S9  UR                  [
        5      nUR                  [
        5      nUR                  USS9u  p1X14$ )zalign lhs and rhs SerieszOperation between non boolean Series with different indexes will no longer return a boolean result in a future version. Cast both Series to object type to maintain the prior behavior.r   Fr   )r   r   r   r   r   r   r   bool_r   r   r   r&   r   r  )r   r  r  r  s       r   r  Series._align_for_op  s    
 eV$$::$$U[[11!zz&"(();;u{{S @ !> *'7'9  ;;v.D!LL0E"jjUj;{r   c                   U nU R                   R                  UR                   5      (       d  U R                  XSSS9u  pQ[        R                  " UR
                  UR
                  U5      u  pg[        R                  " SS9   U" Xg5      nSSS5        [        R                  " X5      n	UR                  WU	5      n
[        [        U
5      $ ! , (       d  f       NF= f)a  
Perform generic binary operation with optional fill value.

Parameters
----------
other : Series
func : binary operator
fill_value : float or object
    Value to substitute for NA/null values. If both Series are NA in a
    location, the result will be NA regardless of the passed fill value.
level : int or level name, default None
    Broadcast across a level, matching Index values on the
    passed MultiIndex level.

Returns
-------
Series
r  F)r  r  r   r   r  N)r   r   r  rH   
fill_binopr   r   r  r  r  r   r   )r   r  r  r  r  r  	this_vals
other_valsrd  r   rQ  s              r   _binopSeries._binop  s    & zz  --**UgE*RKD #t||U]]J W	[[X&)0F ' %%d2$$VT2FC   '&s   	C
Cc                \   [        U[        5      (       aW  U R                  US   US9nU R                  US   US9n[        U[        5      (       d   e[        U[        5      (       d   eX44$ [	        USS5      nU R                  XR                  USS9nUR                  U 5      nX&l        U$ )z
Construct an appropriately-labelled Series from the result of an op.

Parameters
----------
result : ndarray or ExtensionArray
name : Label

Returns
-------
Series
    In the case of __divmod__ or __rdivmod__, a 2-tuple of Series.
r   r  r   r   NF)r   r   r   )	r   r   r  r   r   r   r   r6  r   )r   rd  r   res1res2r   rQ  s          r   r  Series._construct_result9  s      fe$$ ))&)$)?D))&)$)?D dF++++dF++++< .jjERt$ 
r   r  r  r   c                  Ub  U R                  U5        [        R                  " X5      n[        U[        5      (       a  U R                  XX4S9$ [        U[        R                  [        [        45      (       aU  [        U5      [        U 5      :w  a  [        S5      eU R                  XR                  SS9nU R                  XX4S9nXgl        U$ Ub)  [        U5      (       a  U" X5      $ U R!                  U5      n U" X5      $ )N)r  r  zLengths must be equalFr   )r<  rH   r  r   r   r  r   r   r   r   r   r   r   r   r   r?   fillna)r   r  r<  r  r  r   r  rd  s           r   _flex_methodSeries._flex_method_  s    !!$'))$6eV$$;;u;MM

D%8995zSY& !899%%eZZe%DE[[%[OF#LM%;;d//{{:.d?"r   eqc                B    U R                  U[        R                  X#US9$ Nr  )r  operatorr  r   r  r  r  r   s        r   r  	Series.eqv  s)       8;;e ! 
 	
r   nec                B    U R                  U[        R                  X#US9$ r  )r  r  r  r  s        r   r  	Series.ne  '      8;;e ! 
 	
r   lec                B    U R                  U[        R                  X#US9$ r  )r  r  r  r  s        r   r  	Series.le  r  r   ltc                B    U R                  U[        R                  X#US9$ r  )r  r  r  r  s        r   r  	Series.lt  r  r   gec                B    U R                  U[        R                  X#US9$ r  )r  r  r  r  s        r   r  	Series.ge  r  r   gtc                B    U R                  U[        R                  X#US9$ r  )r  r  r  r  s        r   r  	Series.gt  r  r   addc                B    U R                  U[        R                  X#US9$ r  )r  r  r  r  s        r   r  
Series.add  '      8<<u$ ! 
 	
r   raddc                B    U R                  U[        R                  X#US9$ r  )r  rI   r  r  s        r   r  Series.radd  '      9>>D ! 
 	
r   subc                B    U R                  U[        R                  X#US9$ r  )r  r  r  r  s        r   r  
Series.sub  r  r   rsubc                B    U R                  U[        R                  X#US9$ r  )r  rI   r  r  s        r   r  Series.rsub  r  r   mulc                B    U R                  U[        R                  X#US9$ r  )r  r  r  r  s        r   r  
Series.mul  s)       8<<u$ ! 
 	
r   rmulc                B    U R                  U[        R                  X#US9$ r  )r  rI   r  r  s        r   r  Series.rmul  r  r   truedivc                B    U R                  U[        R                  X#US9$ r  )r  r  r  r  s        r   r  Series.truediv  s)      8##5d ! 
 	
r   rtruedivc                B    U R                  U[        R                  X#US9$ r  )r  rI   r  r  s        r   r  Series.rtruediv  s*      9%%UPT ! 
 	
r   floordivc                B    U R                  U[        R                  X#US9$ r  )r  r  r"  r  s        r   r"  Series.floordiv  s)      8$$Et ! 
 	
r   	rfloordivc                B    U R                  U[        R                  X#US9$ r  )r  rI   r%  r  s        r   r%  Series.rfloordiv  s*      9&&eQU ! 
 	
r   modc                B    U R                  U[        R                  X#US9$ r  )r  r  r(  r  s        r   r(  
Series.mod  r  r   rmodc                B    U R                  U[        R                  X#US9$ r  )r  rI   r+  r  s        r   r+  Series.rmod  r  r   powc                B    U R                  U[        R                  X#US9$ r  )r  r  r.  r  s        r   r.  
Series.pow  r  r   rpowc                B    U R                  U[        R                  X#US9$ r  )r  rI   r1  r  s        r   r1  Series.rpow  r  r   divmodc                .    U R                  U[        X#US9$ r  )r  r4  r  s        r   r4  Series.divmod  s#      6D ! 
 	
r   rdivmodc                B    U R                  U[        R                  X#US9$ r  )r  rI   r7  r  s        r   r7  Series.rdivmod	  s)      9$$Et ! 
 	
r   )r   ri  rz  filter_typec          	     ,   U R                   nUb  U R                  U5        [        U[        5      (       a  UR                  " U4SU0UD6$ U(       a9  U R
                  R                  S;  a  Sn	US;   a  Sn	[        SU SU	 SU S	35      eU" U4SU0UD6$ )
z
Perform a reduction operation.

If we have an ndarray as a value, then simply perform the operation,
otherwise delegate to the object.
ri  iufcbrz  )r  r  	bool_onlyzSeries.z does not allow =z with non-numeric dtypes.)r   r<  r   rL   _reducer   r  r   )
r   r<  r   r   ri  rz  r:  kwdsdelegatekwd_names
             r   r?  Series._reduce  s    $ <<!!$'h//##D@@4@@ 

w >)>)*HdV#3H:Q|n M/ /  h6v666r   r  )r{  )r   r=  ri  c          	         [         R                  " SUSS9  [        USSS9  U R                  [        R
                  SUUUSS9$ )	Nr  r  fnameri  Fnone_allowedr_  r   r   rz  ri  r:  )r  validate_logical_funcr(   r?  rG   nananyr   r   r=  ri  r  s        r   r  
Series.any;  sN     	  V59FH5A||MM"  
 	
r   r  c           	         [         R                  " SUSS9  [        USSS9  U R                  [        R
                  SUUUSS9$ )	Nr  r  rE  ri  FrG  r_  rI  )r  rJ  r(   r?  rG   nanallrL  s        r   r  
Series.allP  sN     	  V59FH5A||MM"  
 	
r   minc                2    [         R                  " XX#40 UD6$ r   )rU   rQ  r   r   ri  rz  r  s        r   rQ  
Series.minc       {{4vFvFFr   maxc                2    [         R                  " XX#40 UD6$ r   )rU   rV  rS  s        r   rV  
Series.maxm  rU  r   rA  c                4    [         R                  " XX#U40 UD6$ r   )rU   rA  r   r   ri  rz  	min_countr  s         r   rA  
Series.sumw  s     {{4vYQ&QQr   prodc                4    [         R                  " XX#U40 UD6$ r   )rU   r]  rZ  s         r   r]  Series.prod  s     ||DiR6RRr   meanc                2    [         R                  " XX#40 UD6$ r   )rU   r`  rS  s        r   r`  Series.mean       ||DGGGr   medianc                2    [         R                  " XX#40 UD6$ r   )rU   rd  rS  s        r   rd  Series.median  s     ~~d&I&IIr   semc                4    [         R                  " XX#U40 UD6$ r   )rU   rg  r   r   ri  r  rz  r  s         r   rg  
Series.sem       {{4v\LVLLr   varc                4    [         R                  " XX#U40 UD6$ r   )rU   rl  ri  s         r   rl  
Series.var  rk  r   stdc                4    [         R                  " XX#U40 UD6$ r   )rU   ro  ri  s         r   ro  
Series.std  rk  r   skewc                2    [         R                  " XX#40 UD6$ r   )rU   rr  rS  s        r   rr  Series.skew  rc  r   kurtc                2    [         R                  " XX#40 UD6$ r   )rU   ru  rS  s        r   ru  Series.kurt  rc  r   cumminc                8    [         R                  " XU/UQ70 UD6$ r   )rU   rx  r   r   ri  rb  r  s        r   rx  Series.cummin      ~~d&B4B6BBr   cummaxc                8    [         R                  " XU/UQ70 UD6$ r   )rU   r}  rz  s        r   r}  Series.cummax  r|  r   cumsumc                8    [         R                  " XU/UQ70 UD6$ r   )rU   r  rz  s        r   r  Series.cumsum  r|  r   cumprodc                8    [         R                  " XU/UQ70 UD6$ r   )rU   r  rz  s        r   r  Series.cumprod  s    t6CDCFCCr   )r  r   r   r   )r   Dtype | Noner   bool | Noner   bool | lib.NoDefaultreturnNone)NN)r   r   r   Index | Noner   zDtypeObj | None)r  zCallable[..., Series])r  zCallable[..., DataFrame])r  r_  )r  rx   )r  r   )r  r   r  r  )r  zBlockValuesRefs | None)r  rL   )C)r'  r   r  rr   )r  intr   )r   r  r  r   )r   znpt.DTypeLike | Noner   r  r  r   )r@  
str | Noner  r   )r  zlist[Index])r   )rK  r  r   rt   r  r   )rP  rZ  r   rt   r  r   )rb  r   )rt  znpt.NDArray[np.bool_]r  r   )F)r  r_  )r  r  )T)r   r_  r  r  )r  r_  r  r  )FTF)r  r_  r  r_  r   r_  r  r  )r  zint | Sequence[int]r   r  r  r   ).)r  r}   r  Literal[False]r   r~   r   r  r  r_  r  r   )r  r}   r  Literal[True]r   r~   r   r  r  r_  r  r   )r  r}   r  r_  r   r~   r   r  r  r_  r  r  )r  IndexLabel | Noner  r_  r   r~   r   r_  r  r_  r  zDataFrame | Series | None)r  r   )
..........)r  r  r  r   r  r  r  r_  r   r_  r  r_  r  
int | Noner   r  r  r   )	.........)r  zFilePath | WriteBuffer[str]r  r   r  r  r  r_  r   r_  r  r_  r  r  r   r  r  r  )
NNaNNTTFFFNN)r  z"FilePath | WriteBuffer[str] | Noner  r   r  r  r  r_  r   r_  r  r_  r   r_  r   r_  r  r  r   r  r  r  )NwtTN)
r  IO[str] | Noner  r   r   r_  r  zStorageOptions | Noner  r  )r  zIterable[tuple[Hashable, Any]])r  r[   )r  z'type[MutableMappingT] | MutableMappingTr  r   )r  z
type[dict]r  r:  )r   r   r  r   )FN)r   r_  r   r  r  r   )r   rs   r  r  r6  r_  r7  r_  r8  r_  r9  r  r:  r_  r  r   )r:  r_  r  r   )r  rr   )rK  rv   r   r  rL  r_  r  r   )rK  rv   r   r  rL  r_  r  r  )rK  rv   r   r_  rL  r_  r  Series | None)rS  )rK  rv   r  r   )r   T)r   rs   ri  r_  r  r   )rk  r  r  r   )..)rr  r  rs  r   r  r  )rr  zSequence[float] | AnyArrayLikers  r   r  r   )rr  z&float | Sequence[float] | AnyArrayLikers  r   r  zfloat | Series)g      ?linear)r  N)r  r   r4  ru   r  r  r  r  )Nr   )r  r   r  r  r  r  r  r  )r   )r  r  r  r   )r  r  r  r  )r  rq   r  zSeries | np.ndarray)r  N)r  z$NumpyValueArrayLike | ExtensionArrayr  zLiteral['left', 'right']r  zNumpySorter | Noner  znpt.NDArray[np.intp] | np.intp)FF)rL  r_  r  r_  )r   FFr  )r  r   r  rs   r  r_  r  r_  r  r   r  DataFrame | Series)r  zSeries | Hashabler  z(Callable[[Hashable, Hashable], Hashable]r  Hashable | Noner  r   )r  r   )r  zSeries | Sequence | Mappingr  r  )r   rs   r  bool | Sequence[bool]r   r  r  r   r  r   rL  r_  rb  r   r  r   )r   rs   r  r  r   r  r  r   r  r   rL  r_  rb  r   r  r  )r   rs   r  r  r   r_  r  r   r  r   rL  r_  rb  r   r  r  )r   rs   r  r  r   r_  r  r   r  r   rL  r_  rb  zValueKeyFunc | Noner  r  )r   rs   r  r}   r  r  r   r  r  r   r  r   r  r_  rL  r_  rb  r|   r  r  )r   rs   r  r}   r  r  r   r  r  r   r  r   r  r_  rL  r_  rb  r|   r  r   )r   rs   r  r}   r  r  r   r_  r  r   r  r   r  r_  rL  r_  rb  r|   r  r  )r   rs   r  r  r  r  r   r_  r  r   r  r   r  r_  rL  r_  rb  zIndexKeyFunc | Noner  r  )r   r  NN)
r   rs   r  r   r'  r  r  r  r  r   )   rS  )r  r  rK  zLiteral['first', 'last', 'all']r  r   )r  N)rK  r~   r  r~   r   r  r  r   )r'  zSequence[Level]r  r   )rL  r_  r  r   )r  NT)r  r}   r  r  r7  r_  r  r   )r1  zCallable | Mapping | Seriesr.  zLiteral['ignore'] | Noner  r   )r  r   )Nr   )r   rs   )r  ro   r   rs   r  r  )
r  ro   rC  r  rb  ztuple[Any, ...]rA  zLiteral[False, 'compat']r  r  )ru  r  rt  znpt.NDArray[np.intp] | Noner   r  r  r   )r   Renamer | Hashable | Noner   Axis | Noner   r_  r   r  r  Level | Noner   r{   r  r  )r   r  r   r  r   r_  r   r  r  r  r   r{   r  r   )r   r  r   r  r   r_  r   r_  r  r  r   r{   r  r  )r   r  r   r  r   r  r   r_  r  r  r   r{   r  r  )r   rs   r   r  r  r   )r   r  r4  zReindexMethod | Noner   r  r  r  r  zScalar | Noner`  r  r  r   )
rf  IndexLabel | lib.NoDefaultr   rs   r   r_  r   r  r  r  )
rf  r  r   rs   r   r_  r   r  r  r   )
rf  r  r   rs   r   r_  r   r_  r  zSelf | None)r^  r}   r   rs   r   r}   r  r}   r  r  r   r  r   r{   r  r  )r^  r}   r   rs   r   r}   r  r}   r  r  r   r  r   r{   r  r   )r^  r}   r   rs   r   r}   r  r}   r  r  r   r_  r   r{   r  r  )r^  r  r   rs   r   r  r  r  r  r  r   r_  r   r{   r  r  )r  r   r  r   )NNNNT)rw  r  r  r  rv  r  rz  zbool | str | Nonerx  r_  r  r  )r4  r   r   r_  )TF)r   r_  r   r_  r  r  )r  )r  z+Literal['both', 'neither', 'left', 'right']r  r   )r  zlist[tuple[ArrayLike | Callable[[Series], Series | np.ndarray | Sequence[bool]], ArrayLike | Scalar | Callable[[Series], Series | np.ndarray]],]r  r   )
r   rs   r   r  r  AnyAll | NonerL  r_  r  r   )
r   rs   r   r  r  r  rL  r_  r  r  )
r   rs   r   r_  r  r  rL  r_  r  r  )NstartN)r  zFrequency | Noner  z!Literal['s', 'e', 'start', 'end']r   r  r  r   )r  r  r   r  r  r   )r  r_  )r  r   r  r   )rd  z'ArrayLike | tuple[ArrayLike, ArrayLike]r   r   r  zSeries | tuple[Series, Series])NNr   )r  r  r  zfloat | Noner   rs   r  r   )r   rs   r  r   )r   r   r   rs   ri  r_  rz  r_  )r   rs   r=  r_  ri  r_  r  r_  )r   FT)r   TF)r   r  ri  r_  rz  r_  )NTFr   )r   r  ri  r_  rz  r_  r[  r  )NTr   F)r   r  ri  r_  r  r  rz  r_  )NT)r   r  ri  r_  )r   
__module____qualname____firstlineno____doc___typr[   rL   r   r   _HANDLED_TYPES__annotations__r   rU   _internal_names_set
_accessorsrD   r  _hidden_attrs	frozenset__pandas_priority__propertyhasnansfgetr   r   r   r   r   r  r  r
  r  r   r  r   setterr   r   r   r"   rR   r(  r.  r2  r=  rE  r   r  	__float__r  __int__r   rL  rR  re  ra  r\  r`  rY  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r%   _shared_doc_kwargsrf   r   r  r  r   r  r$   r:  r  r1  r3  rB  r  r   rO  r   rc  rh  rm  rt  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r"  r&  r*  r/  r5  _agg_see_also_doc_agg_examples_docr7  r;  r>  rD  rJ  rM  rQ  r#   r]  r   rg  r  r  rk   rm   r{  r  rz  r  r  r  r?   r  rA   r  r:  r  r  r  r   	_AXIS_LENr  r  r   AxisPropertyr   rJ   ri   r   rY   r   rO   r   pandasplottingPlotAccessorr  rP   r   rN   r  rM   r   hist_serieshistr  r  r  r  r  r  r  rH   make_flex_docr  r  r  r  r  r  r  r  r  subtractr  r  multiplyr  r  divdivider  rdivr"  r%  r(  r+  r.  r1  r4  r7  r?  rV   r  r  rQ  rV  rA  r]  r`  rd  rg  rl  ro  rr  ru  kurtosisproductrx  r}  r  r  __static_attributes____classcell__)r  s   @r   r   r     s&'   _B D^RZZ8NO#9Iy$"F+g.I.II/J((7+@+@@9R=P  
 ""''&&..G
  " ),X 	X X 'X 
Xv SW11$01@O1j  &  / & & 
 
   / /b 
[[1 1 '+ '+R + +B % % d  &&../(  0(" "H69 69v GK9)98C9	9z KO 
 
$ u%IS!G
   & &:#x'R*(Y'" '"Rj4X9 98 8@4 4$ $% %< : :3	? 	? QV

37
IM
	
 
F8
 8
t   	  #"%!$		 		
 	  	 	 
	 	   	
 "%!$		 		
 	  	 	 
	 	   	 !$		 		
 	 	 	 
	 	 $(U nn!&U U 	U
 U U U 
#Ut-  #&""  !	
      
   #&""(  !	
      
 " 37#'##R/R R !	R
 R R R R R R R 
Rh 	 )$%67!
B #15'
'
 '
 	'

 /'
 
'
?>'
V1@" >	 
 ,/  
 $VH9 !)()( 
	)()(V ), &8R @D!1<	& PR	
Tj l9%(::; #'),
 
 !	

 
 
 
 '
 
 

 <kTl
F9*:, :,x?  ? B  "%    	
  
  "%TW0=MQ	 
 "%sQT04JN	  !"_ _ 	_
 _ 
_ _BN> N>`Q QfR Rh$
 $
L EH-B	 
  03) - 
	   58/21 - 
	  58/7>"1>" ->" 
	>"F %."&	V
V
 "V
  	V

 
V
v #'	.
.
  .
 	.

 
.
` 	)+
	0b'
c0b'
R+8 +8ZL@\- 				(	(9
 *0%)	V3V 'V #	V
 
(V :V OT
'+
GK
" 	Y;=	
| !)AAJ   !2

 
 	

 
 
 

 
EAD
( '+	gY gY 7gY $	gY
 
gYRCCJ^$F  +."%"%   )	
        
   +."%   )	
       
   +."%   )	
       
   +/$"("#'G G )	G
 G G  G G !G 
GR  +."%"   	
 )        
   +."%"%"   	
 )         
   +."%"   	
 )        
 $ #'+/$"(#"#'O
 O
 !	O

 )O
 O
 O
  O
 O
 O
 !O
 
O
 O
f $G8G8 G8 	G8
 G8 
G8T CJbFbF ?bF	bFJ CJaGaG ?aG	aGF 	 )S
  24
%GR AE %2=	QGP4+ZBR BRL &*	3636 $36 	36
 
36v /3S
(S
 ,S
 
	S
j  	 	, 	[! )'""

 C[! )' /0'+	
  /2nn "	G ,4GG ,G 	G )G 
GRJJ -J 	J
 
J,  ,/
  !!
(
 	

 
 
 
 
 

 
  ,/
  "%!!
(
 	

 
  
 
 
 

 
  ,/
  !!
(
 	

 
 
 
 
 

 
 ,0hE ! "&hE(hE 	hE
 hE hE hE hE 
hE hET 	$  )*+<= g&&'
  > 	>
 > 
> > (%4> 	 )+,>? 
 !'+ "$( 
 	

 %
 
 
 "
 
 

 


,  .1	 	*	
 	 	 	 
	 	  .1	 "%	*	
 	 	  	 
	 	  .1	 	*	
 	 	 	 
	 	 			 .1^^
 nn
*

 
 
 
 

 
 
"  ! !!! 	
      
   ! !!"%! 	
       
   ! !!! 	
      
  %)i
 #'%)"%i
!i
 	i

 !i
 #i
 i
 i
 i
 
i
 i
V& &6 	-,-  $"#*. 

 
 	

 (
 
 

 .
 ,4 4lL
d BH	[ ?	[
 
[zq
q 
qh 	/89" :" 	/89  :  	09: ; 	09:! ;!  "%     	
   
       	
   
  !"] ] 	]
 ] ] 
]H "&18 	FF /F 	F
 
FP2 2l 8?iL3?L!I$%z%(/O%/##&)E\ 
.C	<	=B
 3
4C&&//">">?DHn5FHn5F&,/D ??&&D
AAA >! !B$=$EM$	'$L 04ST # #. ch/0 ##'	
 	
 !		

 	
 
	
 1	
 ch/0
 1

 ch/0
 1

 ch/0
 1

 ch/0
 1

 ch/0
 1

 cx01
 
 2

 c12
 
 3

 cx01
 
 2

 Hc12
 
 3

 cx01 ##'	
 	
 !		

 	
 
	
 2	
 Hc12
 
 3

 c	845
 
 6

 CFc
H56
 
 7

 Dc
H56
 
 7

 cX67
 
 8

 cx01
 
 2

 c12
 
 3

 cx01
 
 2

 c12
 
 3

 c(34
 
 5

 c	845
 
 6
 "'7 	'7 '7 '7 '7R hu1%&
 
 
 	

 
 

 '
& hu1%& 	

 
 	
 

 '
$ 	%a	 ! "	GG G 	G "G 	%a	 ! "	GG G 	G "G 	%a	 ! !"RR R 	R
 R "R 	&q	!" !"SS S 	S
 S #S 	&q	!" "	HH H 	H #H 	(	#$ "	JJ J 	J %J 	%a	 ! !"MM M 	M
 M "M 	%a	 ! !"MM M 	M
 M "M 	%a	 ! !"MM M 	M
 M "M 	&q	!" "	HH H 	H #H 	&q	!" "	HH H 	H #H HG(	#$C C %C 	(	#$C C %C 	(	#$C C %C 	)Q	 D D !Dr   )r  
__future__r   collections.abcr   r   r   r   r  r  textwrapr   typingr	   r
   r   r   r   r   r   r   r  numpyr   pandas._configr   r   pandas._config.configr   pandas._libsr   r   r   pandas._libs.libr   pandas.compatr   pandas.compat._constantsr   pandas.compat._optionalr   pandas.compat.numpyr   r  pandas.errorsr   r   r   r   r   r    r!   pandas.util._decoratorsr"   r#   r$   r%   pandas.util._exceptionsr&   pandas.util._validatorsr'   r(   r)   pandas.core.dtypes.astyper*   pandas.core.dtypes.castr+   r,   r-   r.   r/   r0   pandas.core.dtypes.commonr1   r2   r3   r4   r5   r6   r7   r8   pandas.core.dtypes.dtypesr9   r:   r;   pandas.core.dtypes.genericr<   r=   pandas.core.dtypes.inferencer>   pandas.core.dtypes.missingr?   r@   rA   rB   pandas.corerC   rD   rE   r   rF   rG   rH   rI   pandas.core.accessorrJ   pandas.core.applyrK   pandas.core.arraysrL   pandas.core.arrays.arrowrM   rN   pandas.core.arrays.categoricalrO   pandas.core.arrays.sparserP   pandas.core.arrays.string_rQ   pandas.core.constructionrR   r  rS   rT   pandas.core.genericrU   rV   pandas.core.indexersrW   rX   pandas.core.indexes.accessorsrY   pandas.core.indexes.apirZ   r[   r\   r]   r^   r_   pandas.core.indexes.basecoreindexesr   pandas.core.indexes.multir`   pandas.core.indexingra   rb   pandas.core.internalsrc   rd   pandas.core.methodsre   pandas.core.shared_docsrf   pandas.core.sortingrg   rh   pandas.core.strings.accessorri   pandas.core.tools.datetimesrj   pandas.io.formats.formatioformatsformatr  pandas.io.formats.infork   rl   rm   pandas.plottingr  pandas._libs.internalsrn   pandas._typingro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r   r;  r   __all__r  r   r  r   r  r   r   <module>r     s   #   
       . 
 .  . > .    5  5 	 	 	 
 5    0 ) - ? 4 2 
 I  ) ( 6 ( 0 7 3 & & 
 6! ! ! ! ! ! ! ! !F ,9* 'FA (<`cDT `cDr   