Sindbad~EG File Manager

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

�

Mٜg���
�L�ddlmZddlmZddlmZddlmZddlm	Z	ddl
mZmZm
Z
mZmZmZddlZddlZddlmZmZdd	lmZmZmZmZmZmZdd
lm Z ddl!m"Z"m#Z#ddl$m%Z%dd
l&m'Z'm(Z(m)Z)ddl*m+Z+ddl,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2ddl3m4Z4m5Z5ddl6m7Z7m8Z8ddl9m:Z:m;Z;m<Z<ddl=m>Z>ddl?m@Z@ddlAmBZBddlCmDZDmEZEmFZFddlGmHZHddlImJZJddlKmLZLerddlMmNZNddlOmPZPddlQmRZRddlSmTZTmUZUeeVeWe'fZXeeYeZfZ[ee[eej�fZ]ee]eXfZ^eeVe[eWe[dfe'fZ_Gd�d e
d!�"�Z`Gd#�d$e`d%�"�Zaeead&fZbd'ZcdOdPd(�Zd	dQ							dRd)�Ze										dSd*�Zf	dT							dUd+�Zg	dV							dWd,�Zh							dX															dYd.�Zi										dZd/�Zjd[d0�Zkd1�Zle										d\																					d]d2��Zme										d\																					d^d3��Zme										d\																					d_d4��Zmd-d%d%d%dej�dej�d5d!f
																							d`d6�Zmid7d7�d8d7�d9d9�d:d9�d;d;�d<d;�d=d>�d?d>�d@dA�dBdA�dCdD�dEdD�dFdF�dGdF�dHdF�dIdI�dJdI�dIdKdKdKdL��ZodadM�ZpgdN�Zqy)b�)�annotations)�abc)�date)�partial)�islice)�
TYPE_CHECKING�Callable�	TypedDict�Union�cast�overloadN)�lib�tslib)�OutOfBoundsDatetime�	Timedelta�	Timestamp�astype_overflowsafe�is_supported_dtype�	timezones)�cast_from_unit_vectorized)�DateParseError�guess_datetime_format)�array_strptime)�AnyArrayLike�	ArrayLike�DateTimeErrorChoices)�find_stack_level)�
ensure_object�is_float�
is_integer�is_integer_dtype�is_list_like�is_numeric_dtype)�
ArrowDtype�DatetimeTZDtype)�ABCDataFrame�	ABCSeries)�
DatetimeArray�IntegerArray�NumpyExtensionArray)�unique)�ArrowExtensionArray)�ExtensionArray)�maybe_convert_dtype�objects_to_datetime64�tz_to_dtype)�
extract_array)�Index)�
DatetimeIndex)�Hashable)�NaTType)�UnitChoices)�	DataFrame�Series.c�,�eZdZUded<ded<ded<y)�YearMonthDayDict�DatetimeDictArg�year�month�dayN��__name__�
__module__�__qualname__�__annotations__���F/usr/local/lib/python3.12/site-packages/pandas/core/tools/datetimes.pyr:r:es��
����	�rEr:T)�totalc�h�eZdZUded<ded<ded<ded<ded<ded<ded<ded	<ded
<y)�FulldatetimeDictr;�hour�hours�minute�minutes�second�seconds�ms�us�nsNr?rDrErFrIrIks8��
������
����
�������rErIFr7�2c�
�tj|�x}dk7rit||x}�turSt	||��}|�|Stj||dzd�dk7r$tjdtt���y)N�����dayfirst�z�Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format.��
stacklevel)	r�first_non_null�type�strr�warnings�warn�UserWarningr)�arrrWr[�first_non_nan_element�guessed_formats     rF� _guess_datetime_format_for_arrayrd~s����.�.�s�3�3���:���^�)<�<�%�=��D�2�%���N��)�%�%��#�#�C���(:�(<�$=�>�"�D��
�
�K� �/�1��rEc�j�d}|�3t|�tkryt|�dkrt|�dz}n,d}n)d|cxkrt|�ksJd��Jd��|dk(ryd|cxkrdksJd	��Jd	��	tt||��}t|�||zkDrd}|S#t$rYywxYw)
a
    Decides whether to do caching.

    If the percent of unique elements among `check_count` elements less
    than `unique_share * 100` then we can do caching.

    Parameters
    ----------
    arg: listlike, tuple, 1-d array, Series
    unique_share: float, default=0.7, optional
        0 < unique_share < 1
    check_count: int, optional
        0 <= check_count <= len(arg)

    Returns
    -------
    do_caching: bool

    Notes
    -----
    By default for a sequence of less than 50 items in size, we don't do
    caching; for the number of elements less than 5000, we take ten percent of
    all elements to check for a uniqueness share; if the sequence size is more
    than 5000, then we check only the first 500 elements.
    All constants were chosen empirically by.
    TFi��
i�rz1check_count must be in next bounds: [0; len(arg)]rXz+unique_share must be in next bounds: (0; 1))�len�start_caching_at�setr�	TypeError)�arg�unique_share�check_count�
do_caching�unique_elementss     rF�should_cacherp�s���:�J����s�8�'�'���s�8�t���c�(�b�.�K��K�
��(��C��(�	?�>�	?�(�	?�>�	?�(��!����|��a��N�!N�N��N�!N�N����f�S�+�6�7���?��k�L�8�8��
����	����s�<B&�&	B2�1B2c��ddlm}|t��}|r�t|�s|St	|t
jtttf�stj|�}t|�}t|�t|�krI|||�}	|||d��}|jjs||jj!�}|S#t$r|cYSwxYw)a�
    Create a cache of unique dates from an array of dates

    Parameters
    ----------
    arg : listlike, tuple, 1-d array, Series
    format : string
        Strftime format to parse time
    cache : bool
        True attempts to create a cache of converted values
    convert_listlike : function
        Conversion function to apply on dates

    Returns
    -------
    cache_array : Series
        Cache of converted, unique dates. Can be empty
    r�r8��dtypeF)�index�copy)�pandasr8�objectrp�
isinstance�np�ndarrayr-r2r'�arrayr+rgrru�	is_unique�
duplicated)rk�format�cache�convert_listliker8�cache_array�unique_dates�cache_datess        rF�_maybe_cacher��s���0��v�&�K���C� ����#��
�
�N�E�9�M�N��(�(�3�-�C��c�{���|��s�3�x�'�*�<��@�K�
#�$�[��5�Q���$�$�.�.�)�;�+<�+<�+G�+G�+I�*I�J�����'�
#�"�"�
#�s�C�C�Cc��tj|jd�r|rdnd}t|||��St	|||j��S)a

    Properly boxes the ndarray of datetimes to DatetimeIndex
    if it is possible or to generic Index instead

    Parameters
    ----------
    dt_array: 1-d array
        Array of datetimes to be wrapped in an Index.
    utc : bool
        Whether to convert/localize timestamps to UTC.
    name : string, default None
        Name for a resulting index

    Returns
    -------
    result : datetime of converted dates
        - DatetimeIndex if convertible to sole datetime64 type
        - general Index otherwise
    �M�utcN��tz�name)r�rt)r�is_np_dtypertr3r2)�dt_arrayr�r�r�s    rF�_box_as_indexliker�sA��.���x�~�~�s�+��U�t���X�"�4�8�8����H�N�N�;�;rEc��ddlm}|||jj��j	|�}t|jd|��S)a
    Convert array of dates with a cache and wrap the result in an Index.

    Parameters
    ----------
    arg : integer, float, string, datetime, list, tuple, 1-d array, Series
    cache_array : Series
        Cache of converted, unique dates
    name : string, default None
        Name for a DatetimeIndex

    Returns
    -------
    result : Index-like of converted dates
    rrrrsF�r�r�)rwr8rurt�mapr��_values)rkr�r�r8�results     rF�_convert_and_box_cacher� s=��(�
�C�{�0�0�6�6�
7�
;�
;�K�
H�F��V�^�^��T�B�BrE�raisec	��t|ttf�rtj|d��}n%t|t
�rtj|�}t
|dd�}	|rdnd}
t|	t�rHt|ttf�st||
|��S|r |jd�jd�}|St|	t�r�|	jtur�|r�t|t�r`t!t"|j�}|	j$j&�|j)d�}n|j+d�}t|�}|S|	j$j&�|j)d�}|S|j+d�}|St-j.|	d�r{t1|	�s7t3tj4|�tj6d	�|d
k(��}t|ttf�st||
|��S|r|jd�S|S|�|�t9d��t;|||||�St
|d
d�dkDrt=d��	t?|dtAjB|
���\}}tI|�}|�
tK||��}|�|dk7rtM||||||�StO|||||d��\}}|��tjP|j6�d}t!ttS||��}|jUd|jV�d��}tjX||��}tjX||��St[|||��S#t<$r\|d
k(r?tjdgd��jEtG|��}
t|
|��cYS|dk(rt||��}|cYS�wxYw)a
    Helper function for to_datetime. Performs the conversions of 1D listlike
    of dates

    Parameters
    ----------
    arg : list, tuple, ndarray, Series, Index
        date to be parsed
    name : object
        None or string for the Index name
    utc : bool
        Whether to convert/localize timestamps to UTC.
    unit : str
        None or string of the frequency of the passed data
    errors : str
        error handing behaviors from to_datetime, 'raise', 'coerce', 'ignore'
    dayfirst : bool
        dayfirst parsing behavior from to_datetime
    yearfirst : bool
        yearfirst parsing behavior from to_datetime
    exact : bool, default True
        exact format matching behavior from to_datetime

    Returns
    -------
    Index-like of parsed dates
    �OrsrtNr�r��UTCr�zM8[s]�coerce)�	is_coercez#cannot specify both format and unit�ndimrXzAarg must be a string, datetime, list, tuple, 1-d array, or SeriesF)rvr��NaTzdatetime64[ns]�r��ignorerV�mixedT)rW�	yearfirstr��errors�allow_objectr�M8[�]r�).ry�list�tuplerzr|r*�getattrr%r(r3�
tz_convert�tz_localizer$r\rr2rr,�
pyarrow_dtyper��_dt_tz_convert�_dt_tz_localizerr�rr�asarrayrt�
ValueError�_to_datetime_with_unitrjr.�libtimezones�maybe_get_tz�repeatrgrrd�_array_strptime_with_fallbackr/�
datetime_datar0�view�unit�_simple_newr�)rkrr�r�r�r�rWr��exact�	arg_dtyper��	arg_array�_�npvalues�idxr��	tz_parsed�out_unitrt�dt64_values�dtas                     rF�_convert_listlike_datetimesr�:s���L�#��e�}�%��h�h�s�#�&��	�C�,�	-��h�h�s�m����W�d�+�I���4�B��)�_�-��#�
�}�=�>� ���$�7�7���.�.��&�2�2�5�9�C��
�	�I�z�	*�y�~�~��/J���#�u�%� �!4�c�i�i�@�	��*�*�-�-�9� )� 8� 8�� ?�I� )� 9� 9�%� @�I��I�&���
�	�*�*�-�-�9��,�,�U�3�C��
��-�-�e�4�C��
�	����C�	(�!�)�,�%��
�
�3������!� �H�,�	�C��#�
�}�=�>� ���$�7�7�
��?�?�5�)�)��
�	
�	����B�C�C�%�c�4��s�F�C�C�	��f�a�	 �1�	$��O�
�	
�	�$�S�u��9R�9R�SU�9V�W���Q���
�C�
�~�1�#��I����f��/�,�S�$��V�U�F�S�S�-�������
��F�I����#�#�F�L�L�1�!�4���_�k�)�X�&F�G���k�k�C��
�
�|�1�"5�6���'�'��5�A���(�(��4�8�8��V��4�8�8��I���X���x�x���/?�@�G�G��C��Q�H� ���5�5�
�x�
���$�'�C��J�
��s�$M�AO�)O�?Oc��t|||||��\}}|�ftj|j�d}t	||��}	tj||	��}
|r|
jd�}
t|
|��S|jtk7r8|r6tj|j�d}t|d|�d�|�	�}|St||j|�	�S)
zL
    Call array_strptime, with fallback behavior depending on 'errors'.
    )r�r�r�r)r�r�rsr�r�r�z, UTC])rtr�)
rrzr�rtr%r(r�r�r2rx)rkr�r��fmtr�r�r��tz_outr�rtr��ress            rFr�r��s���$�C��E�&�c�R�N�F�F�
��������-�a�0���6��5���'�'��e�<����.�.��'�C��S�t�$�$�	����	�C�������-�a�0���F�C��v�V�"4�4�@���
���v�|�|�$�7�7rEc	��t|d��}t|t�r|jd|�d��}d}n�t	j
|�}|jjdvr<|jd|�d�d��}	t|t	jd	�d��}d}n�|jjdk(rBt	jd
��5	t||�
�}	ddd�jd	�}d}n2|jtd��}tj |||��\}}|dk(rt#j$||��}n
t'||��}t|t&�s|S|j)d�j+|�}|r0|j,�|j)d�}|S|j+d�}|S#t$r-|d
k(r�|jt�}t|||||�cYSwxYw#t$rB|d
k7r-t|jt�||||�cYcddd�Std|�d���wxYw#1swY��gxYw)zF
    to_datetime specalized to the case where a 'unit' is passed.
    T)�
extract_numpyzdatetime64[r�N�iuF�rvzM8[ns]r��f)�over�r�z cannot convert input with unit '�'�r�r�r�r�r�)r1ryr)�astyperzr�rt�kindrrrxr��errstaterr�r�array_with_unit_to_datetimer2�_with_inferr3r�r�r�)rkr�r�r�r�rar�r�s        rFr�r��s:����4�
0�C��#�|�$��j�j�;�t�f�A�.�/���	��j�j��o���9�9�>�>�T�!��*�*�{�4�&��2��*�?�C�
L�)�#�r�x�x��/A��N���I�
�Y�Y�^�^�s�
"����'�*�	�3�C�d�C�C�+��(�(�8�$�C��I��*�*�V�%�*�0�C�"�>�>�s�D�QW�X�N�C��
����"�"�3�T�2���s��.���f�m�,��
�
�
�
��
&�
1�
1�)�
<�F�
��9�9���'�'��.�F��M��&�&�u�-�F��M��['�
L��W�$���j�j��(��-�c�4��s�F�K�K�	
L��+����(�5��J�J�v�.��d�C�� ��+�*�.�:�4�&��B�����+�*�s<�;!F<�I�
G5�<3G2�1G2�50I�%I�0I�I�I
c���|dk(r�|}td�j�}|dk7rtd��	||z
}tjj�|z
}tj
j�|z
}t
j||kD�st
j||k�rt|�d���|St|�s;t|�s0tt
j|��std|�d	|�d
���	t||��}|j�td|�d���|td�z
}	|	td|��z}
t|�r:t!|t"t$tj&f�st
j|�}||
z}|S#t$r}td�|�d}~wwxYw#t$r}td|�d
��|�d}~wt$r}td|�d��|�d}~wwxYw)a�
    Helper function for to_datetime.
    Adjust input argument to the specified origin

    Parameters
    ----------
    arg : list, tuple, ndarray, Series, Index
        date to be adjusted
    origin : 'julian' or Timestamp
        origin offset for the arg
    unit : str
        passed unit from to_datetime, must be 'D'

    Returns
    -------
    ndarray or scalar of adjusted date(s)
    �julianr�Dz$unit must be 'D' for origin='julian'z3incompatible 'arg' type for given 'origin'='julian'Nz% is Out of Bounds for origin='julian'r�z!' is not compatible with origin='z+'; it must be numeric with a unit specifiedr�zorigin z is Out of Boundsz# cannot be converted to a Timestampzorigin offset z must be tz-naiverX)r�to_julian_dater�rj�max�minrz�anyrr rr#r�r�rr"ryr'r2r{)rk�originr��original�j0�err�j_max�j_min�offset�	td_offset�ioffsets           rF�_adjust_to_originr�&s���$�����
�q�\�
(�
(�
*���3�;��C�D�D�	���(�C��
�
�,�,�.��3���
�
�,�,�.��3��
�6�6�#��+��"�&�&��u��"5�%��*�A�B��
�F�J�;��_���
�2B�2�:�:�c�?�2S���C�5�9�&��B;�;��
�	��v�D�1�F��9�9� ��~�f�X�5F�G�H�H��Y�q�\�)�	��y���6�6�����Z��i���
�
�5S�%T��*�*�S�/�C��G�m���J��Y�	��E���
��	��2#�	T�%���x�7H�&I�J�PS�S���	���&��!D�E���
��	�s;�F�
F/�	F,�F'�'F,�/	G)�8G�G)�G$�$G)c��y�NrD�rkr�rWr�r�rr�r��infer_datetime_formatr�r�s           rF�to_datetimer�n���rEc��yr�rDr�s           rFr�r�r�rEc��yr�rDr�s           rFr�r��r�rE�unixc	���|tjur|dvrtd��|tjurtjdt���|dk(r$tjdtt���|�y|	dk7r
t||	|�}tt||||||�	�}t|t�r6|}|r0|j�|jd
�}|S|jd
�}|St|t�rjt!|||
|�}
|
j"s|j%|
�}|S||j&|�}|j)||j*|j,��}|St|t.t0j2f�rt5|||�}|St|t6�rKt!|||
|�}
|
j"st9||
|j,��}|S||||j,��}|St;|�rk	t=t>t@tBtDtFjHd
t6f|�}t!|||
|�}
|
j"st9|
�}|S||�}|S|tGjR|g�|�d}t|tT�r%t|tFjV�rtU|�}|S#tJ$r|dk(r�ddl&m'}|gtP��}
Y��wxYw)a7:
    Convert argument to datetime.

    This function converts a scalar, array-like, :class:`Series` or
    :class:`DataFrame`/dict-like to a pandas datetime object.

    Parameters
    ----------
    arg : int, float, str, datetime, list, tuple, 1-d array, Series, DataFrame/dict-like
        The object to convert to a datetime. If a :class:`DataFrame` is provided, the
        method expects minimally the following columns: :const:`"year"`,
        :const:`"month"`, :const:`"day"`. The column "year"
        must be specified in 4-digit format.
    errors : {'ignore', 'raise', 'coerce'}, default 'raise'
        - If :const:`'raise'`, then invalid parsing will raise an exception.
        - If :const:`'coerce'`, then invalid parsing will be set as :const:`NaT`.
        - If :const:`'ignore'`, then invalid parsing will return the input.
    dayfirst : bool, default False
        Specify a date parse order if `arg` is str or is list-like.
        If :const:`True`, parses dates with the day first, e.g. :const:`"10/11/12"`
        is parsed as :const:`2012-11-10`.

        .. warning::

            ``dayfirst=True`` is not strict, but will prefer to parse
            with day first.

    yearfirst : bool, default False
        Specify a date parse order if `arg` is str or is list-like.

        - If :const:`True` parses dates with the year first, e.g.
          :const:`"10/11/12"` is parsed as :const:`2010-11-12`.
        - If both `dayfirst` and `yearfirst` are :const:`True`, `yearfirst` is
          preceded (same as :mod:`dateutil`).

        .. warning::

            ``yearfirst=True`` is not strict, but will prefer to parse
            with year first.

    utc : bool, default False
        Control timezone-related parsing, localization and conversion.

        - If :const:`True`, the function *always* returns a timezone-aware
          UTC-localized :class:`Timestamp`, :class:`Series` or
          :class:`DatetimeIndex`. To do this, timezone-naive inputs are
          *localized* as UTC, while timezone-aware inputs are *converted* to UTC.

        - If :const:`False` (default), inputs will not be coerced to UTC.
          Timezone-naive inputs will remain naive, while timezone-aware ones
          will keep their time offsets. Limitations exist for mixed
          offsets (typically, daylight savings), see :ref:`Examples
          <to_datetime_tz_examples>` section for details.

        .. warning::

            In a future version of pandas, parsing datetimes with mixed time
            zones will raise an error unless `utc=True`.
            Please specify `utc=True` to opt in to the new behaviour
            and silence this warning. To create a `Series` with mixed offsets and
            `object` dtype, please use `apply` and `datetime.datetime.strptime`.

        See also: pandas general documentation about `timezone conversion and
        localization
        <https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html
        #time-zone-handling>`_.

    format : str, default None
        The strftime to parse time, e.g. :const:`"%d/%m/%Y"`. See
        `strftime documentation
        <https://docs.python.org/3/library/datetime.html
        #strftime-and-strptime-behavior>`_ for more information on choices, though
        note that :const:`"%f"` will parse all the way up to nanoseconds.
        You can also pass:

        - "ISO8601", to parse any `ISO8601 <https://en.wikipedia.org/wiki/ISO_8601>`_
          time string (not necessarily in exactly the same format);
        - "mixed", to infer the format for each element individually. This is risky,
          and you should probably use it along with `dayfirst`.

        .. note::

            If a :class:`DataFrame` is passed, then `format` has no effect.

    exact : bool, default True
        Control how `format` is used:

        - If :const:`True`, require an exact `format` match.
        - If :const:`False`, allow the `format` to match anywhere in the target
          string.

        Cannot be used alongside ``format='ISO8601'`` or ``format='mixed'``.
    unit : str, default 'ns'
        The unit of the arg (D,s,ms,us,ns) denote the unit, which is an
        integer or float number. This will be based off the origin.
        Example, with ``unit='ms'`` and ``origin='unix'``, this would calculate
        the number of milliseconds to the unix epoch start.
    infer_datetime_format : bool, default False
        If :const:`True` and no `format` is given, attempt to infer the format
        of the datetime strings based on the first non-NaN element,
        and if it can be inferred, switch to a faster method of parsing them.
        In some cases this can increase the parsing speed by ~5-10x.

        .. deprecated:: 2.0.0
            A strict version of this argument is now the default, passing it has
            no effect.

    origin : scalar, default 'unix'
        Define the reference date. The numeric values would be parsed as number
        of units (defined by `unit`) since this reference date.

        - If :const:`'unix'` (or POSIX) time; origin is set to 1970-01-01.
        - If :const:`'julian'`, unit must be :const:`'D'`, and origin is set to
          beginning of Julian Calendar. Julian day number :const:`0` is assigned
          to the day starting at noon on January 1, 4713 BC.
        - If Timestamp convertible (Timestamp, dt.datetime, np.datetimt64 or date
          string), origin is set to Timestamp identified by origin.
        - If a float or integer, origin is the difference
          (in units determined by the ``unit`` argument) relative to 1970-01-01.
    cache : bool, default True
        If :const:`True`, use a cache of unique, converted dates to apply the
        datetime conversion. May produce significant speed-up when parsing
        duplicate date strings, especially ones with timezone offsets. The cache
        is only used when there are at least 50 values. The presence of
        out-of-bounds values will render the cache unusable and may slow down
        parsing.

    Returns
    -------
    datetime
        If parsing succeeded.
        Return type depends on input (types in parenthesis correspond to
        fallback in case of unsuccessful timezone or out-of-range timestamp
        parsing):

        - scalar: :class:`Timestamp` (or :class:`datetime.datetime`)
        - array-like: :class:`DatetimeIndex` (or :class:`Series` with
          :class:`object` dtype containing :class:`datetime.datetime`)
        - Series: :class:`Series` of :class:`datetime64` dtype (or
          :class:`Series` of :class:`object` dtype containing
          :class:`datetime.datetime`)
        - DataFrame: :class:`Series` of :class:`datetime64` dtype (or
          :class:`Series` of :class:`object` dtype containing
          :class:`datetime.datetime`)

    Raises
    ------
    ParserError
        When parsing a date from string fails.
    ValueError
        When another datetime conversion error happens. For example when one
        of 'year', 'month', day' columns is missing in a :class:`DataFrame`, or
        when a Timezone-aware :class:`datetime.datetime` is found in an array-like
        of mixed time offsets, and ``utc=False``.

    See Also
    --------
    DataFrame.astype : Cast argument to a specified dtype.
    to_timedelta : Convert argument to timedelta.
    convert_dtypes : Convert dtypes.

    Notes
    -----

    Many input types are supported, and lead to different output types:

    - **scalars** can be int, float, str, datetime object (from stdlib :mod:`datetime`
      module or :mod:`numpy`). They are converted to :class:`Timestamp` when
      possible, otherwise they are converted to :class:`datetime.datetime`.
      None/NaN/null scalars are converted to :const:`NaT`.

    - **array-like** can contain int, float, str, datetime objects. They are
      converted to :class:`DatetimeIndex` when possible, otherwise they are
      converted to :class:`Index` with :class:`object` dtype, containing
      :class:`datetime.datetime`. None/NaN/null entries are converted to
      :const:`NaT` in both cases.

    - **Series** are converted to :class:`Series` with :class:`datetime64`
      dtype when possible, otherwise they are converted to :class:`Series` with
      :class:`object` dtype, containing :class:`datetime.datetime`. None/NaN/null
      entries are converted to :const:`NaT` in both cases.

    - **DataFrame/dict-like** are converted to :class:`Series` with
      :class:`datetime64` dtype. For each row a datetime is created from assembling
      the various dataframe columns. Column keys can be common abbreviations
      like ['year', 'month', 'day', 'minute', 'second', 'ms', 'us', 'ns']) or
      plurals of the same.

    The following causes are responsible for :class:`datetime.datetime` objects
    being returned (possibly inside an :class:`Index` or a :class:`Series` with
    :class:`object` dtype) instead of a proper pandas designated type
    (:class:`Timestamp`, :class:`DatetimeIndex` or :class:`Series`
    with :class:`datetime64` dtype):

    - when any input element is before :const:`Timestamp.min` or after
      :const:`Timestamp.max`, see `timestamp limitations
      <https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html
      #timeseries-timestamp-limits>`_.

    - when ``utc=False`` (default) and the input is an array-like or
      :class:`Series` containing mixed naive/aware datetime, or aware with mixed
      time offsets. Note that this happens in the (quite frequent) situation when
      the timezone has a daylight savings policy. In that case you may wish to
      use ``utc=True``.

    Examples
    --------

    **Handling various input formats**

    Assembling a datetime from multiple columns of a :class:`DataFrame`. The keys
    can be common abbreviations like ['year', 'month', 'day', 'minute', 'second',
    'ms', 'us', 'ns']) or plurals of the same

    >>> df = pd.DataFrame({'year': [2015, 2016],
    ...                    'month': [2, 3],
    ...                    'day': [4, 5]})
    >>> pd.to_datetime(df)
    0   2015-02-04
    1   2016-03-05
    dtype: datetime64[ns]

    Using a unix epoch time

    >>> pd.to_datetime(1490195805, unit='s')
    Timestamp('2017-03-22 15:16:45')
    >>> pd.to_datetime(1490195805433502912, unit='ns')
    Timestamp('2017-03-22 15:16:45.433502912')

    .. warning:: For float arg, precision rounding might happen. To prevent
        unexpected behavior use a fixed-width exact type.

    Using a non-unix epoch origin

    >>> pd.to_datetime([1, 2, 3], unit='D',
    ...                origin=pd.Timestamp('1960-01-01'))
    DatetimeIndex(['1960-01-02', '1960-01-03', '1960-01-04'],
                  dtype='datetime64[ns]', freq=None)

    **Differences with strptime behavior**

    :const:`"%f"` will parse all the way up to nanoseconds.

    >>> pd.to_datetime('2018-10-26 12:00:00.0000000011',
    ...                format='%Y-%m-%d %H:%M:%S.%f')
    Timestamp('2018-10-26 12:00:00.000000001')

    **Non-convertible date/times**

    Passing ``errors='coerce'`` will force an out-of-bounds date to :const:`NaT`,
    in addition to forcing non-dates (or non-parseable dates) to :const:`NaT`.

    >>> pd.to_datetime('13000101', format='%Y%m%d', errors='coerce')
    NaT

    .. _to_datetime_tz_examples:

    **Timezones and time offsets**

    The default behaviour (``utc=False``) is as follows:

    - Timezone-naive inputs are converted to timezone-naive :class:`DatetimeIndex`:

    >>> pd.to_datetime(['2018-10-26 12:00:00', '2018-10-26 13:00:15'])
    DatetimeIndex(['2018-10-26 12:00:00', '2018-10-26 13:00:15'],
                  dtype='datetime64[ns]', freq=None)

    - Timezone-aware inputs *with constant time offset* are converted to
      timezone-aware :class:`DatetimeIndex`:

    >>> pd.to_datetime(['2018-10-26 12:00 -0500', '2018-10-26 13:00 -0500'])
    DatetimeIndex(['2018-10-26 12:00:00-05:00', '2018-10-26 13:00:00-05:00'],
                  dtype='datetime64[ns, UTC-05:00]', freq=None)

    - However, timezone-aware inputs *with mixed time offsets* (for example
      issued from a timezone with daylight savings, such as Europe/Paris)
      are **not successfully converted** to a :class:`DatetimeIndex`.
      Parsing datetimes with mixed time zones will show a warning unless
      `utc=True`. If you specify `utc=False` the warning below will be shown
      and a simple :class:`Index` containing :class:`datetime.datetime`
      objects will be returned:

    >>> pd.to_datetime(['2020-10-25 02:00 +0200',
    ...                 '2020-10-25 04:00 +0100'])  # doctest: +SKIP
    FutureWarning: In a future version of pandas, parsing datetimes with mixed
    time zones will raise an error unless `utc=True`. Please specify `utc=True`
    to opt in to the new behaviour and silence this warning. To create a `Series`
    with mixed offsets and `object` dtype, please use `apply` and
    `datetime.datetime.strptime`.
    Index([2020-10-25 02:00:00+02:00, 2020-10-25 04:00:00+01:00],
          dtype='object')

    - A mix of timezone-aware and timezone-naive inputs is also converted to
      a simple :class:`Index` containing :class:`datetime.datetime` objects:

    >>> from datetime import datetime
    >>> pd.to_datetime(["2020-01-01 01:00:00-01:00",
    ...                 datetime(2020, 1, 1, 3, 0)])  # doctest: +SKIP
    FutureWarning: In a future version of pandas, parsing datetimes with mixed
    time zones will raise an error unless `utc=True`. Please specify `utc=True`
    to opt in to the new behaviour and silence this warning. To create a `Series`
    with mixed offsets and `object` dtype, please use `apply` and
    `datetime.datetime.strptime`.
    Index([2020-01-01 01:00:00-01:00, 2020-01-01 03:00:00], dtype='object')

    |

    Setting ``utc=True`` solves most of the above issues:

    - Timezone-naive inputs are *localized* as UTC

    >>> pd.to_datetime(['2018-10-26 12:00', '2018-10-26 13:00'], utc=True)
    DatetimeIndex(['2018-10-26 12:00:00+00:00', '2018-10-26 13:00:00+00:00'],
                  dtype='datetime64[ns, UTC]', freq=None)

    - Timezone-aware inputs are *converted* to UTC (the output represents the
      exact same datetime, but viewed from the UTC time offset `+00:00`).

    >>> pd.to_datetime(['2018-10-26 12:00 -0530', '2018-10-26 12:00 -0500'],
    ...                utc=True)
    DatetimeIndex(['2018-10-26 17:30:00+00:00', '2018-10-26 17:00:00+00:00'],
                  dtype='datetime64[ns, UTC]', freq=None)

    - Inputs can contain both string or datetime, the above
      rules still apply

    >>> pd.to_datetime(['2018-10-26 12:00', datetime(2020, 1, 1, 18)], utc=True)
    DatetimeIndex(['2018-10-26 12:00:00+00:00', '2020-01-01 18:00:00+00:00'],
                  dtype='datetime64[ns, UTC]', freq=None)
    >r��ISO8601z8Cannot use 'exact' when 'format' is 'mixed' or 'ISO8601'z�The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.rYr�z�errors='ignore' is deprecated and will raise in a future version. Use to_datetime without passing `errors` and catch exceptions explicitly insteadNr�)r�r�rWr�r�r�r�)rur�r�r8r�rrrrs),r�
no_defaultr�r^r_r�
FutureWarningr�rr�ryrr�r�r�r'r��emptyr�r��_constructorrur�r&r�MutableMapping�_assemble_from_unit_mappingsr2r�r"rrr�r�r-rzr{rrwr8rxr|�bool�bool_)rkr�rWr�r�rr�r�r�r�r�r�r�r��values�argcr8s                 rFr�r��s���n

�C�N�N�"�v�1E�'E��S�T�T��C�N�N�2��
�
�
3�
(�)�
	
�����
�
�
!�
�'�)�	
��{��
�����V�T�2���#��
��������#�y�!�����v�v�!�����.��b�M�_����/��^�M�]
�C��	#�"�3���7G�H��� � ��W�W�[�)�F�V�M�S&�c�k�k�6�:�F��%�%�f�C�I�I�C�H�H�%�M�F�P�M�O
�C�,��(:�(:�;�	<�-�c�6�3�?��L�M�K
�C��	�"�3���7G�H��� � �+�C��3�8�8�L�F�D�M�A&�c�6����A�F�@�M�?
�c�	�	3�
��d�E�>�2�:�:�x��N�O�QT��D�'�t�V�U�<L�M�K�� � �+�D�+�>�F��M�&�d�F�3�F��M�"�"�(�(�C�5�/�6�:�1�=���c�4� �Z�����%A��&�\�F�
�M��+#�	3��� ��%� ��6�2�K�	3�s�=AJ>�>#K$�#K$r<�yearsr=�monthsr>�daysrJ�hrKrL�mrMrN�srOrP�millisecond�millisecondsrQ�microsecondrR)�microsecondsrR�
nanosecond�nanosecondsc�P���ddlm}m�m}||�}|jj
st
d��d�}|j�D�cic]}|||���
}}|j�D��cic]\}}||��
}	}}gd�}
tt|
�t|	j��z
�}t|�r dj|�}t
d|�d���tt|	j��ttj��z
�}
t|
�r dj|
�}t
d	|�d
�����fd�}|||	d�d
z|||	d�dzz|||	d�z}	t|d�|��}gd�}|D]3}|	j#|�}|��||vs�	|||||�|���z
}�5|Scc}wcc}}w#t tf$r}t
d|���|�d}~wwxYw#t tf$r}t
d|�d|���|�d}~wwxYw)a.
    assemble the unit specified fields from the arg (DataFrame)
    Return a Series for actual parsing

    Parameters
    ----------
    arg : DataFrame
    errors : {'ignore', 'raise', 'coerce'}, default 'raise'

        - If :const:`'raise'`, then invalid parsing will raise an exception
        - If :const:`'coerce'`, then invalid parsing will be set as :const:`NaT`
        - If :const:`'ignore'`, then invalid parsing will return the input
    utc : bool
        Whether to convert/localize timestamps to UTC.

    Returns
    -------
    Series
    r)r7�
to_numeric�to_timedeltaz#cannot assemble with duplicate keysc��|tvr	t|S|j�tvrt|j�S|Sr�)�	_unit_map�lower)�values rFr�z'_assemble_from_unit_mappings.<locals>.f�s;���I���U�#�#��;�;�=�I�%��U�[�[�]�+�+��rE)r<r=r>�,zNto assemble mappings requires at least that [year, month, day] be specified: [z] is missingz9extra keys have been passed to the datetime assemblage: [r�c�l���|���}t|j�r|jdd��}|S)Nr��int64Fr�)r!rtr�)r�r�rs ��rFr�z,_assemble_from_unit_mappings.<locals>.coerce�s4����F�6�2���F�L�L�)��]�]�7��]�7�F��
rEr<i'r=�dr>z%Y%m%d)rr�r�zcannot assemble the datetimes: N)r�r�rrPrQrR)r�r�zcannot assemble the datetimes [z]: )rwr7rr	�columnsr}r��keys�items�sortedrirg�joinrr�r�rj�get)rkr�r�r7r	r��kr��v�unit_rev�required�req�	_required�excess�_excessr�r�r��units�ur
rs `                   @rFr�r�qsY���(���C�.�C��;�;� � ��>�?�?��!�X�X�Z�(�Z��A�q��t�G�Z�D�(�!%����.����A��1���H�.�(�H�
��X���X�]�]�_�!5�5�
6�C�
�3�x��H�H�S�M�	��
1�1:��<�
I�
�	
��C��
�
��(�3�y�/?�/?�/A�+B�B�
C�F�
�6�{��(�(�6�"���G��y�PQ�R�
�	
��	�s�8�F�#�$�%��-�
��X�g�&�'�
(�3�
.�	/�
��X�e�_�%�
&�	'��
K��V�H�V��M�� A�E�
�����Q������#��
��,�v�c�%�j�'9��&�Q�Q��	��M��e)��.��H
�z�"�K��:�3�%�@�A�s�J��K���z�*�
� �5�e�W�C��u�E�����
�s<�G�0
G�G�3G?�G<�(G7�7G<�?H%�H � H%)rrpr�)F)rW�bool | None�return�
str | None)gffffff�?N)rk�ArrayConvertiblerl�floatrmz
int | Noner#r�)
rkr%rr$r�r�r�r	r#r8)FN)r�rr�r�r��Hashable | Noner#r2r�)rk� DatetimeScalarOrArrayConvertibler�r8r�r'r#r2)NFNr�NNT)rr$r�r'r�r�r�r$r�rrWr"r�r"r�r�)
r�r�r�r]r�r�r�r]r#r2)r�r�r�r]r#r2)
..........)rk�DatetimeScalarr�rrWr�r�r�r�r�rr$r�r�r�r$r�r�r�r�r#r)rkzSeries | DictConvertibler�rrWr�r�r�r�r�rr$r�r�r�r$r�r�r�r�r#r8)rkz list | tuple | Index | ArrayLiker�rrWr�r�r�r�r�rr$r�r�r�r$r�r�r�r�r#r3)rkz2DatetimeScalarOrArrayConvertible | DictConvertibler�rrWr�r�r�r�r�rr$r�zbool | lib.NoDefaultr�r$r�zlib.NoDefault | boolr�r]r�r�r#z8DatetimeIndex | Series | DatetimeScalar | NaTType | None)r�rr�r�)r�
__future__r�collectionsr�datetimer�	functoolsr�	itertoolsr�typingrr	r
rrr
r^�numpyrz�pandas._libsrr�pandas._libs.tslibsrrrrrrr��pandas._libs.tslibs.conversionr�pandas._libs.tslibs.parsingrr�pandas._libs.tslibs.strptimer�pandas._typingrrr�pandas.util._exceptionsr�pandas.core.dtypes.commonrrr r!r"r#�pandas.core.dtypes.dtypesr$r%�pandas.core.dtypes.genericr&r'�
pandas.arraysr(r)r*�pandas.core.algorithmsr+�pandas.core.arraysr,�pandas.core.arrays.baser-�pandas.core.arrays.datetimesr.r/r0�pandas.core.constructionr1�pandas.core.indexes.baser2�pandas.core.indexes.datetimesr3�collections.abcr4�pandas._libs.tslibs.nattyper5�pandas._libs.tslibs.timedeltasr6rwr7r8r�r�r%r&r]�Scalar�
datetime64r)r(r;r:rI�DictConvertiblerhrdrpr�r�r�r�r�r�r�r�r�rr��__all__rDrErF�<module>rJs6��"������������E��8���
5�����
��
*�2�2���
3�*�7��(�3�:����u�l�2�3��	�u�c�z�	���v�t�R�]�]�2�3��#(��9I�)I�#J� ���V��e�F�C�K�&8�,�F�G���y���	�'�u�	��(�+�5�6�����0QU�9�	�9�).�9�CM�9�	�9�x/�	�/��/��/��	/�
�/�fEI�<��<�"�<�2A�<�
�<�@!�C�	)�C��C��C��	C�:!���#*� �!��K9��K9��K9�
�	K9�
�K9�
!�
K9��K9��K9��K9�\8�
�8�

�	8�
�8�
�
8��8�4A�HE�P
�$'�������"%���
�	�
� �
��
��	
�

�
�
�

��
��
� �
��
��
�
�
� 
�$'�������"%���
�	!�
� �
��
��	
�

�
�
�

��
��
� �
��
��
�
�
� 
�$'�������"%���
�	)�
� �
��
��	
�

�
�
�

��
��
� �
��
��
�
�
�$$+�����"%�.�.��25�.�.���s�	;�s� �s��s��	s�

�s�
�
s� �s��s�0�s�
�s��s�>�s�n

�
�F�
��V�
��W�
�
�g�	
�

�5�
��E�

��C�
��S�
�
�c�
��s�
�
�c�
��s�
�	�$�
��4�
��D�
� 	�$�!
�"�4�#
�$�
���+
�	�2[�|�rE

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