Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/site-packages/pandas/core/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/site-packages/pandas/core/__pycache__/series.cpython-312.pyc

�

MٜgP@�
�~�dZddlmZddlmZmZmZmZddlZddl	Z	ddl
mZddlm
Z
mZmZmZmZmZmZddlZddlZddlZddlmZmZddlmZdd	lmZmZm Z dd
l!m"Z"ddl#m$Z$ddl%m&Z&dd
l'm(Z(ddl)m*Z+ddl,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3ddl4m5Z5m6Z6m7Z7m8Z8ddl9m:Z:ddl;m<Z<m=Z=m>Z>ddl?m@Z@ddlAmBZBmCZCmDZDmEZEmFZFmGZGddlHmIZImJZJmKZKmLZLmMZMmNZNmOZOmPZPddlQmRZRmSZSmTZTddlUmVZVmWZWddlXmYZYddlZm[Z[m\Z\m]Z]m^Z^ddl_m`Z`maZambZcmdZdmeZemfZfmgZgddlhmiZiddljmkZkddllmmZmddlnmoZompZpddlqmrZrdd lsmtZtdd!lumvZvdd"lwmxZymzZzm{Z{dd#l|m}Z}m~Z~dd$lm�Z�m�Z�dd%l�m�Z�dd&l�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�ddl�m�cm�cmaZ�dd'l�m�Z�dd(l�m�Z�m�Z�dd)l�m�Z�m�Z�dd*l�m�Z�dd+l�m�Z�dd,l�m�Z�m�Z�dd-l�m�Z�dd.l�m�Z�ddl�m�cm�cm�Z�dd/l�m�Z�m�Z�m�Z�ddl�Z�erVdd0l�m�Z�dd1l�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�dd2l�m�Z�dd3l�m�Z�d4gZ�d5d4d6d7d8d9d4d:d;d<�	Z�d=�Z�Gd>�d4ea�j�e}�Z�y)?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�<���fd�}d�j�d�|_|S)z.
    Install the scalar coercion methods.
    c����t|�dk(rTtjd�j�d�j�d�tt����|jd�Std�����)N�zCalling zX on a single element Series is deprecated and will raise a TypeError in the future. Use z(ser.iloc[0]) instead��
stacklevelrzcannot convert the series to )�len�warnings�warn�__name__�
FutureWarningr&�iloc�	TypeError)�self�	converters ��=/usr/local/lib/python3.12/site-packages/pandas/core/series.py�wrapperz_coerce_method.<locals>.wrapper�su����t�9��>��M�M��9�-�-�.�/� �)�)�*�*?�A��+�-�
��T�Y�Y�q�\�*�*��7�	�{�C�D�D��__)r�)r�r�s` r��_coerce_methodr��s(���

E��I�.�.�/�r�2�G���Nr�c��#��eZdZUdZdZeeejfZ	de
d<dgZde
d<ddhejzZ
hd	�Zej j"ej"zeg�zZd
Zeej j*j,ej j*j��Zde
d
<dddddej0f							�dEd�Z	�dF					�dGd�Ze�dHd��Zd�Ze�dId��Zd�Ze�dJd��Ze�dKd��Z e�dKd��Z!e�dLd��Z"e"jF�dMd��Z"ed��Z$ed��Z%e�dNd��Z&e'ej jPj�e�dOd���Z(�dP�dQd�Z)�dRd �Z*�dS�dTd!�Z+	�dF					�dUd"�Z,dd#��dVd$�Z-e.e/�Z0e.e1�Z2e�dWd%��Z3�dX�dYd(�Z4�dX�dZd)�Z5d*�Z6d+�Z7�d[d,�Z8�d\d-�Z9�d]�d^d/�Z:�d_d0�Z;�d`�dad2�Z<�d`�dad3�Z=�d`�dad4�Z>�d`�dad5�Z?�d]�dbd6�Z@e�dJd7��ZAd8�ZB�d_d9�ZC�d_d:�ZD�d_d;�ZE�dJ�fd<�ZF	�dc							�dd�fd=�
ZG�dS�ded>�ZHeI	�dfd?d?d?d?d@�											�dgdB��ZJeI	�dfd?d?d?dC�											�dhdD��ZJeI	�dfd?d?d?dE�											�didF��ZJ	�dSd.ej0d.d.d@�											�djdG�ZJ�dkdH�ZKeI										�dl																	�dmdI��ZLeI									�dn																	�dodJ��ZL										�dp																					�dqdK�ZLeMeNdLeOdMePdN��O�				�dr									�dsdP��ZQ�dtdQ�ZR�dudR�ZSeI				�dvdS��ZTeId?dT��dwdU��ZTeUdVdWgdX�Y�eVf			�dvdZ��ZTej0f�dxd[�ZW	�dy					�dzd\�ZXe'ePd]��e'eOd^eNz�dd&dd1d1d1ej0d1f															�d{d_���ZY�dRd`�ZZ�d`�d|da�Z[�d}�fdb�Z\eId?d?d?dc�							�d~dd��Z]eId?d?de�							�ddf��Z]eId?d?d?dc�							�d�dg��Z]dhd.d.dc�							�d��fdi�Z]�d��d�dj�Z^�d��d�dk�Z_�d��d�dl�Z`�dX�d�dm�ZaeI	�d�					�d�dn��ZbeI	�df					�d�do��ZbeI		�d�					�d�dp��Zb		�d�					�d�dq�Zb		�d�							�d�dr�Zc		�d�							�d�dt�ZdeMddudAePdv��w��d��d�dx��Ze�d��d�dy�Zf�d�dz�Zgd{�Zhd|�ZieMej j�d�}�		�d�							�d�d~��Zj	�d�			�d�d�ZkeMeOd�ePd��eNdL�}�				�d�											�d��fd��
�Zl	�dS							�d�d��Zm�d�d��Zn�d�d��ZoeId?d?d?d?d?d?d?d��															�d�d���ZpeId?d?d?d?d?d?d��															�d�d���ZpeId?d?d?d?d?d?d?d��															�d�d���Zpd&d1d.d�d�d.dd��															�d�d��ZpeId?d?d?d?d?d?d?d?d��																			�d�d���ZqeId?d?d?d?d?d?d?d?d?d��																				�d�d���ZqeId?d?d?d?d?d?d?d?d?d��																				�d�d���Zqd&dd1d.d�d�d1d.dd��																				�d��fd��Zq				�d�									�d�d��Zr	�d�					�d�d��Zs	�d�					�d�d��ZteMeNdLePd��ePd�����	�d�							�d�d���Zu�d�d��Zv�d]�d�d��Zw			�d�							�d�d��Zx	�dS					�d�d��Zy�dS�d�d��ZzePd��Z{ePd��Z|eMeOd�eNdLeNd'e{e|����d��d�d���Z}e}Z~eMeOd�eNdLeNd'���	�dX					�d�d���Zej0d�fd�d��									�d�d��Z�								�d�d��Z��dJd��Z�eI	�dfd?d?d?d?d��													�d�d���Z�eI	�dfd?d?d?d?d?d��													�d�d���Z�eI	�dfd?d?d?d?d?d��													�d�d���Z�	�dSddd.dd�d��													�d��fd��Z�e'd��e�eNdLeNd�dududu���e'e�j
j�d&dd��					�d��fd�����Z�eMe�jeNdLeNd����	�dSdddddddd��													�d��fd���Z�eI	�dfd?d?d?d��									�d�d���Z�eI	�dfd?d?d?d?d��									�d�d���Z�eI	�dfd?d?d?d?d��									�d�d„�Z�eMe�j�ej0fej0d&d1d.d��									�d��fdÄ�Z�eI	�dfd?d?d?d?d?dĜ															�d�dń�Z�eI	�dfd?d?d?d?d?d?dƜ															�d�dDŽ�Z�eI	�dfd?d?d?d?d?d?dƜ															�d�dȄ�Z�	�dSd&dddd.d�dƜ															�d��fdʄZ��dˆfd˄Z�eMe�fie���					�d�											�d�d̄�Z��d�d̈́Z��dƐd�d΄Z��d�dτZ�	�d�			�d�dЄZ�				�d�dфZ�eMe�j$eNdL�}��d�d҄�Z�eMe�j$eNdL�}��d��fdӄ�Z�eMe�j(eNdL�}��d��fdԄ�Z�eMe�j(eNdL�}��d��fdՄ�Z�eId?d?d?d?d֜									�d�dׄ�Z�eId?d?d?d؜									�d�dل�Z�d&d.dd.d֜									�d�dڄZ�			�d�							�d�dۄZ��dF�d�d܄Z�dgZ�d�e
d�<e�e��Z�d&Z�d�e
d�<dZ�d�e
d�<e��j>d&d��Z�e�de��Z�e�d�e��Z�e�d�e��Z�e�d�e��jR�jT�Z�e�d�e��Z�e�d�e��Z�e�d�e��Z�e��jR�jdZ�d�Z�d�Z�d�Z��d]�d�d�Z��dF�d�d�Z�						�d�d�Z�ddd&d��d�d�Z�e'e��jxd�d��			�d�							�d�d��Z�e'e��jxd�d���dԐd�d���Z�e'e��jxd�d���dԐd�d���Z�e'e��jxd�d���dԐd�d���Z�e'e��jxd�d���dԐd�d���Z�e'e��jxd�d���dԐd�d���Z�e'e��jxd�d���dԐd֐d��Z�e'e��jx�dd���dԐd֐d��Z�e'e��jx�dd���dԐd֐d��Z�e�Z�e'e��jx�dd���dԐd֐d��Z�e'e��jx�dd��			�d�							�dՐd��Z�e�Z�e'e��jx�d	d���dԐd֐d
��Z�e'e��jx�dd���dԐd֐d��Z�e�Z�e�Z�e'e��jx�d
d���dԐd֐d��Z�e�Z�e'e��jx�dd���dԐd֐d��Z�e'e��jx�dd���dԐd֐d��Z�e'e��jx�dd���dԐd֐d��Z�e'e��jx�dd���dԐd֐d��Z�e'e��jx�dd���dԐd֐d��Z�e'e��jx�dd���dԐd֐d��Z�e'e��jx�dd���dԐd֐d��Z�e'e��jx�dd���dԐd֐d��Z�d&d1d.d�d�							�dאd �Z�e'eِd!ds��"��d&d.d1�d#�							�dؐd$��Z�e'eِd%ds��"��			�d�							�dؐd&��Z�eMeِd'ds��"��			�d�					�dېd(��Z�eMeِd)ds��"��			�d�					�dېd*��Z�eMeِd+ds��"��				�d�							�dݐd,��Z�eMeِd-ds��"��				�d�							�dݐd.��Z�eMeِd/ds��"��			�d�					�dېd0��Z�eMeِd1ds��"��			�d�					�dېd2��Z�eMeِd3ds��"��				�d�							�dߐd4��Z�eMeِd5ds��"��				�d�							�dߐd6��Z�eMeِd7ds��"��				�d�							�dߐd8��Z�eMeِd9ds��"��			�d�					�dېd:��Z�eMeِd;ds��"��			�d�					�dېd<��Z�e�Z�e�Z�eMeِd=ds��"���d�d�d>��Z�eMeِd?ds��"���d�d�d@��Z�eMeِdAds��"���d�d�dB��Z�eMeِdCds���d�d�dD��Z�xZ�S(�r�a4
    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�&�|tjur%tjdtt���nd}d}t
|ttf�r�|��|��|dus|��|sItjdt|�j�dt|�j�d�td��t�r|jd��}tj||�|rtj!|d	|�y||_yt
|t$t&t(f�}t+|d
d�}	|}
t
|t(t,j.f�r?|dur;t�r1|�t1|j2t5|��r|j�}|�d}|�rt
|ttf�sGt7dd�
�}|dk(rtj8||�}n|dk(rtj8||�}d}nt�r|s|jd��}|sItjdt|�j�dt|�j�d�td��|r|j�}tj!|d	|�tj||�yt
|t�rit�r_|s]|jd��}|sItjdt|�j�dt|�j�d�td��t;j<||t|��}|�t?|�}|�|jA|�}|�5|�|n
tCd�}tE|�s|�tGt5|�d��}ng}t
|tH�rtKd��d}t
|t&�rV|�|jM|d��}t�r|jN}|jP}n|jPj�}d}�n�t
|t,j.�r!tE|j2��r�tSd��t
|t$�rO|�*|jT}|jVjd��}�n@|jY||��}d}|jV}�nt
|tZ�r|j]|||�\}}d}d}n�t
|ttf�r�|�
|jT}n(|jTj_|�r|rtad��|s�tjdt|�j�dt|�j�d�td��d}nWt
|t(�rnFtcjd|�}tg|�r&tE|�s|�t-j2t�}|�#tg|�s|g}tCtE|��}n!tg|�rtcjh||�t
|ttf�r*|�|jM|d|��}ng|re|j�}nTtk||||�}t7dd�
�}|dk(rtj8|||��}n|dk(rtj8||�}tj||�||_|jmd|�|
�L|rI|	t,jnk(r5|j2|	k7r%tjdtpt���yyyyy)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��dtypezmode.data_managerT)�silent�blockrRr��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�)�refsz�Dtype 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&�
isinstancerdrc�typer�rr�rU�__init__�object�__setattr__r�r�r[rL�getattr�np�ndarrayr*r�r7r�
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�zSeries.__init__�sZ���3�>�>�)��M�M�2�"�+�-�	
��H��	��t�0�2D�E�F��
��
����$�,���
�
� ��d��!4�!4� 5�T�$�t�*�:M�:M�9N�O/�/�'� ��#�$��y�y�e�y�,�����T�4�(���"�"�4��$�7�
�!��	��%�d�V�U�N�,K�L���T�7�D�1�
����d�^�R�Z�Z�8�9��5� �%8�%:��=�N�4�:�:�|�E�?R�$S��9�9�;�D��<��D���d�%7�9K�$L�M�%�&9�$�G���g�%�-�8�8��u�E�D���'�-�8�8��u�E�D� �	�$�&�t��y�y�e�y�,����
�
� ��d��!4�!4� 5�T�$�t�*�:M�:M�9N�O/�/�'� ����y�y�{�����t�W�d�3����T�4�(���d�.�/�4G�4I�RV��9�9�%�9�(�D���
�
� ��d��!4�!4� 5�T�$�t�*�:M�:M�9N�O/�/�'� ���'�'��d�D��J�?���� ��'�E����(�(��/�E��<�"�.�E�M�!�4D�E��5�z�U�.�)�,�u�*=�e�L�����d�J�'�%�J��
����d�E�"�� ��{�{�5�u�{�5��"�$��'�'���|�|���|�|�(�(�*���D�
��b�j�j�
)��4�:�:��!�>�����f�
%��}��
�
���y�y�~�~�5�~�1���|�|�E��|�5�����y�y��
��g�
&��/�/�$��u�=�K�D�%��E��D�
��1�3E�F�
G��}��
�
���Z�Z�&�&�u�-��%�>�����
�
� ��d��!4�!4� 5�T�$�t�*�:M�:M�9N�O/�/�'� ��!�	�
��n�
-���-�-�d�3�D��D�!�#�d�)��
�����(���=���%��v��!�#�d�)�,�E�
�$�
��$�$�T�5�1��d�/�1C�D�E�� ��{�{��x�d�{�K����y�y�{��!�$��u�d�;�D�!�"5�d�C�G��'�!�)�4�4�T�5�t�L���G�#�)�4�4�T�5�A������t�$���	����q�%� ��!�&6�:����;S��z�z�Z�'��
�
�R�"�/�1�
�(�<T�&6�!r�c�V�|r3t|j��}t|j��}n8|�)t	|�s|�tt
|�d��}ng}|}n
td�g}}t|||��}|r|�|j|d��}|j|jfS)aM
        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@r7r^r�r�r�r�)r�r�r�r�r�r��ss       r�r�zSeries._init_dict_s���2�
�����%�D��$�+�+�-�(�F�
�
��5�z�U�.�+�L��,?��N�����D�(��+�R�&�D�
�6��U�3���E�%��	�	�%�e�	�,�A��v�v�q�w�w��r�c��tS�N)r��r�s r��_constructorzSeries._constructor�s���
r�c��tj||��}d|_t|�tur|S|j	|�S�N�r�)r��	_from_mgrr�r�r�)r��mgrr��sers    r��_constructor_from_mgrzSeries._constructor_from_mgr�sD�����s���.����	���:����J�� � ��%�%r�c��ddlm}|S)z}
        Used when a manipulation result has one higher dimension as the
        original, such as Series.to_frame()
        rr�)�pandas.core.framer�)r�r�s  r��_constructor_expanddimzSeries._constructor_expanddim�s
��	0��r�c��ddlm}|j||j��}t	|�t
ur|S|j
|�S)Nrr�r�)rr�r�r�r�r�r)r�r�r�r��dfs     r��_constructor_expanddim_from_mgrz&Series._constructor_expanddim_from_mgr�sC��/�
 �Y�
 �
 ��3�8�8�
4����:����I��*�*�2�.�.r�c�.�|jjSr�)r��_can_hold_nar�s r�rzSeries._can_hold_na�s���y�y�%�%�%r�c�.�|jjS)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�zSeries.dtype�s���y�y���r�c��|jS)z�
        Return the dtype object of the underlying data.

        Examples
        --------
        >>> s = pd.Series([1, 2, 3])
        >>> s.dtypes
        dtype('int64')
        �r�r�s r��dtypesz
Series.dtypes�s���z�z�r�c��|jS)aN
        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�zSeries.name�s��`�z�z�r�c�x�t|t|�j�d���tj	|d|�y)Nz.name)�
error_namer�)r8r�r�r�r�)r��values  r�r�zSeries.names0���e�4��:�3F�3F�2G�u�0M�N����4��%�0r�c�6�|jj�S)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�z
Series.valuess��P�y�y�(�(�*�*r�c�6�|jj�S)aT
        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�zSeries._values?s��@�y�y�(�(�*�*r�c�x�t|jt�ry|jjjSr�)r�r�rc�_blockr�r�s r�r�zSeries._referencesas*���d�i�i�!3�4���y�y���$�$�$r�c�6�|jj�Sr�)r��array_valuesr�s r�rRzSeries.arrayhs���y�y�%�%�'�'r�r�c���tjdtd��|jj	|��}t|tj�rt�rd|j_
|S)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])
        z�Series.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�rzSeries.ravelns[��0	�
�
�
�
��	
��l�l� � �u� �-���c�2�:�:�&�+>�+@�"'�C�I�I���
r�c�,�t|j�S)z2
        Return the length of the Series.
        )r�r�r�s r��__len__zSeries.__len__�s���4�9�9�~�r�c��tjdtd��|jj	|�}|j||jd��}t|jt�rL|jj}td|j�|_
|jj|�|j|d��S)	aP
        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�rRr!r�r�r�r�rdrrr�r��
add_reference�__finalize__)r�r��
res_values�res_ser�blks     r�r!zSeries.view�s���P	�
�
�
D���		
��Z�Z�_�_�U�+�
��#�#�J�d�j�j�u�#�M���g�l�l�$6�7��,�,�%�%�C��-�t�/?�/?�@�C�H��H�H�"�"�3�'��#�#�D��#�8�8r�c���|j}tj||��}t�rAt	|j
|j
�r!|j
�}d|j_|S)aI
        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��asarrayrr*r�r!rr)r�r�r�r�rs     r��	__array__zSeries.__array__�sQ��h�����j�j��u�-��� �^�F�L�L�#�)�)�%L��(�(�*�C�"'�C�I�I���
r���api_versionc�R�td�}|jj||��S)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-r/s   r��__column_consortium_standard__z%Series.__column_consortium_standard__s4�� :�:P�Q�� �0�0�U�U��+�
V�
�	
r�c��|jgS)z7
        Return a list of the row axis labels.
        �r�r�s r�r�zSeries.axes's��
�
�
�|�r�rr�c� �|j|S)z�
        Return the i-th value or values in the Series by location.

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

        Returns
        -------
        scalar
        )r�)r��ir�s   r��_ixszSeries._ixs1s���|�|�A��r�c��|jj||��}|j||j��}|j|_|j|�S)N)r�r�)r��	get_slicer�r�r�r%)r��slobjr�r��outs     r��_slicez
Series._slice?sR���i�i�!�!�%�d�!�3���(�(��3�8�8�(�<���J�J��	�����%�%r�c��t|�tj||�}|tur(t	�s
t�r|j
d��S|St|�}t|ttf�rt|�}t|�rI|jjr3tj dt"t%���|j&|S|r|j)|�St+|�rt|�}t-|�r$t|t.�s	|j)|�}|St|t.�r|j;|�Stj<|�rBt?|j|�}tAjB|tD��}|jG|�S|jI|�S#t0t2t4f$r@t|t�r-t|jt6�r|j9|�cYSY��wxYw)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	)%rbr��apply_if_callable�Ellipsisrrr�r6r�r�r�rXr2r��_should_fallback_to_positionalr�r�r�r&r��
_get_valuer3r>�slice�KeyErrorr�rr\�_get_values_tuple�_getitem_slice�is_bool_indexerrar�r*�bool�_get_rows_with_mask�	_get_with)r��key�
key_is_scalar�results    r��__getitem__zSeries.__getitem__Gs���"�3�'��#�#�C��.���(�?�"�$�(:�(<��y�y�e�y�,�,��K�!�#��
��c�D�%�=�)���$�C��c�?�t�z�z�H�H��M�M�;��+�-�
��<�<��$�$�
��?�?�3�'�'��s���s�)�C��s��J�s�E�$:�
7�����-���
��c�5�!��&�&�s�+�+����s�#�$�T�Z�Z��5�C��*�*�S��-�C��+�+�C�0�0��~�~�c�"�"��#�i�):�;�
7��c�5�)�j����Z�.P� �1�1�#�6�6��

7�s�F3�3AH�Hc�(�t|t�rtd��t|t�r|j	|�St|�s|j|St|ttjtttf�st|�}tj|d��}|dk(rX|jj s|j|St#j$dt&t)���|j*|S|j|S)NzWIndexing a Series with DataFrame is not supported, use the appropriate DataFrame columnF��skipna�integerr>r�)r�r<r�r�rEr4�locr�r�r�rLr�r[r�infer_dtyper�rAr�r�r�r&r�)r�rK�key_types   r�rJzSeries._get_with�s����c�<�(��B��
���U�
#��)�)�#�.�.��c�"��8�8�C�=� ��#��b�j�j�.�&�%�P�Q��s�)�C��?�?�3�u�5���y� ��:�:�<�<��x�x��}�$��
�
�?�"�/�1���y�y��~�%��x�x��}�r�c���tj|�r/tj|j|�}t|�|St
|jt�std��|jj|�\}}|j|j||d��}t
|t�r%|jj|j�|j|�S)N�0key of type tuple not found and not a MultiIndexFr )r��any_noner�r*r�rWr�r�r\rD�
get_loc_levelr�rCr��add_referencesr%)r�rKrM�indexer�	new_index�new_sers      r�rEzSeries._get_values_tuple�s����<�<����Z�Z����S� 1�2�F�"�6�*��M��$�*�*�j�1��M�N�N�"�Z�Z�5�5�c�:�����#�#�D�L�L��$9��QV�#�W���g�u�%��L�L�'�'��	�	�2��#�#�D�)�)r�c��|jj|�}|j||j��j	|�Sr�)r��get_rows_with_maskr�r�r%)r�r[�new_mgrs   r�rIzSeries._get_rows_with_mask�s<���)�)�.�.�w�7���)�)�'����)�E�R�R�SW�X�Xr�Fc�F�|r|j|S|jj|�}t|�r|j|St	|jt
�r�|j}|j|}t
|�dk(r|jdk(r|dS||}t||�}|j|||jd��}t	|t�r%|jj|j�|j|�S|j|S)z�
        Quickly retrieve single value at passed index label.

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

        Returns
        -------
        scalar value
        r�rF�r�r�r�)r�r��get_locr2r�r\r��nlevelsr`r�r�rCr�rZr%r�)r��label�takeablerS�mi�
new_valuesr\r]s        r�rBzSeries._get_value�s����<�<��&�&��j�j� � ��'���c�?��<�<��$�$��d�j�j�*�-����B����c�*�J��:��!�#��
�
�a��!�!�}�$��3��I�(��E�:�I��'�'��)�$�)�)�%�(��G��#�u�%����+�+�D�I�I�6��'�'��-�-��9�9�S�>�!r�c��d}tsCt�r9tj|�dkr�t	j
ttd��n�ts�t�s�tj|�}d}t�st|�r|dz
}||krgt�s;t�sS|jjdjj�r"d}t	j
ttd��t!|�t#j$||�}|j'�}|t(urt+d�}t-|t*�r1|j.j1|d�	�}|j3|||�
�S	|j5|||�
�|r|jkd��yy#t6$rzt9|�r]|j.j:s||j<|<nFt	j
dtt?���|j3||�n||j<|<Y��t@tBtDf$r0|j.jG|�}|j3||�Y��tH$�rG}t-|tJ�r&t-|j.tL�st7d�|�t#jN|�r�tQ|j.|�}tSjT|tV�
�}tY|�rft[|�t[|�k7rOt-|t\�s?t_|j`�s*|jc�d}|j3||�Yd}~y	|je||d|��n#tH$r||jf|<YnwxYwYd}~y|ji|||�
�Yd}~��%d}~wwxYw)NT�r�r�r�rF�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`rWr	)r�r��r�)6rr�sys�getrefcountr�r�rrrr!r��blocksr��
has_referencer r�rbr�r?�%_check_is_chained_assignment_possibler@rCr�r��_convert_slice_indexer�_set_values�_set_with_enginerDr2rArSr&r�r�r+rcrr�r\rGrar�r*rHr4r�r�r5r��nonzero�_wherer��	_set_with�_maybe_update_cacher)	r�rKrr��ctr�	ref_count�cacher_needs_updatingr[�errs	         r��__setitem__zSeries.__setitem__�s�����+�-����t�$��)��
�
�+�-C�PQ���1�3��/�/�$�'�C��I�%�'�M�$�,?��Q��	��i��"�$�*�,��	�	�(�(��+�0�0�>�>�@����
�
�3�]�q��	#�3�'��#�#�C��.�� $� J� J� L���(�?���+�C��c�5�!��j�j�7�7��)�7�L�G��#�#�G�U��#�>�>�C	6��!�!�#�u�4�!�8�H!��%�%�d�%�3�!��G�	&��#���z�z�@�@�$)�D�H�H�S�M�
�M�M�K�&�#3�#5���$�$�S�%�0�!&�����
���:�'8�9�	-��j�j�(�(��-�G����W�e�,� �#	6��#�u�%�j����Z�.P��F�����"�"�3�'�(����S�9���j�j��D�1��!��'��E�
�c�$�i�/�&�u�f�5�+�D�J�J�7�
"�k�k�m�A�.�G��$�$�W�e�4��+��K�K���e�T��K�E��(�+�%*�D�I�I�c�N�+������s�E���5�5��G#	6�sQ�?F)�)BN=�+AN=�-	N=�6C(N8�$M;�:N8�;N�N8�N�N8�N8�8N=Tc�v�|jj|�}|jj|||��y)Nrn)r�rcr��setitem_inplace)r�rKrr�rSs     r�rxzSeries._set_with_engineYs1���j�j� � ��%��	
�	�	�!�!�#�u�4�!�8r�c�|�t|t�rJ�t|�rt|�}|jj
s|j
|||��ytj|d��}|dk(r9tjdtt���|j|||��y|j
|||��y)NrnFrPrRror�)r�r�r3r�r�rA�_set_labelsrrTr�r�r�r&rw)r�rKrr�rUs     r�r{zSeries._set_with_s����c�5�)�)�)��s���s�)�C��z�z�8�8����S�%�d��3�
���s�5�9�H��9�$��
�
�G�"�/�1��� � ��e�$� �7�� � ��e�$� �7r�c���tj|�}|jj|�}|dk(}|j	�rt||�d���|j
|||��y)N���z
 not in indexrn)r��asarray_tuplesafer��get_indexer�anyrDrw)r�rKrr�r[�masks      r�r�zSeries._set_labelssc���#�#�C�(��"�j�j�4�4�S�9���"�}���8�8�:��c�$�i�[�
�6�7�7�����%�d��3r�c��t|ttf�r|j}|jj|||��|_|j
�y)N)r[rr�)r�r[r�r�r��setitemr|)r�rKrr�s    r�rwzSeries._set_values�sB���c�E�6�?�+��+�+�C��I�I�%�%�c��T�%�J��	��!�!�#r�c��|s	|jj|�}n|}|j	||�y#t$r||j|<YywxYw)a�
        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�rcrDrSrw)r�rerrfrSs     r��
_set_valuezSeries._set_value�sX���
��j�j�(�(��/���C�����e�$���
�"'�������
�s�5�A�Ac� �t|dd�duS)z3Return boolean indicating if self is cached or not.�_cacherN�r�r�s r��
_is_cachedzSeries._is_cached�s���t�Y��-�T�9�9r�c�8�t|dd�}|�
|d�}|S)zreturn my cacher or Noner�Nr�r�)r��cachers  r��_get_cacherzSeries._get_cacher�s(����y�$�/�����V�A�Y�[�F��
r�c�"�t|d�r|`yy)z#
        Reset the cacher.
        r�N)�hasattrr�r�s r��
_reset_cacherzSeries._reset_cacher�s���4��#���$r�c�R�t�ry|tj|�f|_y)zc
        Set the _cacher attribute on the calling object with a weakref to
        cacher.
        N)r�weakref�refr�)r��itemr�s   r��_set_as_cachedzSeries._set_as_cached�s"��
� ���g�k�k�&�1�2��r�c��yr��r�s r��_clear_item_cachezSeries._clear_item_cache�s��r�c���|jr>|jr2|j�}|�|jr|j	dd��yt
�|��S)zK
        See NDFrame._check_is_chained_assignment_possible.__doc__
        �referentT)�t�force)�_is_viewr�r��_is_mixed_type�_check_setitem_copy�superru)r�r��	__class__s  �r�ruz,Series._check_is_chained_assignment_possible�sQ����=�=�T�_�_��"�"�$�C���3�#5�#5��(�(�:�T�(�B���w�<�>�>r�c�H��t�ryt|dd�}|�u|d�}|�|`nft|�t|�k(r0|j|j
vr|j
|d||��n|jj|dd�t�|�)|||��y)z:
        See NDFrame._maybe_update_cacher.__doc__
        Nr�r�rrp)�clear�verify_is_copyr�)rr�r�r�r��columns�_maybe_cache_changed�_item_cache�popr�r|)r�r�r�r�r�r�r�s      �r�r|zSeries._maybe_update_cacher�s����� ����y�$�/����&�V�A�Y�[�C��{��L��T��c�#�h�&�4�9�9����+C��(�(����D�'�(�J����#�#�F�1�I�t�4�
��$����	%�	
r�c���tjdd|i�|jj|�}|jj|�}|j||d��j
|d��S)a�
        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�Fr �repeatr")�nv�validate_repeatr�r�r�r�r%)r��repeatsr�r\rhs     r�r�z
Series.repeat�sq��f	���2���~�.��J�J�%�%�g�.�	��\�\�(�(��1�
�� � ��9�5� �I�V�V���W�
�	
r�.)�dropr�r��allow_duplicatesr�c��yr�r��r��levelr�r�r�r�s      r��reset_indexzSeries.reset_index4���	r�)r�r�r�c��yr�r�r�s      r�r�zSeries.reset_index@r�r�)r�r�r�c��yr�r�r�s      r�r�zSeries.reset_indexLr�r�c�&�t|d�}|�rtt|��}|��t|tt
f�s|g}n|}|D�cgc]}|jj|���}}t|�|jjkr|jj|�}|r||_yt�r,|jd��}	||	_|	j|d��S|j|jj�|d|j��j|d��S|rt!d��|t"j$ur|j&�d	}n|j&}|j)|�}
|
j+|||�
�Scc}w)au
        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�r")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_numberrd�	droplevelrr�r%r�r�r�r�rr�r��to_framer�)r�r�r�r�r�r�r\�
level_list�levr]rs           r�r�zSeries.reset_indexXs���Z&�g�y�9���%�c�$�i�0�I�� �!�%�%���7�"'��J�!&�J�KU�V�:�C�d�j�j�:�:�3�?�:�
�V��z�?�T�Z�Z�%7�%7�7� $�
�
� 4� 4�Z� @�I��&��
�4�3%�&��)�)��)�/�� )��
��+�+�D��+�G�G��(�(��L�L�%�%�'�y�u�D�J�J�)���,�t�M�,�:�;���N��
��s�~�~�%��9�9�$��D��9�9�D����t�$�B��>�>��$�9I�"��
��9Ws�"Fc�N�tj�}|jdi|��S)zI
        Return a string representation for a particular Series.
        r�)�fmt�get_series_repr_params�	to_string)r��repr_paramss  r��__repr__zSeries.__repr__�s&��
�0�0�2���t�~�~�,��,�,r�c��yr�r��r��buf�na_rep�float_format�headerr��lengthr�r��max_rows�min_rowss           r�r�zSeries.to_string����	r�c��yr�r�r�s           r�r�zSeries.to_string
r�r�c��tj|||||||||
|	��
}|j�}t|t�s*tdt
t|�j�����|�|St|d�r|j|�yt|dd��5}
|
j|�ddd�y#1swYyxYw)aN
        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�wzutf-8)�encoding)r��SeriesFormatterr�r�r�r��reprr�r�r�r��open)r�r�r�r�r�r�r�r�r�r�r��	formatterrM�fs              r�r�zSeries.to_strings���j�'�'��������%���
�	��$�$�&���&�#�&� � � $�T�&�\�%:�%:� ;�<�>��
�
�;��M��s�G�$��	�	�&�!���#�s�W�5���G�G�F�O�6��6��s�B5�5B>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�L�|j�j|f|||d�|��S)a
        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�zSeries.to_markdownns7��H+�t�}�}��*�*��
��%��
�LR�
�	
r�c�R�tt|j�t|��S)a
        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��itemszSeries.items�s��6�4��
�
�#�T�$�Z�0�0r�c��|jS)a
        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')
        r4r�s r�r�zSeries.keys�s���z�z�r�c��yr�r��r��intos  r��to_dictzSeries.to_dict����	r�)r�c��yr�r�r�s  r�r�zSeries.to_dict�s��r�z3.0r�r�)�version�allowed_argsr�c���tj|�}t|j�st	|jt
�r|d�|j
�D��S||j
��S)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})
        c3�<K�|]\}}|t|�f���y�wr�)r/)�.0�k�vs   r��	<genexpr>z!Series.to_dict.<locals>.<genexpr>s ����L�|�t�q�!�1�.�q�1�2�|�s�)r��standardize_mappingr5r�r�r:r�)r�r��into_cs   r�r�zSeries.to_dict�sX��J�(�(��.���4�:�:�&�*�T�Z�Z��*P��L�t�z�z�|�L�L�L��$�*�*�,�'�'r�c�"�|tjur'|j}|�td�}nt	|g�}nt	|g�}|j
j
|�}|j||j��}|j|d��S)a
        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�r")
rr�r�r^r[r��	to_2d_mgrrr�r%)r�r�r�r�rs     r�r�zSeries.to_frame#s~��4�3�>�>�!��9�9�D��|�'��*�����-���T�F�m�G��i�i�!�!�'�*��
�
1�
1�#�C�H�H�
1�
E�����t�J��7�7r�c�p�t|d�}|r|n|j|xrt��}||_|S)a,
        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�rr�)r�r�r�r�r�s     r��	_set_namezSeries._set_nameKs:��&�g�y�9���d�4�9�9�T�-O�:M�:O�6O�#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	��ddlm}	|�
|�td��|std��|j|�}|	|||||||||��	S)Nrr�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�rrrrrr�s
          r�r�zSeries.groupby^sd��B	>��=�R�Z��H�I�I���F�G�G��$�$�T�*���������!���

�
	
r�c�f�t|j�j�jd�S)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)rAr��sumr�r�s r��countzSeries.count�s'��&�T�\�\�"�&�&�(�/�/��8�8r�c�<�|j}t|tj�rt	j
||��}n|j
|��}|j|tt|��|jd|j��j|d��S)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
        )rF)r�r�r�r�r�r")
r�r�r�r�rCr��_moder��ranger�r�r�r%)r�rr�r&s    r�r�zSeries.mode�s���Z�����f�b�j�j�)�#�����?�J����V��4�J�� � ����J��(������*�*�!�
��,�t�F�,�
+�
	,r�c� ��t�|��S)a	
        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�z
Series.unique(	s���~�w�~��r�)�keepr��ignore_indexc��yr�r��r�rr�rs    r��drop_duplicateszSeries.drop_duplicatesi	s��	r�)rrc��yr�r�rs    r�rzSeries.drop_duplicatess	r�r�c��yr�r�rs    r�rzSeries.drop_duplicatesy	r�r��firstc���t|d�}t�|�	|��}|rtt	|��|_|r|j
|�y|S)uf	
        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��rN)r(r�rr^r�r��_update_inplace)r�rr�rrMr�s     �r�rzSeries.drop_duplicates	sP���j&�g�y�9����(�d�(�3���(��V��5�F�L��� � ��(���Mr�c��|j|��}|j||jd��}|j|d��S)a_
        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
        rFr r�r")�_duplicatedr�r�r%)r�r�resrMs    r�r�zSeries.duplicated�	sI��X���D��)���"�"�3�d�j�j�u�"�E���"�"�4��"�=�=r�c��|j|�}tj�5tjd�|j||g|��i|��}ddd�dk(rQtj
dt
|�j�d�tt���|jjS|j|S#1swY�nxYw)a�
        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�)rr��catch_warnings�simplefilter�argminr�r�r�r�r&r��	_na_value�r�r�rQ�argsr�r6s      r��idxminz
Series.idxmin0
s���~�$�$�T�*��
�
$�
$�
&�
�!�!�(�+�����D�&�:�4�:�6�:�A�'�
��7��M�M�"�4��:�#6�#6�"7�85�5��+�-�
��:�:�'�'�'��z�z�!�}��#'�
&���-C�C	c��|j|�}tj�5tjd�|j||g|��i|��}ddd�dk(rQtj
dt
|�j�d�tt���|jjS|j|S#1swY�nxYw)a
        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�)rr�r#r$�argmaxr�r�r�r�r&r�r&r's      r��idxmaxz
Series.idxmax�
s���@�$�$�T�*��
�
$�
$�
&�
�!�!�(�+�����D�&�:�4�:�6�:�A�'�
��7��M�M�"�4��:�#6�#6�"7�85�5��+�-�
��:�:�'�'�'��z�z�!�}��#'�
&�r*c���tj||�|jj|t	���}|j||j��j|d��S)aa
        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��roundr")r��validate_roundr�r1rr�r�r%)r�r/r(r�r`s     r�r1zSeries.round�
sa��@	���$��'��)�)�/�/�8�?R�?T�/�U���)�)�'����)�E�R�R���S�
�	
r�c��yr�r��r��q�
interpolations   r��quantilezSeries.quantile�
r�r�c��yr�r�r4s   r�r7zSeries.quantile���	r�c��yr�r�r4s   r�r7zSeries.quantiler9r�c�l�t|�|j�}|j||d��}|jdk(r|jdd�df}t|�rJ|j|_t|tj��}|j|||j��S|jdS)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)r5r6�numeric_onlyr�Nrr	)r�r�)r)r�r7�ndimr�r4r�r[r��float64r�)r�r5r6rrM�idxs      r�r7zSeries.quantiles���\	�A���]�]�_�����q�
�E��R���;�;�!���[�[��A��&�F���?��)�)�F�K������,�C��$�$�V�3�T�Y�Y�$�G�G��;�;�q�>�!r�c�r�|j|dd��\}}t|�dk(rtjS|j	t
tjd��}|j	t
tjd��}|dvst
|�rtj||||��Std|�d	���)
a�	
        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)r#�min_periodszHmethod must be either 'pearson', 'spearman', 'kendall', or a callable, 'z' was supplied)
�alignr�r��nan�to_numpy�float�callablerG�nancorrr�)r��otherr#rI�this�this_values�other_valuess       r��corrzSeries.corrSs���L�j�j��W�5�j�A���e��t�9��>��6�6�M��m�m�%�"�&�&�u�m�M���~�~�E�B�F�F��~�O���7�7�8�F�;K��>�>��\�&�k��
��
��x�~�
'�
�	
r�r�c�6�|j|dd��\}}t|�dk(rtjS|j	t
tjd��}|j	t
tjd��}t
j||||��S)aF
        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
        rAFrBrrD)rI�ddof)rJr�r�rKrLrMrG�nancov)r�rPrIrVrQrRrSs       r��covz
Series.cov�s{��N�j�j��W�5�j�A���e��t�9��>��6�6�M��m�m�%�"�&�&�u�m�M���~�~�E�B�F�F��~�O���}�}���;�T�
�	
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��tj|j|�}|j||jd��j|d��S)a0
        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}
        Fr �diffr")rCr\r�r�r�r%)r��periodsrMs   r�r\zSeries.diff�sM��j������w�7��� � ��t�z�z�� �F�S�S���T�
�	
r�c�^�|jtt|j|���S)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
        )rTrr��shift)r��lags  r��autocorrzSeries.autocorr5s#��V�y�y��f�d�j�j��o�6�7�7r�c���t|ttf�r�|jj	|j�}t|�t|j�kDs!t|�t|j�kDrt
d��|j|d��}|j|d��}|j}|j}ne|j}tj|�}|jd|jdk7r%td|j�d|j����t|t�rC|jtj||�|jd��j!|d��St|t�rtj||�St|tj"�rtj||�St%d	t'|�����)
a2
        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])
        zmatrices are not alignedFr rzDot product shape mismatch, z vs �dotr"zunsupported type: )r�r�r<r��unionr�r�r�r�r�r*�shape�	Exceptionr�rcr�r%r�r�r�)r�rPrE�left�right�lvals�rvalss       r�rcz
Series.dotbs���d�e�f�l�3�4��Z�Z�%�%�e�k�k�2�F��6�{�S����_�,��F��c�%�+�+�>N�0N� �!;�<�<��<�<�f�5�<�9�D��M�M��U�M�;�E��K�K�E��L�L�E��K�K�E��J�J�u�%�E��{�{�1�~����Q��/��2�5�;�;�-�t�E�K�K�=�Q����e�\�*��$�$����u�e�$�E�M�M��%���l�4��l�.�
/���v�
&��6�6�%��'�'�
��r�z�z�
*��6�6�%��'�'��0��e��
�>�?�?r�c�$�|j|�S�zB
        Matrix multiplication using binary `@` operator.
        )rc�r�rPs  r��
__matmul__zSeries.__matmul__�s���x�x���r�c�J�|jtj|��Srl)rcr��	transposerms  r��__rmatmul__zSeries.__rmatmul__�s���x�x����U�+�,�,r�)r�c�H�tjj||||��S)N)�side�sorter)rD�
IndexOpsMixin�searchsorted)r�rrsrts    r�rvzSeries.searchsorted�s$���!�!�.�.�t�U��f�.�U�Ur�c���ddlm}t|ttf�r|g}|j|�n||g}t
d�|ddD��r
d}t|��||||��S)Nr��concatc3�>K�|]}t|tf����y�wr�)r�r<)r��xs  r�r�z!Series._append.<locals>.<genexpr>�s����E�}�!�z�!�l�_�-�}�s�r�zCto_append should be a Series or list/tuple of Series, got DataFrame)r�verify_integrity)�pandas.core.reshape.concatryr�r�r��extendr�r�)r��	to_appendrr|ry�	to_concat�msgs       r��_appendzSeries._append�sl��	6��i�$���/���I����Y�'��y�)�I��E�y���}�E�E�W�C��C�.� ���L�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�|�|||||��S)N)rP�
align_axis�
keep_shape�
keep_equal�result_names)r�r�)r�rPr�r�r�r�r�s      �r�r�zSeries.compare�s+���T�w���!�!�!�%��
�	
r�c���|�t|jd��}t|t�r�|jj|j�}t
j||�}tjt|�t��}tjd��5t|�D]5\}}|j||�}	|j||�}
||	|
�||<�7	ddd�n|j}tjt|�t��}tjd��5|jD�	cgc]}	||	|���
c}	|ddddd�|j }t#j$|d��}t|jt&t(f�}t+||j|��}
|j-|
||d�	�S#1swY�mxYwcc}	w#1swY��xYw)
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_dtyperb)r@r�r�r�r�rdrH�get_op_result_namer��emptyr�r��errstate�	enumerate�getr�r�r�maybe_convert_objectsrQr9r0r�)r�rP�func�
fill_valuer\�new_namerhr6r?�lv�rv�npvaluesr�r&s              r��combinezSeries.combine,
s���P��+�D�J�J�u�E�J��e�V�$��
�
�(�(����5�I��-�-�d�E�:�H����#�i�.��?�J�����*�'�	�2�F�A�s����#�z�2�B����3�
�3�B�$(��R�L�J�q�M�3�+�*��
�
�I����#�i�.��?�J�����*�;?�<�<� H�<�R��b�%��<� H�
�1�
�+��y�y�H��,�,�Z�5�I�� ��
�
�[�:J�,K�L�
�0��d�j�j�Z�
�
�� � ��9�8�RW� �X�X�-+�*��!I�+�*�s+�AG�3G!�G�G!�G�G!�!G*c��ddlm}|j|jk(r�|jj	|j�r |j|j
�|�S|jrPt|jt�s6|j|d��\}}|j|j
�|�S|jj|j�}|}|jj|jt|��}|jj|�}|j|d��}|j|d��}|jjdk(r$|jjdk7rt!|�}|||g�}|j|d��}|j#|d�	�S)
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
        rrx�outer)rCFr��M�
combine_firstr")r}ryr�r�r�r�r?rr�r;rJrd�
differencerAr�rmrjr%)r�rPryrQr\�
keep_other�	keep_this�combineds        r�r�zSeries.combine_first�
sb��X	6��:�:����$��z�z� � ����-��y�y�����e�4�4��"�"�:�d�j�j�+�+N�"�j�j��W�j�=���e��y�y�����e�4�4��J�J�$�$�U�[�[�1�	����[�[�+�+�D�J�J�u�T�{�,C�D�
��J�J�)�)�*�5�	��|�|�I�E�|�2���
�
�j�u�
�5���:�:�?�?�c�!�e�k�k�&6�&6�#�&=���&�E��4��-�(���#�#�I�E�#�:���$�$�T�/�$�B�Br�c�P�tsGt�r=tj|�tkr�tjttd��nptsjt�s`|j�rPtj|�}t}t|�r|dz
}||kr tjttd��t|t�st|�}|j|�}t!|�}|j"j%||��|_|j'�y)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)rrrqrrrr�r�rr�_is_view_after_cow_rulesr!rr�r�r��reindex_likerAr��putmaskr|)r�rPr}r~r�s     r��updatez
Series.update�
s���F�+�-����t�$�	�1��
�
�2�*� ��
�1�3��8U�8U�8W��/�/�$�'�C�!�I��T�"��Q��	��i���
�
�:�!� ���%��(��5�M�E��"�"�4�(���U�|���I�I�%�%�4�U�%�;��	��!�!�#r�)r��	ascendingr�rm�na_positionrrKc��yr�r��r�r�r�r�rmr�rrKs        r��sort_valueszSeries.sort_values=���	r�)r�r�rmr�rrKc��yr�r�r�s        r�r�zSeries.sort_valuesKr�r�c��yr�r�r�s        r�r�zSeries.sort_valuesYr�r��	quicksort�lastc�*�t|d�}|j|�|r|jrtd��t	|�rBttt|�}t|�dk7rtdt|��d���|d}t|�}|dvrtd|����|r%ttt||��j}n|j}t||t|�|�}	t|	t|	��r%|r|j|�S|j!d	�
�S|j#|j|	|j$|	d��}
|rt't|	��|
_|s|
j)|d
��S|j|
�y	)u>
        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�zLength of ascending (z) must be 1 for Seriesr)rr�zinvalid na_position: Nr�Fr r�r")r(rr�r�r4rrrHr�r'r�rgr�rhrrr�r�r�r^r%)r�r�r�r�rmr�rrK�values_to_sort�sorted_indexrMs           r�r�zSeries.sort_valuesgs���r&�g�y�9�����d�#��t����7��
�
�	�"��X�d�^�Y�7�I��9�~��"� �+�C�	�N�+;�;Q�R���"�!��I�&�y�1�	��/�/��4�[�M�B�C�C��!�&�*;�D�#�*F�G�O�O�N�!�\�\�N����d�9�o�{�S���L�#�l�*;�<���+�+�D�1�1��9�9�$�9�'�'��"�"��L�L��&�d�j�j��.F�U�#�
���(��\�):�;�F�L���&�&�t�M�&�B�B����V�$�r�)r�r�r�rmr��sort_remainingrrKc	��yr�r��
r�r�r�r�r�rmr�r�rrKs
          r��
sort_indexzSeries.sort_index0r�r��	r�r�r�r�rmr�r�rrKc	��yr�r�r�s
          r�r�zSeries.sort_index@r�r�c	��yr�r�r�s
          r�r�zSeries.sort_indexPr�r�c	�4��t�
|�|||||||||	��	S)u2
        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�rmr�r�rrKr�s          �r�r�zSeries.sort_index`s8���J�w�!������#�)�%��"�

�
	
r�c�(�|dk7r|j|�|j}t|�}|j�rtt	j
dtt���tjt|�dtj��}|}tj|||��||<ntj||��}|j||j|jtjd��}	|	j!|d�	�S)
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�z�The 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	rlF)r�r�r�r��argsortr")rr�r?r�r�r�r�r&r��fullr��intpr�r�r�r�r%)
r�r�rmr�stabler�r�rM�notmaskr s
          r�r�zSeries.argsort�s���X�2�:��!�!�$�'������F�|���8�8�:�
�M�M�-��+�-�
��W�W�S��Y��"�'�'�:�F��e�G� �j�j����t�D�F�7�O��Z�Z��T�2�F�����$�*�*�4�9�9�B�G�G�%� �
������Y��7�7r�c�N�tj|||��j�S)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
        ��nr)re�
SelectNSeries�nlargest�r�r�rs   r�r�zSeries.nlargest:s#��D�$�$�T�Q�T�:�C�C�E�Er�c�N�tj|||��j�S)a�
        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�)rer��	nsmallestr�s   r�r�zSeries.nsmallest�s#��B�$�$�T�Q�T�:�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�rYr�c��t|jt�sJ�|j|xrt	���}|jj||�|_|S)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�r6�jr�rMs     r�r�zSeries.swaplevelsR��z�$�*�*�j�1�1�1����� B�-@�-B�)B��C���z�z�+�+�A�q�1����
r�c���t|jt�std��|j	d��}t|jt�sJ�|jj|�|_|S)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\rfr��reorder_levels)r�rrMs   r�r�zSeries.reorder_levelscs^��J�$�*�*�j�1��M�N�N������%���&�,�,�
�3�3�3��|�|�2�2�5�9����
r�c��t|jt�r|jj	�\}}n|t|�rKt
|j�r6tjtj|j��\}}n&|j�}|r|jd��S|S|rtt|��}n|jj|�}|j!|||j"d��S)uI
        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�Frb)r�r�r:r��_exploder�r5r�exploder�r*r�r�r^r�r�r�r�)r�rr��countsrMr�s      r�r�zSeries.explode�s���j�d�j�j�.�1�!�\�\�2�2�4�N�F�F�
��Y�?�4�:�:�6�$�_�_�R�Z�Z����-E�F�N�F�F��Y�Y�[�F�4@�6�%�%�4�%�0�L�f�L��(��V��5�E��J�J�%�%�f�-�E�� � ��u�4�9�9�5� �Q�Qr�c�$�ddlm}|||||�S)a�
        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�rr�s     r�r�zSeries.unstack�s��b	8��t�U�J��5�5r�c��|j||��}|j||jd��j|d��S)aC	
        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_actionFr �mapr")�_map_valuesr�r�r%)r��argr�rhs    r�r�z
Series.mapsN��`�%�%�c�Y�%�?�
�� � ��4�:�:�E� �J�W�W���X�
�	
r�c��|S)a
        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�rKr=�subsets    r��_gotitemzSeries._gotitemas	���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��|j|�|�t|j��}t||||��}|j	�}|S)N)r(r�)r�dictr�rK�agg)r�r�r�r(r��oprMs       r�r�zSeries.aggregate�sI��	
���d�#��<������'�D�
��t�$�v�
>��������
r��	transform)r�r�c��|j|�t�s
t�r|jd��n|}t	||||��j�}|S)NFr�)r�r(r�)rrrr�rKr�)r�r�r�r(r�r�rMs       r�r�zSeries.transform�sX��	
���d�#�#�$�(:�(<�
�I�I�5�I�!��	�
�S�t�$�v�F�P�P�R���
r�r�r�)�by_rowc�@�t||||||��j�S)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_dtyper�r(r�)rK�apply)r�r�r�r(r�r�s      r�r�zSeries.apply�s-��@���'����

��%�'�	r�c�&�|�Y|�#|j|jjk(r4t�r|j|��S|s|�|j|��S|St	j
|j|dd��}|j||d��S)Nr�T)�
allow_fillr�Fr )�namesr�rr�rC�take_ndr�r�)r�r\r[r�rhs     r��_reindex_indexerzSeries._reindex_indexer>s����?������D�J�J�4D�4D�!D�"�$��y�y�d�y�+�+��t�|��y�y�d�y�+�+��K��'�'��L�L�'�d�t�
�
�� � ��9�5� �I�Ir�c��y)zc
        Check if we do need a multi reindex; this is for compat with
        higher dims.
        Fr�)r�r�r#r�s    r��_needs_reindex_multizSeries._needs_reindex_multiTs��
r�)r�r�r�r�c��yr�r��r�r�r�r�r�r�r�s       r��renamez
Series.rename[���	r�)r�r�r�r�r�c��yr�r�r�s       r�r�z
Series.renamehr�r�c��yr�r�r�s       r�r�z
Series.renameur�r�r�c���|�|j|�}t|�st|�rt�|�|||||��S|j|||��S)aE
        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�)rrNr1r��_renamer�)r�r�r�r�r�r�r�r�s       �r�r�z
Series.rename�sh���n���(�(��.�D��E�?�l�5�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�|�|||��S)Nr�)r��set_axis)r��labelsr�r�r�s    �r�rzSeries.set_axis�s���B�w���T���=�=r�r�)r�r�)r�r#r�r�r��limit�	tolerancec	�0��t�	|�|||||||��S)N)r�r#r�r�r�rr)r�r�)
r�r�r�r#r�r�r�rrr�s
         �r�r�zSeries.reindexs0���"�w������!����
�	
r�)r�r�r�c��yr�r��r��mapperr�r�r�r�s      r��rename_axiszSeries.rename_axis+r�r�)r�r�r�r�c��yr�r�rs      r�rzSeries.rename_axis7r�r�c��yr�r�rs      r�rzSeries.rename_axisCr�r�c�,��t�|�|||||��S)N)rr�r�r�r�)r�r)r�rr�r�r�r�r�s      �r�rzSeries.rename_axisOs+����w�"������#�
�	
r�)r�r�r�r�r�c��yr�r��r�rr�r�r�r�r�r�s        r�r�zSeries.dropar�r�)r�r�r�r�r�r�c��yr�r�r
s        r�r�zSeries.dropor�r�c��yr�r�r
s        r�r�zSeries.drop}r�r��raisec	�0��t�|�|||||||��S)a�
        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
        )rr�r�r�r�r�r�)r�r�)	r�rr�r�r�r�r�r�r�s	        �r�r�zSeries.drop�s1���B�w�|���������
�	
r�c�$��t�|�|��S)a�
        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�z
Series.pop�s���2�w�{��{�%�%r�c�@�t||�j||||��S)N)r��max_cols�verbose�show_counts)rl�render)r�rr�r�memory_usagers      r��infozSeries.infos/���$��-�4�4����#�	5�
�	
r�c��|r|n|j�}|j}tj||�}t	|t
�r|j
|||�n tj|�}||||��|ry|S)z�
        Replaces values in a Series using the fill method specified when no
        replacement value is given in the replace method
        )rr�N)r�r�rF�mask_missingr�rL�_fill_mask_inplace�
get_fill_func)	r��
to_replacer#r�rrMr�r��fill_fs	         r��_replace_singlezSeries._replace_single"sq��!��d�i�i�k�������#�#�F�J�7���f�n�-��%�%�f�e�T�:��*�*�6�2�F��6��T�2����
r�c�l�|j|��}|r||jj|��z
}|S)aP
        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�r)r�r�r�r�s    r�rzSeries.memory_usage8s<��b
���D��)���
����(�(�d�(�3�3�A��r�c��tj|j|�}|j||jd��j|d��S)ak
        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
        Fr �isinr")rCr$r�r�r�r%)r�r�rMs   r�r$zSeries.isinnsM��R������v�6��� � ��t�z�z�� �F�S�S���T�
�	
r�c��|dk(r||k\}||k}||zS|dk(r||k\}||k}||zS|dk(r||kD}||k}||zS|dk(r||kD}||k}||zStd��)a�
        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
        �bothrgrh�neitherzJInclusive has to be either string of 'both','left', 'right', or 'neither'.)r�)r�rgrh�	inclusive�lmask�rmasks      r��betweenzSeries.between�s���R����D�L�E��E�M�E� �u�}���&�
 ��D�L�E��5�L�E��u�}���'�
!��4�K�E��E�M�E��u�}���)�
#��4�K�E��5�L�E��u�}���1��
r�c	��t|t�stdt|�����|st	d��t|�D]Y\}}t|t�std|�dt|��d���t|�dk7s�@t	d|�dt|��d���|D��cgc]1\}}tj||�tj||�f��3}}}|j�}t|�\}}g|�|�D�	cgc]}	t|	�d��}
}	tt|
��d	kDr�t|
�}g}t||�D]h\}}t|�rt!|t|�|�
�}n/t|t"�r|j%|�}n
t'||��}|j)|��j|}|j%|�}t+t-t|���}
t|
|ddd
�|ddd
��D]\}}}	|j/||ddd��}�|Scc}}wcc}	w#t0$r}t	d|�d|�d��|�d}~wwxYw)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 rr�)rr�r�r	Nr�F)rPr�r�r�zFailed to apply conditionz and replacement)r�r�r�r�r�r�r�r�r�r?r�r�r.�setr-r6r,r=r��pd_array�append�reversedrr�rf)r��caselist�num�entry�	condition�replacement�default�
conditions�replacementsr��
common_dtypes�common_dtype�updated_replacements�counter�position�errors                r��	case_whenzSeries.case_whens���j�(�D�)��F�t�H�~�FV�W��
���4��
�
$�H�-�J�C���e�U�+����u�$B�4��;�-�q�Q����5�z�Q�� ���u�%*�*-�e�*��Q�8���
.� +3�
�
+3�&�	�;��%�%�i��6��%�%�k�4�8�
�+3�	�
��)�)�+��#&��>� �
�L�=U�|�=U�W�=U�V�=U�c�)�#�.�q�1�=U�
�V��s�=�!�"�Q�&�+�M�:�L�#%� �*-�j�,�*G�&�	�;��[�)�"D�)�#�i�.��#�K� ��Y�7�"-�"4�"4�\�"B�K�"*�;�l�"K�K�$�+�+�K�8�+H�0�L��n�n�\�2�G��5��Z��1�2��03��Z��"��%�|�D�b�D�'9�1
�,�H�i��
�!�,�,��[�q�%�t�'���	1
����M
��W��2�
� �/��z�9I�(��ST�U�����
�s$�!6H�=H �H%�%	I�.I�Ic�,�tj|�Sr�)rUr?r�s r�r?zSeries.isna�s���|�|�D�!�!r�c� ��t�|��S)z<
        Series.isnull is an alias for Series.isna.
        )r��isnullrs �r�rCz
Series.isnull�s���
�w�~��r�c� ��t�|��Sr�)r�rArs �r�rAzSeries.notna�s����w�}��r�c� ��t�|��S)z>
        Series.notnull is an alias for Series.notna.
        )r��notnullrs �r�rFzSeries.notnull�s���
�w�� � r�)r�r��howrc��yr�r��r�r�r�rGrs     r�rz
Series.dropna����	r�)r�rGrc��yr�r�rIs     r�rz
Series.dropna�rJr�c��t|d�}t|d�}|j|xsd�|jrt|�}n|s|j	d��}n|}|rtt
|��|_|r|j|�S|S)u*
        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�rrNr�)	r(rrrBr�r^r�r�r)r�r�r�rGrrMs      r�rz
Series.dropna�s���T&�g�y�9��*�<��H�����d�i�a�(����(��.�F�������-�����(��V��5�F�L���'�'��/�/��Mr�c�"�t|jt�s+tdt	|j�j
����|j
|xrt���}|jj||��}t|d|�|S)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�)�freqrGr�)
r�r�r]r�r�r�r�r�to_timestamp�setattr)r�rOrGr��new_objr\s      r�rPzSeries.to_timestamps|��@�$�*�*�k�2��/��T�Z�Z�0@�0I�0I�/J�K�L�L��)�)��!C�.A�.C�*C�)�D���J�J�+�+��3�+�?�	����)�,��r�c� �t|jt�s+tdt	|j�j
����|j
|xrt���}|jj|��}t|d|�|S)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]')
        rNr�)rOr�)
r�r�rZr�r�r�r�r�	to_periodrQ)r�rOr�rRr\s     r�rTzSeries.to_periodfsz��X�$�*�*�m�4��/��T�Z�Z�0@�0I�0I�/J�K�L�L��)�)��!C�.A�.C�*C�)�D���J�J�(�(�d�(�3�	����)�,��r�z!list[Literal['index', 'columns']]�_AXIS_ORDERSz
Literal[0]�_info_axis_numberzLiteral['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��tj||�}t|t�r|j	|�std��|j}t|dd��}tj|||�}|j||��S)Nz3Can only compare identically-labeled Series objectsT��
extract_numpy�
extract_range�r�)
rHr�r�r��
_indexed_samer�r�rS�
comparison_op�_construct_result�r�rPr��res_name�lvalues�rvaluesr&s       r��_cmp_methodzSeries._cmp_method�sx���)�)�$��6���e�V�$�T�-?�-?��-F��R�S�S��,�,����T��N���&�&�w���<�
��%�%�j�x�%�@�@r�c���tj||�}|j|d��\}}|j}t	|dd��}tj
|||�}|j
||��S)NT)�align_asobjectr[r^)rHr��
_align_for_opr�rS�
logical_oprarbs       r��_logical_methodzSeries._logical_method�sl���)�)�$��6���(�(��t�(�D���e��,�,����T��N���^�^�G�W�b�9�
��%�%�j�x�%�@�@r�c�l�|j|�\}}tjj|||�Sr�)rirDru�
_arith_method)r�rPr�s   r�rmzSeries._arith_method�s1���(�(��/���e��!�!�/�/��e�R�@�@r�c���|}t|t�r�|jj|j�s�|r�|jt
tjfvs"|jt
tjfvr$tjdtt���|jt
�}|jt
�}|j|d��\}}||fS)zalign lhs and rhs Seriesz�Operation 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�rJ)r�rhrhrgs    r�rizSeries._align_for_op�s���
���e�V�$��:�:�$�$�U�[�[�1�!��z�z�&�"�(�(�);�;�u�{�{�����S�@�!�
�
�>�*�'7�'9�
� �;�;�v�.�D�!�L�L��0�E�"�j�j��U�j�;���e��U�{�r�c��|}|jj|j�s|j||dd��\}}tj|j
|j
|�\}}t
jd��5|||�}ddd�tj||�}	|j|	�}
tt|
�S#1swY�AxYw)a6
        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�rCr�r�r�N)r�r�rJrH�
fill_binopr�r�r�r�rarr�)r�rPr�r�r�rQ�	this_vals�
other_valsrMr�r;s           r��_binopz
Series._binops���&���z�z� � ����-��*�*�U�%�g�E�*�R�K�D�%� #���t�|�|�U�]�]�J� W��	�:�
�[�[�X�
&��)�Z�0�F�'��%�%�d�E�2���$�$�V�T�2���F�C� � �'�
&�s�
C�Cc�V�t|t�rT|j|d|��}|j|d|��}t|t�sJ�t|t�sJ�||fSt	|dd�}|j||j|d��}|j|�}||_|S)a8
        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.
        rr^r�r�NF)r�r�r�)	r�r�rar�r�r�r�r%r�)r�rMr��res1�res2r�r;s       r�razSeries._construct_result9s��� �f�e�$��)�)�&��)�$�)�?�D��)�)�&��)�$�)�?�D��d�F�+�+�+��d�F�+�+�+��$�<������.������d�j�j��E��R�����t�$������
r��r�r�r�c��|�|j|�tj||�}t|t�r|j||||��St|tjttf�r^t|�t|�k7rtd��|j||jd��}|j||||��}||_|S|�%t|�r	|||�S|j!|�}|||�S)N)r�r�zLengths must be equalFr�)rrHr�r�r�rtr�r�r�r�r�r�r�r�r�r?�fillna)r�rPr�r�r�r�rcrMs        r��_flex_methodzSeries._flex_method_s������!�!�$�'��)�)�$��6���e�V�$��;�;�u�b��*�;�M�M�
���
�
�D�%�8�
9��5�z�S��Y�&� �!8�9�9��%�%�e�T�Z�Z�e�%�D�E��[�[���%�J�[�O�F�#�F�L��M��%���;��d�J�/�/��{�{�:�.���d�E�?�"r��eqc�J�|j|tj|||��S�Nrx)r{�operatorr|�r�rPr�r�r�s     r�r|z	Series.eqvs+��� � ��8�;�;�e�
��!�
�	
r��nec�J�|j|tj|||��Sr~)r{rr�r�s     r�r�z	Series.ne��)��� � ��8�;�;�e�
��!�
�	
r��lec�J�|j|tj|||��Sr~)r{rr�r�s     r�r�z	Series.le�r�r��ltc�J�|j|tj|||��Sr~)r{rr�r�s     r�r�z	Series.lt�r�r��gec�J�|j|tj|||��Sr~)r{rr�r�s     r�r�z	Series.ge�r�r��gtc�J�|j|tj|||��Sr~)r{rr�r�s     r�r�z	Series.gt�r�r��addc�J�|j|tj|||��Sr~)r{rr�r�s     r�r�z
Series.add��)��� � ��8�<�<�u��$�!�
�	
r��raddc�J�|j|tj|||��Sr~)r{rIr�r�s     r�r�zSeries.radd��)��� � ��9�>�>��:�D�!�
�	
r��subc�J�|j|tj|||��Sr~)r{rr�r�s     r�r�z
Series.sub�r�r��rsubc�J�|j|tj|||��Sr~)r{rIr�r�s     r�r�zSeries.rsub�r�r��mulc�J�|j|tj|||��Sr~)r{rr�r�s     r�r�z
Series.mul�s+��� � ��8�<�<�u��$�!�
�	
r��rmulc�J�|j|tj|||��Sr~)r{rIr�r�s     r�r�zSeries.rmul�r�r��truedivc�J�|j|tj|||��Sr~)r{rr�r�s     r�r�zSeries.truediv�s+��� � ��8�#�#�5�Z�d�!�
�	
r��rtruedivc�J�|j|tj|||��Sr~)r{rIr�r�s     r�r�zSeries.rtruediv�s,��� � ��9�%�%�U�z�PT�!�
�	
r��floordivc�J�|j|tj|||��Sr~)r{rr�r�s     r�r�zSeries.floordiv�s+��� � ��8�$�$�E�j�t�!�
�	
r��	rfloordivc�J�|j|tj|||��Sr~)r{rIr�r�s     r�r�zSeries.rfloordiv�s,��� � ��9�&�&�e�
�QU�!�
�	
r��modc�J�|j|tj|||��Sr~)r{rr�r�s     r�r�z
Series.mod�r�r��rmodc�J�|j|tj|||��Sr~)r{rIr�r�s     r�r�zSeries.rmod�r�r��powc�J�|j|tj|||��Sr~)r{rr�r�s     r�r�z
Series.pow�r�r��rpowc�J�|j|tj|||��Sr~)r{rIr�r�s     r�r�zSeries.rpow�r�r��divmodc�6�|j|t|||��Sr~)r{r�r�s     r�r�z
Series.divmods%��� � ��6��:�D�!�
�	
r��rdivmodc�J�|j|tj|||��Sr~)r{rIr�r�s     r�r�zSeries.rdivmod	s+��� � ��9�$�$�E�j�t�!�
�	
r�)r�rQr<�filter_typec	��|j}|�|j|�t|t�r|j|fd|i|��S|r5|j
jdvrd}	|dvrd}	td|�d|	�d|�d	���||fd|i|��S)
z�
        Perform a reduction operation.

        If we have an ndarray as a value, then simply perform the operation,
        otherwise delegate to the object.
        rQ�iufcbr<)r�r��	bool_onlyzSeries.z does not allow �=z with non-numeric dtypes.)r�rr�rL�_reducer�rmr�)
r�r�r�r�rQr<r��kwds�delegate�kwd_names
          r�r�zSeries._reduces���$�<�<�����!�!�$�'��h��/�#�8�#�#�D�@��@�4�@�@���
�
���w� >�)���>�)�*�H���d�V�#3�H�:�Q�|�n�M/�/����h�6�v�6��6�6r�r�)r=)r�r�rQc��tjd|d��t|dd��|jtj
d|||d��S)	Nr�r���fnamerQF��none_allowedrH�r�r�r<rQr�)r��validate_logical_funcr(r�rG�nanany�r�r�r�rQr�s     r�r�z
Series.any;sN��	� � ��V�5�9��F�H�5�A��|�|��M�M���"���
�
�	
r�r�c��tjd|d��t|dd��|jtj
d|||d��S)	Nr�r�r�rQFr�rHr�)r�r�r(r�rG�nanallr�s     r�r�z
Series.allPsN��	� � ��V�5�9��F�H�5�A��|�|��M�M���"���
�
�	
r��minc�4�tj||||fi|��Sr�)rUr��r�r�rQr<r�s     r�r�z
Series.minc����{�{�4��v�|�F�v�F�Fr��maxc�4�tj||||fi|��Sr�)rUr�r�s     r�r�z
Series.maxmr�r�rc�6�tj|||||fi|��Sr�)rUr�r�r�rQr<�	min_countr�s      r�rz
Series.sumws ���{�{�4��v�|�Y�Q�&�Q�Qr��prodc�6�tj|||||fi|��Sr�)rUr�r�s      r�r�zSeries.prod�s ���|�|�D�$���i�R�6�R�Rr��meanc�4�tj||||fi|��Sr�)rUr�r�s     r�r�zSeries.mean�����|�|�D�$���G��G�Gr��medianc�4�tj||||fi|��Sr�)rUr�r�s     r�r�z
Series.median�s���~�~�d�D�&�,�I�&�I�Ir��semc�6�tj|||||fi|��Sr�)rUr��r�r�rQrVr<r�s      r�r�z
Series.sem�� ���{�{�4��v�t�\�L�V�L�Lr��varc�6�tj|||||fi|��Sr�)rUr�r�s      r�r�z
Series.var�r�r��stdc�6�tj|||||fi|��Sr�)rUr�r�s      r�r�z
Series.std�r�r��skewc�4�tj||||fi|��Sr�)rUr�r�s     r�r�zSeries.skew�r�r��kurtc�4�tj||||fi|��Sr�)rUr�r�s     r�r�zSeries.kurt�r�r��cumminc�8�tj|||g|��i|��Sr�)rUr��r�r�rQr(r�s     r�r�z
Series.cummin�����~�~�d�D�&�B�4�B�6�B�Br��cummaxc�8�tj|||g|��i|��Sr�)rUr�r�s     r�r�z
Series.cummax�r�r��cumsumc�8�tj|||g|��i|��Sr�)rUr�r�s     r�r�z
Series.cumsum�r�r��cumprodc�8�tj|||g|��i|��Sr�)rUr�r�s     r�r�zSeries.cumprod�s�����t�T�6�C�D�C�F�C�Cr�)r��Dtype | Noner��bool | Noner��bool | lib.NoDefault�return�None)NN)r�rr��Index | Noner�zDtypeObj | None)r�zCallable[..., Series])r�zCallable[..., DataFrame])r�rH)r�rx)r�r)rrr�r�)r�zBlockValuesRefs | None)r�rL)�C)rr�r�rr)r��intr�)r�r�r�r�)r�znpt.DTypeLike | Noner�r�r�r�)r-�
str | Noner�r)r�zlist[Index])r)r6r�r�rtr�r)r:rCr�rtr�r�)rKr�)r[znpt.NDArray[np.bool_]r�r�)F)rfrH)r�r�)T)r�rHr�r�)rfrHr�r�)FTF)r�rHr�rHr�rHr�r�)r�zint | Sequence[int]r�r�r�r�).)r�r}r��Literal[False]r�r~r�r�r�rHr�r�)r�r}r��
Literal[True]r�r~r�r�r�rHr�r�)r�r}r�rHr�r~r�r�r�rHr�r�)r��IndexLabel | Noner�rHr�r~r�rHr�rHr�zDataFrame | Series | None)r�r�)
..........)r�r�r�r�r�r�r�rHr�rHr�rHr��
int | Noner�r�r�r�)	.........)r�zFilePath | WriteBuffer[str]r�r�r�r�r�rHr�rHr�rHr�r�r�r�r�r�)
N�NaNNTTFFFNN)r�z"FilePath | WriteBuffer[str] | Noner�r�r�r�r�rHr�rHr�rHr�rHr�rHr�r�r�r�r�r�)N�wtTN)
r��IO[str] | Noner�r�r�rHr�zStorageOptions | Noner�r�)r�zIterable[tuple[Hashable, Any]])r�r[)r�z'type[MutableMappingT] | MutableMappingTr�r)r�z
type[dict]r�r�)r�rr�r�)FN)r�rHr�r�r�r�)r�rsr�r�rrHrrHrrHrr�rrHr�r�)rrHr�r�)r�rr)rrvr�r�rrHr�r�)rrvr�r�rrHr�r�)rrvr�rHrrHr��
Series | None)r)rrvr�r�)rT)r�rsrQrHr�r)r/r�r�r�)..)r5rMr6r�r�rM)r5zSequence[float] | AnyArrayLiker6r�r�r�)r5z&float | Sequence[float] | AnyArrayLiker6r�r�zfloat | Series)g�?�linear)rFN)rPr�r#rurIr�r�rM)Nr�)rPr�rIr�rVr�r�rM)r�)r]r�r�r�)r`r�r�rM)rPrqr�zSeries | np.ndarray)rgN)rz$NumpyValueArrayLike | ExtensionArrayrszLiteral['left', 'right']rtzNumpySorter | Noner�znpt.NDArray[np.intp] | np.intp)FF)rrHr|rH)r�FFrm)rPr�r�rsr�rHr�rHr�r�r��DataFrame | Series)rPzSeries | Hashabler�z(Callable[[Hashable, Hashable], Hashable]r��Hashable | Noner�r�)r�r�)rPzSeries | Sequence | Mappingr�r�)r�rsr��bool | Sequence[bool]r�r�rmr�r�r�rrHrKr�r�r�)r�rsr�r�r�r�rmr�r�r�rrHrKr�r�r�)r�rsr�r�r�rHrmr�r�r�rrHrKr�r�r�)r�rsr�r�r�rHrmr�r�r�rrHrKzValueKeyFunc | Noner�r�)r�rsr�r}r�r�r�r�rmr�r�r�r�rHrrHrKr|r�r�)r�rsr�r}r�r�r�r�rmr�r�r�r�rHrrHrKr|r�r�)r�rsr�r}r�r�r�rHrmr�r�r�r�rHrrHrKr|r�r�)r�rsr�r�r�r�r�rHrmr�r�r�r�rHrrHrKzIndexKeyFunc | Noner�r�)rr�NN)
r�rsrmr�rr�r�r�r�r�)�r)r�r�rzLiteral['first', 'last', 'all']r�r�)���r�N)r6r~r�r~r�r�r�r�)rzSequence[Level]r�r�)rrHr�r�)r�NT)r�r}r�r�rrHr�r�)r�zCallable | Mapping | Seriesr�zLiteral['ignore'] | Noner�r�)r�r�)Nr)r�rs)r�ror�rsr�r�)
r�ror�r�r(ztuple[Any, ...]r�zLiteral[False, 'compat']r�r�)r\r�r[znpt.NDArray[np.intp] | Noner�r�r�r�)r��Renamer | Hashable | Noner��Axis | Noner�rHr�r�r��Level | Noner�r{r�r�)r�r�r�rr�rHr�r�r�rr�r{r�r�)r�r�r�rr�rHr�rHr�rr�r{r�r�)r�r�r�rr�r�r�rHr�rr�r{r�r�)r�rsr�r�r�r�)r�rr#zReindexMethod | Noner�r�r�rr�z
Scalar | Nonerr�r�r�)
r�IndexLabel | lib.NoDefaultr�rsr�rHr�r�r�r�)
rrr�rsr�rHr�r�r�r�)
rrr�rsr�rHr�rHr�zSelf | None)rr}r�rsr�r}r�r}r�rr�r�r�r{r�r�)rr}r�rsr�r}r�r}r�rr�r�r�r{r�r�)rr}r�rsr�r}r�r}r�rr�rHr�r{r�r�)rr�r�rsr�r�r�r�r�rr�rHr�r{r�r�)r�rr�r)NNNNT)rr�r�r�rr�rzbool | str | NonerrHr�r�)r#r�r�rH)TF)r�rHr�rHr�r�)r&)r(z+Literal['both', 'neither', 'left', 'right']r�r�)r2z�list[tuple[ArrayLike | Callable[[Series], Series | np.ndarray | Sequence[bool]], ArrayLike | Scalar | Callable[[Series], Series | np.ndarray]],]r�r�)
r�rsr�r�rG�
AnyAll | NonerrHr�r�)
r�rsr�r�rGrrrHr�r�)
r�rsr�rHrGrrrHr�r�)N�startN)rOzFrequency | NonerGz!Literal['s', 'e', 'start', 'end']r�r�r�r�)rOr�r�r�r�r�)rhrH)rPr�r�r�)rMz'ArrayLike | tuple[ArrayLike, ArrayLike]r�rr�zSeries | tuple[Series, Series])NNr)r�rr�zfloat | Noner�rsr�r�)r�rsr�r�)r�r�r�rsrQrHr<rH)r�rsr�rHrQrHr�rH)rFT)rTF)r�rrQrHr<rH)NTFr)r�rrQrHr<rHr�r�)NTr�F)r�rrQrHrVr�r<rH)NT)r�rrQrH)�r��
__module__�__qualname__�__doc__�_typr[rLr�r��_HANDLED_TYPES�__annotations__r�rU�_internal_names_set�
_accessorsrDru�
_hidden_attrs�	frozenset�__pandas_priority__�property�hasnans�fgetrr�r�r�r�r�rrrr�r
r��setterr�r�r�r"rRrrr!r+r2r�rM�	__float__r��__int__r�r7r<rNrJrErIrBr�rxr{r�rwr�r�r�r�r�r�rur|r�rr�r�r�r%�_shared_doc_kwargsrfrr�r�r�r�r$r�r�r�r�r
r�r�rr�r)r-r1r7rTrXr\rarcrnrqrvr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��_agg_see_also_doc�_agg_examples_docr�r�r�r�r�r�r�r#rr�rr�r�rkrmrr rr$r+r@r?rCrArFrrPrTrUr��	_AXIS_LENrVrWr�AxisPropertyr�rJrir�rYr�rOr��pandas�plotting�PlotAccessorrXrPr�rNrYrMr��hist_series�histrfrkrmrirtrar{rH�
make_flex_docr|r�r�r�r�r�r�r�r��subtractr�r��multiplyr�r��div�divider��rdivr�r�r�r�r�r�r�r�r�rVr�r�r�r�rr�r�r�r�r�r�r�r��kurtosis�productr�r�r�r��
__classcell__)r�s@r�r�r�sD&���_�B�D��^�R�Z�Z�8�N��O�#�9�I�y�$�"�F�+�g�.I�.I�I��/�J����(�(�7�+@�+@�@�9�R�=�P����
����"�"�'�'����&�&�.�.��G�
����"�
� �),���X��	X��
X�'�X�
�X�vSW�1��1�$0�1�@O�1�j����&�����/��&��&��
��
������/��/�b
�[�[�1��1��'+��'+�R�+��+�B�%��%��d� � �&�&�.�.�/�
�(��0�(�"�H�69�vGK�9�)�9�8C�9�	�9�zKO�
�$�u�%�I��S�!�G�
�����&�:#�x'�R*�(Y�'"�Rj4�X9�8�@4�$�%�<�:��:���3�
�	?�QV�
��
�37�
�IM�
�	
�
�F8
�t� �	� #��"%�!$�	��	��		�
�	� �
	��	�
�	��	�� �	�
�"%�!$�	��	��		�
�	� �
	��	�
�	��	�� �	���!$�	��	��		�
�	��
	��	�
�	��	�$(�U���n�n��!&�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�'
�
�'
��'
��	'
�
/�'
�
�'
�?�>'
�V1�@�"��>��	����
�,/����
$��V�H�9��!�)(��)(�
�	)(��)(�V),���&8�R@D��!��1<��	��&��P
�R	
�T�j�l�9�%�(:�:�;���#'����),����
��
�!�	
�
�
��

��
�'�
��
�
�
�<�kT�l
�F9�*:,�x? �B��"%� ���� �	�
��
�
����"%�TW����0=��MQ��	
����
�"%�s�QT����04��JN��	����!��"�_��_��	_�
�_�
�
_�BN>�`Q�fR�h$
�L�EH����-B��	����
�03��)��-��
�	����58�/2��1��-��
�	���58�/7�>"�1�>"�-�>"�
�	>"�F%.�"&�	V
��V
�"�V
� �	V
�

�V
�v#'��	.
��.
� �.
��	.
�

�.
�`	�����)
�+
�	0�b'
�c0�b'
�R+8�ZL@�\�-�	��	�	�	(�	(��9�
*0�%)�	V�3�V�'�V�#�	V�

(�V�:�V�OT�
�'+�
�GK�
�"	��Y���;
�=	
�|!��)�AA�J� � �!2�

��
��
��	
�
�
��

�
�
�EA�D
�('+�	gY� �gY�7�gY�$�	gY�

�gY�RCC�J^$�F��+.�"%��"%� �����)�	�
 ���
� ������
������+.��"%� �����)�	�
���
� ������
������+.���"%� �����)�	�
���
� ������
���� �+/��$�"(�"�#'�G��G�)�	G�
�G��
G� �G��G�!�G�
�G�R���+.��"%�"� ��
��
��	
�
)�
��

��
� �
��
��
��
�
�
��
����+.�"%��"%�"� ��
��
��	
�
)�
� �

��
� �
��
��
��
�
�
��
����+.���"%�"� ��
��
��	
�
)�
��

��
� �
��
��
��
�
�
��
�$�#'�+/��$�"(�#�"�#'�O
��O
�!�	O
�
)�O
��
O
��O
� �O
��O
��O
�!�O
�
�O
�f�$���G8��G8��G8��	G8�
�G8�
�
G8�TCJ�bF��bF� ?�bF�	�bF�JCJ�aG��aG� ?�aG�	�aG�F	� ��)��

S�
� �2
�4
�%G�RAE���� %��2=��	��QG�P�4+�ZBR�L�&*��	36��36�$�36��	36�

�36�v/3�S
�
(�S
�,�S
�
�	S
�j��	����	���,	��[�!� ��)�
��
'�"�"��
��
��C���[�!� ��)�
��
'��/0����'+��	���
� /2�n�n� "�	G�,4�
G��G�,�G��	G�)�
G�
�G�RJ��J�-�J��	J�

�J�,��,/�
� ��!�!�
�(�
��	
�
�
��
��
��
�
�
��
��,/�
� ��"%�!�!�
�(�
��	
�
�
� �
��
��
�
�
��
��,/�
� ���!�!�
�(�
��	
�
�
��
��
��
�
�
��
�,0�hE�!� ��"�&�hE�(�hE��	hE�
�hE��
hE��hE��hE�
�hE�T�	��$� ��)�*�+<�=������g���&�&�'�
� �>��	>�
�>�
�
>�(��%�4>�	���� ��)�+�,>�?���
�!�'+� �"�$(� ��
��	
�
%�
��

��
�"�
��
�
�
��

�,�.1�	����
	�*�	�
�	��
	��	�
�	��	��.1�	����"%�	�*�	�
�	��
	� �	�
�	��	��.1�	�����	�*�	�
�	��
	��	�
�	��	�	��	�	��.1�^�^�
��n�n����
�*�
�
�
��

��
�
�
��
�"�!����!�!�!�����	�
���
�������
�����!����!�!�"%�!�����	�
���
��� ����
�����!����!�!��!�����	�
���
�������
����%)�i
��#'�%)�"��%�i
�!�i
��	i
�
!�i
�#�
i
��i
��i
��i
�
�i
�V&�6	��-�,�-� $�"�#�*.� �


��

��

��	

�
(�

��


�
�

�.�

� �,4�lL
�dBH�	[�?�	[�

�[�zq�
�q�
�q�h	����/��8�9�"�:�"�	����/��8�9� �:� �	����0��9�:��;��	����0��9�:�!�;�!���"%� � �
��� �	�
���
�
������ � �
����	�
���
�
������!�"�
]��]��	]�
�]��
]�
�]�H"&�18� �	F��F�/�F��	F�

�F�P2�l8?�i�L�3�?��L�!�I�$%��z�%�(/�O�%�/�#�J�#�#�
�&
�)
�E�\��
�
.�C�	��<�	=�B�
�� 3�
4�C��&�&�/�/�">�">�?�D�
�H�n�
5�F�
�H�n�
5�F��&�,�/�D��?�?�&�&�D�
A�A�A��>!�B$�=�$�EM�$�	'�$�L04��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��'7�R�h�u�1�%�&�
���
��
��	
�
�
�
�
�'�
�&�h�u�1�%�&����	
��
��
��	
�
�

�'�
�$	��%�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�	��)�Q�	� �D�!�Dr�)�r�
__future__r�collections.abcrrrrrrq�textwrapr�typingr	r
rrr
rrr�r��numpyr��pandas._configrr�pandas._config.configr�pandas._libsrrr�pandas._libs.libr�
pandas.compatr�pandas.compat._constantsr�pandas.compat._optionalr�pandas.compat.numpyrr��
pandas.errorsrrrrrr 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.commonr1r2r3r4r5r6r7r8�pandas.core.dtypes.dtypesr9r:r;�pandas.core.dtypes.genericr<r=�pandas.core.dtypes.inferencer>�pandas.core.dtypes.missingr?r@rArB�pandas.corerCrDrEr�rFrGrHrI�pandas.core.accessorrJ�pandas.core.applyrK�pandas.core.arraysrL�pandas.core.arrays.arrowrMrN�pandas.core.arrays.categoricalrO�pandas.core.arrays.sparserP�pandas.core.arrays.string_rQ�pandas.core.constructionrRr/rSrT�pandas.core.genericrUrV�pandas.core.indexersrWrX�pandas.core.indexes.accessorsrY�pandas.core.indexes.apirZr[r\r]r^r_�pandas.core.indexes.base�core�indexesr��pandas.core.indexes.multir`�pandas.core.indexingrarb�pandas.core.internalsrcrd�pandas.core.methodsre�pandas.core.shared_docsrf�pandas.core.sortingrgrh�pandas.core.strings.accessorri�pandas.core.tools.datetimesrj�pandas.io.formats.format�io�formats�formatr��pandas.io.formats.inforkrlrm�pandas.plottingr�pandas._libs.internalsrn�pandas._typingrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr�rr��__all__rr�rur�r�r�r��<module>rbs����#����
���������.���
.��.�>�.������5���5���	�	�	���
�5������0�)�-��?�4�2���
��I���)�(�6���(�0��7�3�&�&���
��6�!�!�!�!�!�!�!�!�!�F,�9��*��
�
�'�
F�A�������(�<`cD�T�
�
��`cDr�

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists