
    Mhh                   l   S SK Jr  S SKJrJrJr  S SKJrJrJr  S SK	r	S SK
rS SKJrJr  S SKJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJ r J!r!J"r"  S SK#J$r$  S SK%J&r&  S S	K'J(r(  S S
K)J*r*  S SK+J,r,J-r-J.r.J/r/J0r0J1r1  S SK2J3r3J4r4J5r5  S SK6J7r7  S SK8J9r:  S SK;J<r<  S SK=J>s  J?r@  S SKAJBrB  S SKCJDrDJErE  \(       a&  S SKFJGrG  S SKHJIrIJJrJJKrKJLrLJMrMJNrNJOrOJPrP  S SKQJRrR  S SK8JSrS  SrT\S+S,S jj5       rU\S+S-S jj5       rU S.     S/S jjrUS0S1S jjrV " S S\:R                  \:R                  5      rYSSSSSSS.             S2S  jjrZ          S3S! jr[    S4         S5S" jjr\S0S6S# jjr]S7S$ jr^S% r_ S8     S9S& jjr`        S:S' jra      S;S( jrb    S<S) jrc          S=S* jrdg)>    )annotations)datetime	timedeltatzinfo)TYPE_CHECKINGcastoverloadN)libtslib)
BaseOffsetNaTNaTType
Resolution	Timestampastype_overflowsafefieldsget_resolutionget_supported_dtypeget_unit_from_dtypeints_to_pydatetimeis_date_array_normalizedis_supported_dtypeis_unitlessnormalize_i8_timestamps	timezones	to_offsettz_convert_from_utctzconversion)abbrev_to_npy_unit)PerformanceWarning)find_stack_level)validate_inclusive)DT64NS_DTYPEINT64_DTYPEis_bool_dtypeis_float_dtypeis_string_dtypepandas_dtype)DatetimeTZDtypeExtensionDtypePeriodDtype)isna)datetimelike)generate_regular_range)get_period_alias)DayTick)Iterator)	ArrayLikeDateTimeErrorChoicesDtypeObjIntervalClosedTypeSelfTimeAmbiguousTimeNonexistentnpt	DataFramePeriodArrayi'  c                    g N tzunits     N/var/www/html/env/lib/python3.13/site-packages/pandas/core/arrays/datetimes.pytz_to_dtyperF   ]           c                    g r@   rA   rB   s     rE   rF   rF   b   rG   rH   c                N    U c  [         R                  " SU S35      $ [        XS9$ )z
Return a datetime64[ns] dtype appropriate for the given timezone.

Parameters
----------
tz : tzinfo or None
unit : str, default "ns"

Returns
-------
np.dtype or Datetime64TZDType
M8[]rB   )npdtyper)   rB   s     rE   rF   rF   g   s+     
zxx#dV1&&"00rH   c                >   ^ U4S jnXl         X#l        [        U5      $ )Nc                ~  > U R                  5       nTU R                  ;   a  TR                  S5      (       ap  U R                  nSnU(       a.  UR                  nUR                  SUR                  SS5      5      n[        R                  " UTU R                  X0R                  S9nU$ [        R                  " UTU R                  S9nU$ TU R                  ;   a2  [        R                  " UTU R                  S9nU R                  US S9nU$ [        R                  " UTU R                  S9nU R                  US SS9nU$ )	N)startend   startingMonthmonthreso
fill_valuefloat64)rY   convert)_local_timestamps	_bool_opsendswithfreqkwdsgetr   get_start_end_fieldfreqstr_cresoget_date_field_object_opsget_date_name_field_maybe_mask_results)selfvaluesr_   month_kwr`   resultfields         rE   f_field_accessor.<locals>.f}   s,   '')DNN" ~~.//yy99D#xx'29NOH33E4<< M  ..vu4;;O MD$$$//DKKPF--f-FF  **65t{{KF--4 . F rH   )__name____doc__property)namerm   	docstringrn   s    `  rE   _field_accessorru   |   s     D JIA;rH   c            	      &  ^  \ rS rSr% SrSr\R                  " SS5      r\	\R                  4r
S rSr\S|S j5       r/ S	QrS
\S'   SS/rS
\S'   / SQrS
\S'   / SQrS
\S'   \\-   \-   \-   S/-   rS
\S'   / SQrS
\S'   SrS\S'   SrS\S'   \r\S}S j5       r\S 5       r\S\4       S~U 4S jjj5       r\SS S!.SS" jj5       r\SS \R@                  \R@                  S S S#S$.           SS% jj5       r!\     SSS&.             SS' jjj5       r"SS( jr#SS) jr$SS* jr%SS+ jr&\SS, j5       r'\SS- j5       r(\(RR                  S. 5       r(\SS/ j5       r*\SS0 j5       r+\SS1 j5       r,SSU 4S2 jjjr-SS3 jr.SSU 4S4 jjjr/SSS5.   SS6 jjr0SS7 jr1SS8 jr2SS9 jr3SS: jr4SS; jr5\6Rn                    S     SS< jj5       r8SS= jr9SS> jr:SSS? jjr;SSS@ jjr<SSSA jjr=\SSB j5       r>\SSC j5       r?\SSD j5       r@SSE jrA\B" SFSGSH5      rC\B" SISJSK5      rD\B" SLSMSN5      rE\B" SOSPSQ5      rF\B" SRSSST5      rG\B" SUSVSW5      rH\B" SXSYSZ5      rI\B" S[SS\5      rJS]rK\B" S^S_\K5      rL\LrM\LrN\B" S`SaSb5      rO\OrP\B" ScSdSe5      rQ\B" SfSgSh5      rR\RrSSirT\B" SjSj\TR                  SkSl95      rV\B" SmSm\TR                  SnSl95      rW\B" SoSoSp5      rX\B" SqSqSr5      rY\B" SsSsSt5      rZ\B" SuSuSv5      r[\B" SwSwSx5      r\SSy jr]      S     SSz jjr^S{r_U =r`$ )DatetimeArray   a  
Pandas ExtensionArray for tz-naive or tz-aware datetime data.

.. warning::

   DatetimeArray is currently experimental, and its API may change
   without warning. In particular, :attr:`DatetimeArray.dtype` is
   expected to change to always be an instance of an ``ExtensionDtype``
   subclass.

Parameters
----------
values : Series, Index, DatetimeArray, ndarray
    The datetime data.

    For DatetimeArray `values` (or a Series or Index boxing one),
    `dtype` and `freq` will be extracted from `values`.

dtype : numpy.dtype or DatetimeTZDtype
    Note that the only NumPy dtype allowed is 'datetime64[ns]'.
freq : str or Offset, optional
    The frequency.
copy : bool, default False
    Whether to copy the underlying array of values.

Attributes
----------
None

Methods
-------
None

Examples
--------
>>> pd.arrays.DatetimeArray._from_sequence(
...    pd.DatetimeIndex(['2023-01-01', '2023-01-02'], freq='D'))
<DatetimeArray>
['2023-01-01 00:00:00', '2023-01-02 00:00:00']
Length: 2, dtype: datetime64[ns]
datetimearrayr   nsc                ^    [         R                  " U S5      =(       d    [        U [        5      $ NM)r
   is_np_dtype
isinstancer)   )xs    rE   <lambda>DatetimeArray.<lambda>   s&    S__Q%< &
	?A &rH   )r   
datetime64datec                    [         $ r@   )r   ri   s    rE   _scalar_typeDatetimeArray._scalar_type   s    rH   )is_month_startis_month_endis_quarter_startis_quarter_endis_year_startis_year_endis_leap_yearz	list[str]r]   r_   rC   rf   )yearrU   dayhourminutesecondweekday	dayofweekday_of_week	dayofyearday_of_yearquarterdays_in_monthdaysinmonthmicrosecond
nanosecond
_field_ops)r   timetimetz
_other_opsrD   _datetimelike_ops)	to_periodtz_localize
tz_convert	normalizestrftimeroundfloorceil
month_nameday_nameas_unit_datetimelike_methodsi  )np.dtype[np.datetime64] | DatetimeTZDtype_dtypeNBaseOffset | None_freqc               ^    [         R                  " USS9S;  a  [        eU R                  XS9$ )NTskipna)r   r   rN   )r
   infer_dtype
ValueError_from_sequence)clsscalarsrN   s      rE   _from_scalarsDatetimeArray._from_scalars  s2    ??7408RR !!'!77rH   c                :   [        U5      n[        UR                  5        [        U[        R                  5      (       a  UR                  U:w  a  [	        S5      e U$ [        R
                  " UR                  5      S   nX2R                  :w  a  [	        S5      eU$ )Nz'Values resolution does not match dtype.r   )_validate_dt64_dtyperN   r   rM   r   datetime_datarD   )r   rj   rN   vunits       rE   _validate_dtypeDatetimeArray._validate_dtype!  s     %U+V\\*eRXX&&||u$ !JKK %  $$V\\215E

" !JKKrH   c                h  > [        U[        R                  5      (       d   eUR                  S:X  d   e[        U[        R                  5      (       a$  X1R                  :X  d   e[        U5      (       a   eO%UR                  [        UR                  5      :X  d   e[        TU ]%  X5      nX$l
        U$ r|   )r   rM   ndarraykindrN   r   rd   r   super_simple_newr   )r   rj   r_   rN   rl   	__class__s        rE   r   DatetimeArray._simple_new0  s     &"**----zzS   eRXX&&LL((("5))))) <<#6v||#DDDD$V3rH   FrN   copyc               "    U R                  XUS9$ Nr   )_from_sequence_not_strict)r   r   rN   r   s       rE   r   DatetimeArray._from_sequenceE  s    ,,W,MMrH   raise)rN   r   rC   r_   dayfirst	yearfirst	ambiguousc          
        USL n	U[         R                  L a  SnO[        R                  " U5      n[	        U5      n[        X$U	5      nSn
Ub  [        R                  " U5      n
[        R                  " XSS9u  pSn[        U[        5      (       a  UR                  n[        UUUUUUU
S9u  p[        X$U	5        Ub  U	(       a  [        S5      e[        R                  " UR                   5      S   n[#        XM5      nU R%                  XUS9nU
b   XR&                  :w  a  UR)                  U
5      nSU0nUR+                  UU5        U$ )	zL
A non-strict version of _from_sequence, called from DatetimeIndex.__new__.
Nrw   )cls_namer   rC   r   r   r   out_unitz^Passed data is timezone-aware, incompatible with 'tz=None'. Use obj.tz_localize(None) instead.r   r_   rN   r   )r
   
no_defaultr   maybe_get_tzr   _validate_tz_from_dtypedtldtype_to_unit!ensure_arraylike_for_datetimeliker   rw   r_   _sequence_to_dt64r   rM   r   rN   rF   r   rD   r   _maybe_pin_freq)r   datarN   r   rC   r_   r   r   r   explicit_tz_nonerD   inferred_freqsubarr	data_unit
data_dtyperl   validate_kwdss                    rE   r   'DatetimeArray._from_sequence_not_strictI  sP   & :B''+B$U+$U0@A$$U+D::

 dM** IIM&

 	 +;<>.5 
 $$V\\215	 /
:N 3^^D)F$i0t]3rH   rD   c
               0   [         R                  " U5      nUc$  [        S X1U4 5       5      (       a  [        S5      e[        R
                  " XX45      S:w  a  [        S5      e[        U5      nUb  [        U5      nUb  [        U5      nU[        L d	  U[        L a  [        S5      eU
b  U
S;  a  [        S5      eOSn
Ub  UR                  U
S	S
9nUb  UR                  U
S	S
9n[        U	5      u  p[        XU5      u  p[        XU5      nUb  [        XXWU5      n[        X$XWU5      nUGb0  [        U[        5      (       a(  Ub  UR!                  S 5      nUb  UR!                  S 5      n[        U["        5      (       a  [%        XX4U
S9nOH['        XX4U
S9n[(        R*                  " U Vs/ s H  oR,                  PM     sn[(        R.                  S9nUb  UR0                  OUR0                  nUbk  Uch  [2        R4                  " U5      (       d#  [7        U
5      n[8        R:                  " UUUUUS9nUb  UR!                  XWU5      nUb  UR!                  XWU5      nOl[=        [>        U5      n[(        R@                  " SUR,                  UR,                  -
  USS9UR,                  -   nURB                  S:w  a  URE                  S5      nX:X  a  U(       d  U(       d  USS nO[        U5      R,                  n[        U5      R,                  nU(       a  U(       dJ  U(       d  [G        U5      (       a  US   U:X  a  USS  nU(       d  [G        U5      (       a  US   U:X  a  US S nURI                  SU
 S35      n[K        XZS9nU RM                  UUUS9$ s  snf )Nc              3  (   #    U  H  oS L v   M
     g 7fr@   rA   ).0r   s     rE   	<genexpr>0DatetimeArray._generate_range.<locals>.<genexpr>  s     I3HaT	3Hs   z1Must provide freq argument if no data is supplied   zVOf the four parameters: start, end, periods, and freq, exactly three must be specifiedz$Neither `start` nor `end` can be NaT)smsusrz   z+'unit' must be one of 's', 'ms', 'us', 'ns'rz   F)round_okr   )rQ   rR   periodsoffsetrD   r   r   nonexistentcresor   int64i8   zdatetime64[rL   r   )'r   validate_periodsanyr   comcount_not_noner   r   r   r   r"   _maybe_normalize_endpoints_infer_tz_from_endpoints_maybe_localize_pointr   r0   r   r1   r.   _generate_rangerM   array_valuer   rC   r   is_utcr   r   tz_localize_to_utcr   intlinspacerN   astypelenviewrF   r   )r   rQ   rR   r   r_   rC   r   r   r   	inclusiverD   left_inclusiveright_inclusivei8valuesxdrr   endpoint_tzr   start_i8end_i8dt64_valuesrN   s                         rE   r  DatetimeArray._generate_range  sq    &&w/<CIGC3HIIIPQQe'8A=<  e$E?C.CC<3#:CDD22 !NOO 3 DMM$M7E?++dU+3C*<Y*G'/IF
%e"5>)%rkRE'2+NC $$$$!--d3E?//$/C$%%1%gRVW%'T 88s$;s!XXs$;288L&+&7%((SVVK~+"5 ''++ /t4E+>> "+$/# H $!--b[IE?//"EC 3(GAszzELL8'Q,,  ~~% $??40<!/#Ab> '..Hs^**F!%#h--HQK8<S'|H&3x==Xb\V=S'}Hmmk$q$9:B*{UCCi %<s   *Nc                2   [        XR                  5      (       d  U[        La  [        S5      eU R	                  U5        U[        L a+  [
        R                  " UR                  U R                  5      $ UR                  U R                  5      R                  $ )Nz'value' should be a Timestamp.)r   r   r   r   _check_compatible_withrM   r   r  rD   r   asm8ri   values     rE   _unbox_scalarDatetimeArray._unbox_scalar  sm    %!2!233S8H=>>##E*C<==tyy99==+000rH   c                (    [        XR                  S9$ )NrC   )r   rC   r  s     rE   _scalar_from_string!DatetimeArray._scalar_from_string  s    77++rH   c                :    U[         L a  g U R                  U5        g r@   )r   _assert_tzawareness_compat)ri   others     rE   r  $DatetimeArray._check_compatible_with  s    C<''.rH   c                z    UR                  S5      n[        R                  " X R                  U R                  S9nU$ )Nr   )rW   rC   )r  r   _from_value_and_resord   rC   )ri   r   r  tss       rE   	_box_funcDatetimeArray._box_func!  s.    t++EP	rH   c                    U R                   $ )a  
The dtype for the DatetimeArray.

.. warning::

   A future version of pandas will change dtype to never be a
   ``numpy.dtype``. Instead, :attr:`DatetimeArray.dtype` will
   always be an instance of an ``ExtensionDtype`` subclass.

Returns
-------
numpy.dtype or DatetimeTZDtype
    If the values are tz-naive, then ``np.dtype('datetime64[ns]')``
    is returned.

    If the values are tz-aware, then the ``DatetimeTZDtype``
    is returned.
)r   r   s    rE   rN   DatetimeArray.dtype'  s    . {{rH   c                0    [        U R                  SS5      $ )aD  
Return the timezone.

Returns
-------
datetime.tzinfo, pytz.tzinfo.BaseTZInfo, dateutil.tz.tz.tzfile, or None
    Returns None when the array is tz-naive.

Examples
--------
For Series:

>>> s = pd.Series(["1/1/2020 10:00:00+00:00", "2/1/2020 11:00:00+00:00"])
>>> s = pd.to_datetime(s)
>>> s
0   2020-01-01 10:00:00+00:00
1   2020-02-01 11:00:00+00:00
dtype: datetime64[ns, UTC]
>>> s.dt.tz
datetime.timezone.utc

For DatetimeIndex:

>>> idx = pd.DatetimeIndex(["1/1/2020 10:00:00+00:00",
...                         "2/1/2020 11:00:00+00:00"])
>>> idx.tz
datetime.timezone.utc
rC   N)getattrrN   r   s    rE   rC   DatetimeArray.tz@  s    > tzz4..rH   c                    [        S5      e)NzNCannot directly set timezone. Use tz_localize() or tz_convert() as appropriate)AttributeErrorr  s     rE   rC   r2  a  s     -
 	
rH   c                    U R                   $ )z
Alias for tz attribute
r"  r   s    rE   r   DatetimeArray.tzinfoi  s    
 wwrH   c                T    [        U R                  U R                  U R                  S9$ )z>
Returns True if all of the dates are at midnight ("no time")
rV   )r   asi8rC   rd   r   s    rE   is_normalizedDatetimeArray.is_normalizedp  s    
 (		477MMrH   c                T    [        U R                  U R                  U R                  S9$ )NrV   )r   r8  rC   rd   r   s    rE   _resolution_objDatetimeArray._resolution_objw  s    diit{{CCrH   c                R   > Uc  U R                   (       a  [        n[        TU ]  XS9$ r   )rC   objectr   	__array__)ri   rN   r   r   s      rE   r@  DatetimeArray.__array__~  s&    =TWWEw u 88rH   c              #  d  #    U R                   S:  a"  [        [        U 5      5       H	  nX   v   M     gU R                  n[        U 5      n[        nX4-  S-   n[        U5       HE  nX-  n[        US-   U-  U5      n[        X&U U R                  SU R                  S9nU Sh  vN   MG     g N	7f)zL
Return an iterator over the boxed values

Yields
------
tstamp : Timestamp
r   	timestamp)rC   boxrW   N)	ndimranger  r8  _ITER_CHUNKSIZEminr   rC   rd   )	ri   ir   length	chunksizechunksstart_iend_i	converteds	            rE   __iter__DatetimeArray.__iter__  s      99q=3t9%g & 99DYF'I)Q.F6]-QUi/8.'ww#		 %$$ # %s   B"B0$B.%
B0c                `  > [        U5      nXR                  :X  a  U(       a  U R                  5       $ U $ [        U[        5      (       a  [        U[
        5      (       d  [        TU ]  XS9$ U R                  c  [        S5      e[        R                  " UR                  5      n[        U R                  X2S9n[        U 5      R                  XAU R                   S9$ U R                  cs  ["        R$                  " US5      (       aW  ['        U5      (       dG  [)        U5      (       a7  [        U R                  USS9n[        U 5      R                  XDR                  S9$ U R                  b'  ["        R$                  " US5      (       a  [        S5      eU R                  cF  ["        R$                  " US5      (       a*  XR                  :w  a  ['        U5      (       a  [        S5      e[        U[*        5      (       a  U R-                  UR                   S	9$ [.        R0                  R                  XU5      $ )
Nr   zCannot use .astype to convert from timezone-naive dtype to timezone-aware dtype. Use obj.tz_localize instead or series.dt.tz_localize insteadrN   r_   r}   Tr   zCannot use .astype to convert from timezone-aware dtype to timezone-naive dtype. Use obj.tz_localize(None) or obj.tz_convert('UTC').tz_localize(None) instead.z]Casting to unit-less dtype 'datetime64' is not supported. Pass e.g. 'datetime64[ns]' instead.)r_   )r(   rN   r   r   r*   r)   r   r  rC   	TypeErrorrM   strr   _ndarraytyper   r_   r
   r~   r   r   r+   r   r   DatetimeLikeArrayMixin)ri   rN   r   np_dtype
res_valuesr   s        rE   r  DatetimeArray.astype  s   
 U#JJyy{"K~..e_55w~e~77  4  88EII.0T
Dz--jDII-VV GGOs++&&"5)) -T]]EMJ:))*<L<L)MM WW S__UC%@%@ C  GGOs++#E""6 
 {++>>uzz>22))00dCCrH   )na_repdate_formatc                   Uc  U R                   (       a  Sn[        R                  " U R                  U R                  X!U R
                  S9$ )Nz%Y-%m-%d)rC   formatr]  rW   )_is_dates_onlyr   format_array_from_datetimer8  rC   rd   )ri   r]  r^  kwargss       rE   _format_native_types"DatetimeArray._format_native_types  s?     4#6#6$K//II$''+4;;
 	
rH   c                    [        U[        R                  5      (       a  [        U5      n[	        US5      (       d  gUR
                  n[        R                  " U R
                  U5      $ )Nr   F)r   rM   r   r   hasattrr   r   
tz_compare)ri   r'  other_tzs      rE   _has_same_tzDatetimeArray._has_same_tz  sM    eR]]++e$Euh''<<##DKK::rH   c                    [        USS 5      n[        USS 5      n[        U[        5      (       a  UR                  R                  nU[
        L a  g U R                  c  Ub  [        S5      eg Uc  [        S5      eg )Nr   rN   z;Cannot compare tz-naive and tz-aware datetime-like objects.z:Cannot compare tz-naive and tz-aware datetime-like objects)r1  r   r)   rN   rC   r   rU  )ri   r'  ri  other_dtypes       rE   r&  (DatetimeArray._assert_tzawareness_compat  s    5(D1eWd3k?33{{~~HC<WW_#Q  $ L  rH   c                J   [        U[        5      (       a   eU R                  b  U R                  S 5      nOU n UR	                  UR
                  5      nUR                  R                  S:X  a  UR                  UR                  5      n[        U 5      R                  X3R                  S9nUR                  (       a  UR                  5       nS Ul        U R                  b  UR                  U R                  5      nU$ ! [         a    [        R                  " S[         [#        5       S9  U R%                  S5      U-   n[        U 5      R'                  U5      R)                  U R*                  5      n[-        U 5      (       d  UR                  U R                  5      s $  U$ f = f)NrI  r   zCNon-vectorized DateOffset being applied to Series or DatetimeIndex.
stacklevelO)r   r1   rC   r   _apply_arrayrW  rN   r   r  rX  r   r   r   NotImplementedErrorwarningswarnr    r!   r  r   r   rD   r  )ri   r   rj   r[  rl   s        rE   _add_offsetDatetimeArray._add_offset  s`   fd++++77%%d+FF	5,,V__=J$$+ (__V\\:
 $Z++J>N>N+OF))+#ww"++DGG4- # 	3MMU"+-
 S)F2J$Z..z:BB499MFt99))$''22  -	3s   AC> >BF"!F"c                    U R                   b%  [        R                  " U R                   5      (       a  U R                  $ [	        U R                  U R                   U R
                  S9$ )z
Convert to an i8 (unix-like nanosecond timestamp) representation
while keeping the local timezone and not using UTC.
This is used to calculate time-of-day information as if the timestamps
were timezone-naive.
rV   )rC   r   r	  r8  r   rd   r   s    rE   r\   DatetimeArray._local_timestampsC  sF     77?i..tww7799"499dggDKKHHrH   c                    [         R                  " U5      nU R                  c  [        S5      e[	        XR
                  S9nU R                  U R                  X R                  S9$ )a  
Convert tz-aware Datetime Array/Index from one time zone to another.

Parameters
----------
tz : str, pytz.timezone, dateutil.tz.tzfile, datetime.tzinfo or None
    Time zone for time. Corresponding timestamps would be converted
    to this time zone of the Datetime Array/Index. A `tz` of None will
    convert to UTC and remove the timezone information.

Returns
-------
Array or Index

Raises
------
TypeError
    If Datetime Array/Index is tz-naive.

See Also
--------
DatetimeIndex.tz : A timezone that has a variable offset from UTC.
DatetimeIndex.tz_localize : Localize tz-naive DatetimeIndex to a
    given time zone, or remove timezone from a tz-aware DatetimeIndex.

Examples
--------
With the `tz` parameter, we can change the DatetimeIndex
to other time zones:

>>> dti = pd.date_range(start='2014-08-01 09:00',
...                     freq='h', periods=3, tz='Europe/Berlin')

>>> dti
DatetimeIndex(['2014-08-01 09:00:00+02:00',
               '2014-08-01 10:00:00+02:00',
               '2014-08-01 11:00:00+02:00'],
              dtype='datetime64[ns, Europe/Berlin]', freq='h')

>>> dti.tz_convert('US/Central')
DatetimeIndex(['2014-08-01 02:00:00-05:00',
               '2014-08-01 03:00:00-05:00',
               '2014-08-01 04:00:00-05:00'],
              dtype='datetime64[ns, US/Central]', freq='h')

With the ``tz=None``, we can remove the timezone (after converting
to UTC if necessary):

>>> dti = pd.date_range(start='2014-08-01 09:00', freq='h',
...                     periods=3, tz='Europe/Berlin')

>>> dti
DatetimeIndex(['2014-08-01 09:00:00+02:00',
               '2014-08-01 10:00:00+02:00',
               '2014-08-01 11:00:00+02:00'],
                dtype='datetime64[ns, Europe/Berlin]', freq='h')

>>> dti.tz_convert(None)
DatetimeIndex(['2014-08-01 07:00:00',
               '2014-08-01 08:00:00',
               '2014-08-01 09:00:00'],
                dtype='datetime64[ns]', freq='h')
z?Cannot convert tz-naive timestamps, use tz_localize to localizer   rT  )	r   r   rC   rU  rF   rD   r   rW  r_   )ri   rC   rN   s      rE   r   DatetimeArray.tz_convertO  s\    @ ##B'77?Q 
 BYY/UKKrH   c                   SnX4;  a   [        U[        5      (       d  [        S5      eU R                  b8  Uc*  [	        U R
                  U R                  U R                  S9nOM[        S5      e[        R                  " U5      n[        R                  " U R
                  UUUU R                  S9nUR                  SU R                   S35      n[        XR                  S	9nSn[        R                  " U5      (       d"  [!        U 5      S
:X  a   [#        US   5      (       d  U R$                  nOUc  U R                  c  U R$                  nU R'                  XgUS9$ )a4  
Localize tz-naive Datetime Array/Index to tz-aware Datetime Array/Index.

This method takes a time zone (tz) naive Datetime Array/Index object
and makes this time zone aware. It does not move the time to another
time zone.

This method can also be used to do the inverse -- to create a time
zone unaware object from an aware object. To that end, pass `tz=None`.

Parameters
----------
tz : str, pytz.timezone, dateutil.tz.tzfile, datetime.tzinfo or None
    Time zone to convert timestamps to. Passing ``None`` will
    remove the time zone information preserving local time.
ambiguous : 'infer', 'NaT', bool array, default 'raise'
    When clocks moved backward due to DST, ambiguous times may arise.
    For example in Central European Time (UTC+01), when going from
    03:00 DST to 02:00 non-DST, 02:30:00 local time occurs both at
    00:30:00 UTC and at 01:30:00 UTC. In such a situation, the
    `ambiguous` parameter dictates how ambiguous times should be
    handled.

    - 'infer' will attempt to infer fall dst-transition hours based on
      order
    - bool-ndarray where True signifies a DST time, False signifies a
      non-DST time (note that this flag is only applicable for
      ambiguous times)
    - 'NaT' will return NaT where there are ambiguous times
    - 'raise' will raise an AmbiguousTimeError if there are ambiguous
      times.

nonexistent : 'shift_forward', 'shift_backward, 'NaT', timedelta, default 'raise'
    A nonexistent time does not exist in a particular timezone
    where clocks moved forward due to DST.

    - 'shift_forward' will shift the nonexistent time forward to the
      closest existing time
    - 'shift_backward' will shift the nonexistent time backward to the
      closest existing time
    - 'NaT' will return NaT where there are nonexistent times
    - timedelta objects will shift nonexistent times by the timedelta
    - 'raise' will raise an NonExistentTimeError if there are
      nonexistent times.

Returns
-------
Same type as self
    Array/Index converted to the specified time zone.

Raises
------
TypeError
    If the Datetime Array/Index is tz-aware and tz is not None.

See Also
--------
DatetimeIndex.tz_convert : Convert tz-aware DatetimeIndex from
    one time zone to another.

Examples
--------
>>> tz_naive = pd.date_range('2018-03-01 09:00', periods=3)
>>> tz_naive
DatetimeIndex(['2018-03-01 09:00:00', '2018-03-02 09:00:00',
               '2018-03-03 09:00:00'],
              dtype='datetime64[ns]', freq='D')

Localize DatetimeIndex in US/Eastern time zone:

>>> tz_aware = tz_naive.tz_localize(tz='US/Eastern')
>>> tz_aware
DatetimeIndex(['2018-03-01 09:00:00-05:00',
               '2018-03-02 09:00:00-05:00',
               '2018-03-03 09:00:00-05:00'],
              dtype='datetime64[ns, US/Eastern]', freq=None)

With the ``tz=None``, we can remove the time zone information
while keeping the local time (not converted to UTC):

>>> tz_aware.tz_localize(None)
DatetimeIndex(['2018-03-01 09:00:00', '2018-03-02 09:00:00',
               '2018-03-03 09:00:00'],
              dtype='datetime64[ns]', freq=None)

Be careful with DST changes. When there is sequential data, pandas can
infer the DST time:

>>> s = pd.to_datetime(pd.Series(['2018-10-28 01:30:00',
...                               '2018-10-28 02:00:00',
...                               '2018-10-28 02:30:00',
...                               '2018-10-28 02:00:00',
...                               '2018-10-28 02:30:00',
...                               '2018-10-28 03:00:00',
...                               '2018-10-28 03:30:00']))
>>> s.dt.tz_localize('CET', ambiguous='infer')
0   2018-10-28 01:30:00+02:00
1   2018-10-28 02:00:00+02:00
2   2018-10-28 02:30:00+02:00
3   2018-10-28 02:00:00+01:00
4   2018-10-28 02:30:00+01:00
5   2018-10-28 03:00:00+01:00
6   2018-10-28 03:30:00+01:00
dtype: datetime64[ns, CET]

In some cases, inferring the DST is impossible. In such cases, you can
pass an ndarray to the ambiguous parameter to set the DST explicitly

>>> s = pd.to_datetime(pd.Series(['2018-10-28 01:20:00',
...                               '2018-10-28 02:36:00',
...                               '2018-10-28 03:46:00']))
>>> s.dt.tz_localize('CET', ambiguous=np.array([True, True, False]))
0   2018-10-28 01:20:00+02:00
1   2018-10-28 02:36:00+02:00
2   2018-10-28 03:46:00+01:00
dtype: datetime64[ns, CET]

If the DST transition causes nonexistent times, you can shift these
dates forward or backwards with a timedelta object or `'shift_forward'`
or `'shift_backwards'`.

>>> s = pd.to_datetime(pd.Series(['2015-03-29 02:30:00',
...                               '2015-03-29 03:30:00']))
>>> s.dt.tz_localize('Europe/Warsaw', nonexistent='shift_forward')
0   2015-03-29 03:00:00+02:00
1   2015-03-29 03:30:00+02:00
dtype: datetime64[ns, Europe/Warsaw]

>>> s.dt.tz_localize('Europe/Warsaw', nonexistent='shift_backward')
0   2015-03-29 01:59:59.999999999+01:00
1   2015-03-29 03:30:00+02:00
dtype: datetime64[ns, Europe/Warsaw]

>>> s.dt.tz_localize('Europe/Warsaw', nonexistent=pd.Timedelta('1h'))
0   2015-03-29 03:30:00+02:00
1   2015-03-29 03:30:00+02:00
dtype: datetime64[ns, Europe/Warsaw]
)r   r   shift_forwardshift_backwardzoThe nonexistent argument must be one of 'raise', 'NaT', 'shift_forward', 'shift_backward' or a timedelta objectNrV   z,Already tz-aware, use tz_convert to convert.r   rK   rL   r   r   r   rT  )r   r   r   rC   r   r8  rd   rU  r   r   r   r
  r  rD   rF   r	  r  r,   r_   r   )	ri   rC   r   r   nonexistent_options	new_datesnew_dates_dt64rN   r_   s	            rE   r   DatetimeArray.tz_localize  s8   d R1*;
 ;
 %  77z/		477U	 NOO''+B %77		#'kkI ##dii[(:;BYY/BCIN4q@Q;R;R 99DZDGGO99D$GGrH   c                T    [        U R                  U R                  U R                  S9$ )aE  
Return an ndarray of ``datetime.datetime`` objects.

Returns
-------
numpy.ndarray

Examples
--------
>>> idx = pd.date_range('2018-02-27', periods=3)
>>> idx.to_pydatetime()
array([datetime.datetime(2018, 2, 27, 0, 0),
       datetime.datetime(2018, 2, 28, 0, 0),
       datetime.datetime(2018, 3, 1, 0, 0)], dtype=object)
)rC   rW   r   r8  rC   rd   r   s    rE   to_pydatetimeDatetimeArray.to_pydatetimeW  s      "$))dkkJJrH   c                X   [        U R                  U R                  U R                  S9nUR	                  U R
                  R                  5      n[        U 5      R                  X"R                  S9nUR                  S5      nU R                  b  UR                  U R                  5      nU$ )a  
Convert times to midnight.

The time component of the date-time is converted to midnight i.e.
00:00:00. This is useful in cases, when the time does not matter.
Length is unaltered. The timezones are unaffected.

This method is available on Series with datetime values under
the ``.dt`` accessor, and directly on Datetime Array/Index.

Returns
-------
DatetimeArray, DatetimeIndex or Series
    The same type as the original data. Series will have the same
    name and index. DatetimeIndex will have the same name.

See Also
--------
floor : Floor the datetimes to the specified freq.
ceil : Ceil the datetimes to the specified freq.
round : Round the datetimes to the specified freq.

Examples
--------
>>> idx = pd.date_range(start='2014-08-01 10:00', freq='h',
...                     periods=3, tz='Asia/Calcutta')
>>> idx
DatetimeIndex(['2014-08-01 10:00:00+05:30',
               '2014-08-01 11:00:00+05:30',
               '2014-08-01 12:00:00+05:30'],
                dtype='datetime64[ns, Asia/Calcutta]', freq='h')
>>> idx.normalize()
DatetimeIndex(['2014-08-01 00:00:00+05:30',
               '2014-08-01 00:00:00+05:30',
               '2014-08-01 00:00:00+05:30'],
               dtype='datetime64[ns, Asia/Calcutta]', freq=None)
rV   r   infer)r   r8  rC   rd   r  rW  rN   rX  r   
_with_freqr   )ri   
new_valuesr  dtas       rE   r   DatetimeArray.normalizei  s    L -TYYdkkR
 oodmm&9&9:4j$$[8I8I$JnnW%77//$''*C
rH   c                   SSK Jn  U R                  b"  [        R                  " S[
        [        5       S9  Uc  U R                  =(       d    U R                  n[        U R                  [        5      (       a:  [        U R                  S5      (       a  [        U R                  5      R                  nUc  [        S5      e[!        U5      nUc  UnUnUR"                  " U R$                  XR                  S9$ )az  
Cast to PeriodArray/PeriodIndex at a particular frequency.

Converts DatetimeArray/Index to PeriodArray/PeriodIndex.

Parameters
----------
freq : str or Period, optional
    One of pandas' :ref:`period aliases <timeseries.period_aliases>`
    or an Period object. Will be inferred by default.

Returns
-------
PeriodArray/PeriodIndex

Raises
------
ValueError
    When converting a DatetimeArray/Index with non-regular values,
    so that a frequency cannot be inferred.

See Also
--------
PeriodIndex: Immutable ndarray holding ordinal values.
DatetimeIndex.to_pydatetime: Return DatetimeIndex as object.

Examples
--------
>>> df = pd.DataFrame({"y": [1, 2, 3]},
...                   index=pd.to_datetime(["2000-03-31 00:00:00",
...                                         "2000-05-31 00:00:00",
...                                         "2000-08-31 00:00:00"]))
>>> df.index.to_period("M")
PeriodIndex(['2000-03', '2000-05', '2000-08'],
            dtype='period[M]')

Infer the daily frequency

>>> idx = pd.date_range("2017-01-01", periods=2)
>>> idx.to_period()
PeriodIndex(['2017-01-01', '2017-01-02'],
            dtype='period[D]')
r   r=   zNConverting to PeriodArray/Index representation will drop timezone information.rp  _period_dtype_codez8You must pass a freq argument as current index has none.r"  )pandas.core.arraysr>   rC   ru  rv  UserWarningr!   rc   r   r   r_   r   rg  r+   _freqstrr   r/   _from_datetime64rW  )ri   r_   r>   ress       rE   r   DatetimeArray.to_period  s    X 	377MM2+-	 <<<54#5#5D$))Z00W		/6 6 #499-66| N  #4(C {D++DMM4GGLLrH   c                    U R                  5       n[        R                  " USXR                  S9nU R	                  USS9nU$ )uV  
Return the month names with specified locale.

Parameters
----------
locale : str, optional
    Locale determining the language in which to return the month name.
    Default is English locale (``'en_US.utf8'``). Use the command
    ``locale -a`` on your terminal on Unix systems to find your locale
    language code.

Returns
-------
Series or Index
    Series or Index of month names.

Examples
--------
>>> s = pd.Series(pd.date_range(start='2018-01', freq='ME', periods=3))
>>> s
0   2018-01-31
1   2018-02-28
2   2018-03-31
dtype: datetime64[ns]
>>> s.dt.month_name()
0     January
1    February
2       March
dtype: object

>>> idx = pd.date_range(start='2018-01', freq='ME', periods=3)
>>> idx
DatetimeIndex(['2018-01-31', '2018-02-28', '2018-03-31'],
              dtype='datetime64[ns]', freq='ME')
>>> idx.month_name()
Index(['January', 'February', 'March'], dtype='object')

Using the ``locale`` parameter you can set a different locale language,
for example: ``idx.month_name(locale='pt_BR.utf8')`` will return month
names in Brazilian Portuguese language.

>>> idx = pd.date_range(start='2018-01', freq='ME', periods=3)
>>> idx
DatetimeIndex(['2018-01-31', '2018-02-28', '2018-03-31'],
              dtype='datetime64[ns]', freq='ME')
>>> idx.month_name(locale='pt_BR.utf8')  # doctest: +SKIP
Index(['Janeiro', 'Fevereiro', 'Março'], dtype='object')
r   localerW   NrX   r\   r   rg   rd   rh   ri   r  rj   rl   s       rE   r   DatetimeArray.month_name  sJ    b '')++Lkk
 ))&T)BrH   c                    U R                  5       n[        R                  " USXR                  S9nU R	                  USS9nU$ )uK  
Return the day names with specified locale.

Parameters
----------
locale : str, optional
    Locale determining the language in which to return the day name.
    Default is English locale (``'en_US.utf8'``). Use the command
    ``locale -a`` on your terminal on Unix systems to find your locale
    language code.

Returns
-------
Series or Index
    Series or Index of day names.

Examples
--------
>>> s = pd.Series(pd.date_range(start='2018-01-01', freq='D', periods=3))
>>> s
0   2018-01-01
1   2018-01-02
2   2018-01-03
dtype: datetime64[ns]
>>> s.dt.day_name()
0       Monday
1      Tuesday
2    Wednesday
dtype: object

>>> idx = pd.date_range(start='2018-01-01', freq='D', periods=3)
>>> idx
DatetimeIndex(['2018-01-01', '2018-01-02', '2018-01-03'],
              dtype='datetime64[ns]', freq='D')
>>> idx.day_name()
Index(['Monday', 'Tuesday', 'Wednesday'], dtype='object')

Using the ``locale`` parameter you can set a different locale language,
for example: ``idx.day_name(locale='pt_BR.utf8')`` will return day
names in Brazilian Portuguese language.

>>> idx = pd.date_range(start='2018-01-01', freq='D', periods=3)
>>> idx
DatetimeIndex(['2018-01-01', '2018-01-02', '2018-01-03'],
              dtype='datetime64[ns]', freq='D')
>>> idx.day_name(locale='pt_BR.utf8') # doctest: +SKIP
Index(['Segunda', 'Terça', 'Quarta'], dtype='object')
r   r  NrX   r  r  s       rE   r   DatetimeArray.day_name  sJ    b '')++JvKK
 ))&T)BrH   c                L    U R                  5       n[        USU R                  S9$ )aF  
Returns numpy array of :class:`datetime.time` objects.

The time part of the Timestamps.

Examples
--------
For Series:

>>> s = pd.Series(["1/1/2020 10:00:00+00:00", "2/1/2020 11:00:00+00:00"])
>>> s = pd.to_datetime(s)
>>> s
0   2020-01-01 10:00:00+00:00
1   2020-02-01 11:00:00+00:00
dtype: datetime64[ns, UTC]
>>> s.dt.time
0    10:00:00
1    11:00:00
dtype: object

For DatetimeIndex:

>>> idx = pd.DatetimeIndex(["1/1/2020 10:00:00+00:00",
...                         "2/1/2020 11:00:00+00:00"])
>>> idx.time
array([datetime.time(10, 0), datetime.time(11, 0)], dtype=object)
r   rD  rW   r\   r   rd   ri   
timestampss     rE   r   DatetimeArray.timeX  s&    @ ++-
!*&t{{KKrH   c                V    [        U R                  U R                  SU R                  S9$ )a  
Returns numpy array of :class:`datetime.time` objects with timezones.

The time part of the Timestamps.

Examples
--------
For Series:

>>> s = pd.Series(["1/1/2020 10:00:00+00:00", "2/1/2020 11:00:00+00:00"])
>>> s = pd.to_datetime(s)
>>> s
0   2020-01-01 10:00:00+00:00
1   2020-02-01 11:00:00+00:00
dtype: datetime64[ns, UTC]
>>> s.dt.timetz
0    10:00:00+00:00
1    11:00:00+00:00
dtype: object

For DatetimeIndex:

>>> idx = pd.DatetimeIndex(["1/1/2020 10:00:00+00:00",
...                         "2/1/2020 11:00:00+00:00"])
>>> idx.timetz
array([datetime.time(10, 0, tzinfo=datetime.timezone.utc),
datetime.time(11, 0, tzinfo=datetime.timezone.utc)], dtype=object)
r   r  r  r   s    rE   r   DatetimeArray.timetz|  s!    < "$))TWW&t{{SSrH   c                L    U R                  5       n[        USU R                  S9$ )a  
Returns numpy array of python :class:`datetime.date` objects.

Namely, the date part of Timestamps without time and
timezone information.

Examples
--------
For Series:

>>> s = pd.Series(["1/1/2020 10:00:00+00:00", "2/1/2020 11:00:00+00:00"])
>>> s = pd.to_datetime(s)
>>> s
0   2020-01-01 10:00:00+00:00
1   2020-02-01 11:00:00+00:00
dtype: datetime64[ns, UTC]
>>> s.dt.date
0    2020-01-01
1    2020-02-01
dtype: object

For DatetimeIndex:

>>> idx = pd.DatetimeIndex(["1/1/2020 10:00:00+00:00",
...                         "2/1/2020 11:00:00+00:00"])
>>> idx.date
array([datetime.date(2020, 1, 1), datetime.date(2020, 2, 1)], dtype=object)
r   r  r  r  s     rE   r   DatetimeArray.date  s&    B ++-
!*&t{{KKrH   c                    SSK Jn  U R                  5       n[        R                  " X R
                  S9nU" U/ SQSS9nU R                  (       a  SUR                  U R                  '   U$ )a  
Calculate year, week, and day according to the ISO 8601 standard.

Returns
-------
DataFrame
    With columns year, week and day.

See Also
--------
Timestamp.isocalendar : Function return a 3-tuple containing ISO year,
    week number, and weekday for the given Timestamp object.
datetime.date.isocalendar : Return a named tuple object with
    three components: year, week and weekday.

Examples
--------
>>> idx = pd.date_range(start='2019-12-29', freq='D', periods=4)
>>> idx.isocalendar()
            year  week  day
2019-12-29  2019    52    7
2019-12-30  2020     1    1
2019-12-31  2020     1    2
2020-01-01  2020     1    3
>>> idx.isocalendar().week
2019-12-29    52
2019-12-30     1
2019-12-31     1
2020-01-01     1
Freq: D, Name: week, dtype: UInt32
r   r;   rV   )r   weekr   UInt32)columnsrN   N)	pandasr<   r\   r   build_isocalendar_sarrayrd   _hasnailoc_isnan)ri   r<   rj   sarrayiso_calendar_dfs        rE   isocalendarDatetimeArray.isocalendar  s_    @ 	%'')00kkJ#38
 ;;04O  -rH   r   Ya  
        The year of the datetime.

        Examples
        --------
        >>> datetime_series = pd.Series(
        ...     pd.date_range("2000-01-01", periods=3, freq="YE")
        ... )
        >>> datetime_series
        0   2000-12-31
        1   2001-12-31
        2   2002-12-31
        dtype: datetime64[ns]
        >>> datetime_series.dt.year
        0    2000
        1    2001
        2    2002
        dtype: int32
        rU   r}   a  
        The month as January=1, December=12.

        Examples
        --------
        >>> datetime_series = pd.Series(
        ...     pd.date_range("2000-01-01", periods=3, freq="ME")
        ... )
        >>> datetime_series
        0   2000-01-31
        1   2000-02-29
        2   2000-03-31
        dtype: datetime64[ns]
        >>> datetime_series.dt.month
        0    1
        1    2
        2    3
        dtype: int32
        r   Da  
        The day of the datetime.

        Examples
        --------
        >>> datetime_series = pd.Series(
        ...     pd.date_range("2000-01-01", periods=3, freq="D")
        ... )
        >>> datetime_series
        0   2000-01-01
        1   2000-01-02
        2   2000-01-03
        dtype: datetime64[ns]
        >>> datetime_series.dt.day
        0    1
        1    2
        2    3
        dtype: int32
        r   ha  
        The hours of the datetime.

        Examples
        --------
        >>> datetime_series = pd.Series(
        ...     pd.date_range("2000-01-01", periods=3, freq="h")
        ... )
        >>> datetime_series
        0   2000-01-01 00:00:00
        1   2000-01-01 01:00:00
        2   2000-01-01 02:00:00
        dtype: datetime64[ns]
        >>> datetime_series.dt.hour
        0    0
        1    1
        2    2
        dtype: int32
        r   ma  
        The minutes of the datetime.

        Examples
        --------
        >>> datetime_series = pd.Series(
        ...     pd.date_range("2000-01-01", periods=3, freq="min")
        ... )
        >>> datetime_series
        0   2000-01-01 00:00:00
        1   2000-01-01 00:01:00
        2   2000-01-01 00:02:00
        dtype: datetime64[ns]
        >>> datetime_series.dt.minute
        0    0
        1    1
        2    2
        dtype: int32
        r   r   a  
        The seconds of the datetime.

        Examples
        --------
        >>> datetime_series = pd.Series(
        ...     pd.date_range("2000-01-01", periods=3, freq="s")
        ... )
        >>> datetime_series
        0   2000-01-01 00:00:00
        1   2000-01-01 00:00:01
        2   2000-01-01 00:00:02
        dtype: datetime64[ns]
        >>> datetime_series.dt.second
        0    0
        1    1
        2    2
        dtype: int32
        r   r   a  
        The microseconds of the datetime.

        Examples
        --------
        >>> datetime_series = pd.Series(
        ...     pd.date_range("2000-01-01", periods=3, freq="us")
        ... )
        >>> datetime_series
        0   2000-01-01 00:00:00.000000
        1   2000-01-01 00:00:00.000001
        2   2000-01-01 00:00:00.000002
        dtype: datetime64[ns]
        >>> datetime_series.dt.microsecond
        0       0
        1       1
        2       2
        dtype: int32
        r   a  
        The nanoseconds of the datetime.

        Examples
        --------
        >>> datetime_series = pd.Series(
        ...     pd.date_range("2000-01-01", periods=3, freq="ns")
        ... )
        >>> datetime_series
        0   2000-01-01 00:00:00.000000000
        1   2000-01-01 00:00:00.000000001
        2   2000-01-01 00:00:00.000000002
        dtype: datetime64[ns]
        >>> datetime_series.dt.nanosecond
        0       0
        1       1
        2       2
        dtype: int32
        a  
    The day of the week with Monday=0, Sunday=6.

    Return the day of the week. It is assumed the week starts on
    Monday, which is denoted by 0 and ends on Sunday which is denoted
    by 6. This method is available on both Series with datetime
    values (using the `dt` accessor) or DatetimeIndex.

    Returns
    -------
    Series or Index
        Containing integers indicating the day number.

    See Also
    --------
    Series.dt.dayofweek : Alias.
    Series.dt.weekday : Alias.
    Series.dt.day_name : Returns the name of the day of the week.

    Examples
    --------
    >>> s = pd.date_range('2016-12-31', '2017-01-08', freq='D').to_series()
    >>> s.dt.dayofweek
    2016-12-31    5
    2017-01-01    6
    2017-01-02    0
    2017-01-03    1
    2017-01-04    2
    2017-01-05    3
    2017-01-06    4
    2017-01-07    5
    2017-01-08    6
    Freq: D, dtype: int32
    r   dowr   doya  
        The ordinal day of the year.

        Examples
        --------
        For Series:

        >>> s = pd.Series(["1/1/2020 10:00:00+00:00", "2/1/2020 11:00:00+00:00"])
        >>> s = pd.to_datetime(s)
        >>> s
        0   2020-01-01 10:00:00+00:00
        1   2020-02-01 11:00:00+00:00
        dtype: datetime64[ns, UTC]
        >>> s.dt.dayofyear
        0    1
        1   32
        dtype: int32

        For DatetimeIndex:

        >>> idx = pd.DatetimeIndex(["1/1/2020 10:00:00+00:00",
        ...                         "2/1/2020 11:00:00+00:00"])
        >>> idx.dayofyear
        Index([1, 32], dtype='int32')
        r   qax  
        The quarter of the date.

        Examples
        --------
        For Series:

        >>> s = pd.Series(["1/1/2020 10:00:00+00:00", "4/1/2020 11:00:00+00:00"])
        >>> s = pd.to_datetime(s)
        >>> s
        0   2020-01-01 10:00:00+00:00
        1   2020-04-01 11:00:00+00:00
        dtype: datetime64[ns, UTC]
        >>> s.dt.quarter
        0    1
        1    2
        dtype: int32

        For DatetimeIndex:

        >>> idx = pd.DatetimeIndex(["1/1/2020 10:00:00+00:00",
        ...                         "2/1/2020 11:00:00+00:00"])
        >>> idx.quarter
        Index([1, 1], dtype='int32')
        r   dima  
        The number of days in the month.

        Examples
        --------
        >>> s = pd.Series(["1/1/2020 10:00:00+00:00", "2/1/2020 11:00:00+00:00"])
        >>> s = pd.to_datetime(s)
        >>> s
        0   2020-01-01 10:00:00+00:00
        1   2020-02-01 11:00:00+00:00
        dtype: datetime64[ns, UTC]
        >>> s.dt.daysinmonth
        0    31
        1    29
        dtype: int32
        a  
        Indicates whether the date is the {first_or_last} day of the month.

        Returns
        -------
        Series or array
            For Series, returns a Series with boolean values.
            For DatetimeIndex, returns a boolean array.

        See Also
        --------
        is_month_start : Return a boolean indicating whether the date
            is the first day of the month.
        is_month_end : Return a boolean indicating whether the date
            is the last day of the month.

        Examples
        --------
        This method is available on Series with datetime values under
        the ``.dt`` accessor, and directly on DatetimeIndex.

        >>> s = pd.Series(pd.date_range("2018-02-27", periods=3))
        >>> s
        0   2018-02-27
        1   2018-02-28
        2   2018-03-01
        dtype: datetime64[ns]
        >>> s.dt.is_month_start
        0    False
        1    False
        2    True
        dtype: bool
        >>> s.dt.is_month_end
        0    False
        1    True
        2    False
        dtype: bool

        >>> idx = pd.date_range("2018-02-27", periods=3)
        >>> idx.is_month_start
        array([False, False, True])
        >>> idx.is_month_end
        array([False, True, False])
    r   first)first_or_lastr   lastr   a  
        Indicator for whether the date is the first day of a quarter.

        Returns
        -------
        is_quarter_start : Series or DatetimeIndex
            The same type as the original data with boolean values. Series will
            have the same name and index. DatetimeIndex will have the same
            name.

        See Also
        --------
        quarter : Return the quarter of the date.
        is_quarter_end : Similar property for indicating the quarter end.

        Examples
        --------
        This method is available on Series with datetime values under
        the ``.dt`` accessor, and directly on DatetimeIndex.

        >>> df = pd.DataFrame({'dates': pd.date_range("2017-03-30",
        ...                   periods=4)})
        >>> df.assign(quarter=df.dates.dt.quarter,
        ...           is_quarter_start=df.dates.dt.is_quarter_start)
               dates  quarter  is_quarter_start
        0 2017-03-30        1             False
        1 2017-03-31        1             False
        2 2017-04-01        2              True
        3 2017-04-02        2             False

        >>> idx = pd.date_range('2017-03-30', periods=4)
        >>> idx
        DatetimeIndex(['2017-03-30', '2017-03-31', '2017-04-01', '2017-04-02'],
                      dtype='datetime64[ns]', freq='D')

        >>> idx.is_quarter_start
        array([False, False,  True, False])
        r   a  
        Indicator for whether the date is the last day of a quarter.

        Returns
        -------
        is_quarter_end : Series or DatetimeIndex
            The same type as the original data with boolean values. Series will
            have the same name and index. DatetimeIndex will have the same
            name.

        See Also
        --------
        quarter : Return the quarter of the date.
        is_quarter_start : Similar property indicating the quarter start.

        Examples
        --------
        This method is available on Series with datetime values under
        the ``.dt`` accessor, and directly on DatetimeIndex.

        >>> df = pd.DataFrame({'dates': pd.date_range("2017-03-30",
        ...                    periods=4)})
        >>> df.assign(quarter=df.dates.dt.quarter,
        ...           is_quarter_end=df.dates.dt.is_quarter_end)
               dates  quarter    is_quarter_end
        0 2017-03-30        1             False
        1 2017-03-31        1              True
        2 2017-04-01        2             False
        3 2017-04-02        2             False

        >>> idx = pd.date_range('2017-03-30', periods=4)
        >>> idx
        DatetimeIndex(['2017-03-30', '2017-03-31', '2017-04-01', '2017-04-02'],
                      dtype='datetime64[ns]', freq='D')

        >>> idx.is_quarter_end
        array([False,  True, False, False])
        r   a~  
        Indicate whether the date is the first day of a year.

        Returns
        -------
        Series or DatetimeIndex
            The same type as the original data with boolean values. Series will
            have the same name and index. DatetimeIndex will have the same
            name.

        See Also
        --------
        is_year_end : Similar property indicating the last day of the year.

        Examples
        --------
        This method is available on Series with datetime values under
        the ``.dt`` accessor, and directly on DatetimeIndex.

        >>> dates = pd.Series(pd.date_range("2017-12-30", periods=3))
        >>> dates
        0   2017-12-30
        1   2017-12-31
        2   2018-01-01
        dtype: datetime64[ns]

        >>> dates.dt.is_year_start
        0    False
        1    False
        2    True
        dtype: bool

        >>> idx = pd.date_range("2017-12-30", periods=3)
        >>> idx
        DatetimeIndex(['2017-12-30', '2017-12-31', '2018-01-01'],
                      dtype='datetime64[ns]', freq='D')

        >>> idx.is_year_start
        array([False, False,  True])
        r   a{  
        Indicate whether the date is the last day of the year.

        Returns
        -------
        Series or DatetimeIndex
            The same type as the original data with boolean values. Series will
            have the same name and index. DatetimeIndex will have the same
            name.

        See Also
        --------
        is_year_start : Similar property indicating the start of the year.

        Examples
        --------
        This method is available on Series with datetime values under
        the ``.dt`` accessor, and directly on DatetimeIndex.

        >>> dates = pd.Series(pd.date_range("2017-12-30", periods=3))
        >>> dates
        0   2017-12-30
        1   2017-12-31
        2   2018-01-01
        dtype: datetime64[ns]

        >>> dates.dt.is_year_end
        0    False
        1     True
        2    False
        dtype: bool

        >>> idx = pd.date_range("2017-12-30", periods=3)
        >>> idx
        DatetimeIndex(['2017-12-30', '2017-12-31', '2018-01-01'],
                      dtype='datetime64[ns]', freq='D')

        >>> idx.is_year_end
        array([False,  True, False])
        r   a  
        Boolean indicator if the date belongs to a leap year.

        A leap year is a year, which has 366 days (instead of 365) including
        29th of February as an intercalary day.
        Leap years are years which are multiples of four with the exception
        of years divisible by 100 but not by 400.

        Returns
        -------
        Series or ndarray
             Booleans indicating if dates belong to a leap year.

        Examples
        --------
        This method is available on Series with datetime values under
        the ``.dt`` accessor, and directly on DatetimeIndex.

        >>> idx = pd.date_range("2012-01-01", "2015-01-01", freq="YE")
        >>> idx
        DatetimeIndex(['2012-12-31', '2013-12-31', '2014-12-31'],
                      dtype='datetime64[ns]', freq='YE-DEC')
        >>> idx.is_leap_year
        array([ True, False, False])

        >>> dates_series = pd.Series(idx)
        >>> dates_series
        0   2012-12-31
        1   2013-12-31
        2   2014-12-31
        dtype: datetime64[ns]
        >>> dates_series.dt.is_leap_year
        0     True
        1    False
        2    False
        dtype: bool
        c                   [         R                  " U R                  5      n[         R                  " U R                  5      n[         R                  " U R                  5      nUS:  nX==   S-  ss'   X$==   S-  ss'   U[         R
                  " SU-  S-
  S-  5      -   SU-  -   [         R                  " US-  5      -   [         R                  " US	-  5      -
  [         R                  " US
-  5      -   S-   U R                  U R                  S-  -   U R                  S-  -   U R                  S-  S-  -   U R                  S-  S-  -   S-  -   $ )z
Convert Datetime Array to float64 ndarray of Julian Dates.
0 Julian date is noon January 1, 4713 BC.
https://en.wikipedia.org/wiki/Julian_day
r   r   rS      i     im     d   i  g   C:A<   i  i@B i ʚ;   )rM   asarrayr   rU   r   fixr   r   r   r   r   r   )ri   r   rU   r   testarrs        rE   to_julian_dateDatetimeArray.to_julian_date$  sI    zz$))$

4::&jj"!)"ffcEkC'1,-.Dj hhtax ! hhtcz"	#
 hhtcz"#  		++"#++$% ""T)E12 //D(50	1 	
rH   c                   SSK Jn  U R                  R                  R                  R                  SS5      n[        R                  " U5      nUR                  U R                  R                  U5      US9n	U	R                  XXEUS9$ )a
  
Return sample standard deviation over requested axis.

Normalized by `N-1` by default. This can be changed using ``ddof``.

Parameters
----------
axis : int, optional
    Axis for the function to be applied on. For :class:`pandas.Series`
    this parameter is unused and defaults to ``None``.
ddof : int, default 1
    Degrees of Freedom. The divisor used in calculations is `N - ddof`,
    where `N` represents the number of elements.
skipna : bool, default True
    Exclude NA/null values. If an entire row/column is ``NA``, the result
    will be ``NA``.

Returns
-------
Timedelta

See Also
--------
numpy.ndarray.std : Returns the standard deviation of the array elements
    along given axis.
Series.std : Return sample standard deviation over requested axis.

Examples
--------
For :class:`pandas.DatetimeIndex`:

>>> idx = pd.date_range('2001-01-01 00:00', periods=3)
>>> idx
DatetimeIndex(['2001-01-01', '2001-01-02', '2001-01-03'],
              dtype='datetime64[ns]', freq='D')
>>> idx.std()
Timedelta('1 days 00:00:00')
r   )TimedeltaArrayr   timedelta64r   )axisoutddofkeepdimsr   )
r  r  rW  rN   rs   replacerM   r   r  std)
ri   r  rN   r  r  r  r   r  	dtype_strtdas
             rE   r  DatetimeArray.stdG  st    d 	6 MM'',,44\=Q	#((););E)B%(PwwDPVwWWrH   rA   )returnztype[Timestamp])rN   r5   r  r7   )rj   znpt.NDArray[np.datetime64]r_   r   rN   r   r  r7   )r   bool)r   r  r_   z'str | BaseOffset | lib.NoDefault | Noner   r  r   r  r   r8   r  r7   )NFr   r   both)r   
int | Noner   r  r   r8   r   r9   r  r6   rD   
str | Noner  r7   )r  np.datetime64)r  Timestamp | NaTType)r  None)r   r  r  r  )r  r   )r  tzinfo | None)r  r  )r  r   )NN)r  
np.ndarray)r  r2   )T)r]  zstr | floatr  npt.NDArray[np.object_])r   r   r  r7   )r  znpt.NDArray[np.int64])r  r7   )r   r   )r   r8   r   r9   r  r7   )r  r  r@   )r  r>   )r  r<   )r  znpt.NDArray[np.float64])NNNr   FT)r  r  r  r  r   r  )arp   
__module____qualname____firstlineno__rq   _typrM   r   _internal_fill_valuer   _recognized_scalars_is_recognized_dtype_infer_matchesrr   r   r]   __annotations__rf   r   r   r   r   __array_priority__r   r#   _default_dtypeclassmethodr   r   r   r   r
   r   r   r  r  r#  r  r,  rN   rC   setterr   r9  r<  r@  rP  r  rd  rj  r&  rw  r\   r   r   ravel_compatr   r  r   r   r   r   r   r   r   r  ru   r   rU   r   r   r   r   r   r   _dayofweek_docr   r   r   r   r   r   r   r   _is_month_docr`  r   r   r   r   r   r   r   r  r  __static_attributes____classcell__)r   s   @rE   rw   rw      s8   (T D==5#R]]3 8N Iy  %d^K+J	 $ 7J	6[ 9,z9VHD y (9 $ 
 65#E#!N8 8    #';G	*   9	
 
 ( .2 N N 
 >>8;#*A
 A 6A A A !A 
A AF  #*'.(.zD  zD 	zD zD !zD %zD &zD zD 
zD zD~1,/ 	 * / /@ YY
 
   N N D D9 9%:AD ADN (-$	
$	
	 	
	;0%T
IJLX 	 $+'.	vH !vH %	vH
 
vH vHvK$-^IM\7r7r !L !LF T T> "L "LH)V 	D. 	E. 	C. 	D. 	F. 	F. "	K. !	J.!ND "-GKIG!	K: I	G: $	M(  K+MX %*M,@,@w,@,WN #(<(<6(<(RL '%	)T %%	)NT $'	+MX "'	+KX #$	(LT
J :X
 :X :X :X :XrH   rw   Fr   r   c          	        [        XUS9u  p[        U SS5      nUc  Sn[        R                  " SU S35      nU[        :X  d  [        U5      (       a  [        [        R                  U 5      n Sn[        R                  " U SS9S	:X  a   U R                  [        R                  5      n OUbC  US
:X  a=  [        R                  " U [        S9n	[        R                  " U	UUU[        U5      S9n
X4$ [!        U UUSU=(       d    SS9u  pSnU(       a  U(       a  Un
X4$ U(       a  UnUn
X4$ [#        XXS9u  pX4$ U R                  n[%        U[&        5      (       a2  [        [(        U 5      n [+        X R,                  5      nU R.                  n
O[        R0                  " US5      (       aH  [%        U [(        5      (       a  U R.                  n [        [        R                  U 5      n [#        XXS9u  pO_U R                  [2        :w  a   U R                  [        R                  SS9n Sn[        [        R                  U 5      n U R5                  U5      n
U(       a  U
R7                  5       n
[%        U
[        R                  5      (       d   [9        U
5      5       eU
R                  R:                  S:X  d   eU
R                  S:w  d   e[=        U
R                  5      (       d   eX4$ )a  
Parameters
----------
data : np.ndarray or ExtensionArray
    dtl.ensure_arraylike_for_datetimelike has already been called.
copy : bool, default False
tz : tzinfo or None, default None
dayfirst : bool, default False
yearfirst : bool, default False
ambiguous : str, bool, or arraylike, default 'raise'
    See pandas._libs.tslibs.tzconversion.tz_localize_to_utc.
out_unit : str or None, default None
    Desired output resolution.

Returns
-------
result : numpy.ndarray
    The sequence converted to a numpy array with dtype ``datetime64[unit]``.
    Where `unit` is "ns" unless specified otherwise by `out_unit`.
tz : tzinfo or None
    Either the user-provided tzinfo or one inferred from the data.

Raises
------
TypeError : PeriodDType data is passed
r"  rN   Nrz   rK   rL   Fr   integerr   r   )rC   r   r   r   )r   r   allow_objectr   )rC   r   r   r}   rS  M8)maybe_convert_dtyper1  rM   rN   r?  r'   r   r   r
   r   r  r   r  r   array_to_datetime_with_tzr   objects_to_datetime64_construct_from_dt64_naiver   r)   rw   _maybe_infer_tzrC   rW  r~   r$   r  r   rX  r   r   )r   r   rC   r   r   r   r   r   	out_dtypeobj_datarl   rO  inferred_tz_s                 rE   r   r     s   L %TB7JDw-J3xj*+IVz:: BJJ%??4.);;;rxx(D^	W 4zz$f5H44!#(2F :%:!#"!)T&"I Dk # :  " : 74	 :ZZ
 *o..M4(R)	S	)	)dM**==DBJJ%1d
 ::$;;rxxe;4DDBJJ%9%fbjj))74<7)<<###<<4fll++++:rH   c               Z   U R                   n[        U5      (       d  [        U5      n[        XSS9n SnU R                   R                  S:X  a8  U R                  U R                   R                  S5      5      n U R                   nSnUb~  U R                  nU R                  S:  a  U R                  5       n [        U5      n[        R                  " U R                  S5      XUS9n U R                  U5      n U R                  U5      n U R                   U:X  d   U R                   5       eU nXr4$ )zH
Convert datetime64 data to a supported dtype, localizing if necessary.
Fr   ><r   r   )r   r   )rN   r   r   r   	byteorderr  newbyteordershaperE  ravelr   r   r
  r  reshape)r   rC   r   r   	new_dtyper  r   rl   s           rE   r  r  	  s    

Ii(('	2	"4uEzzs" {{4::22378JJ		~ 

99q=::<D'	2	..IIdORI
 yy#||E"::".DJJ."F<rH   c           
     N   US;   d   e[         R                  " U [         R                  S9n [        R                  " U UUUU[        U5      S9u  pxUb  Xx4$ UR                  R                  S:X  a  Xx4$ UR                  [        :X  a  U(       a  Xx4$ [        S5      e[        U5      e)a  
Convert data to array of timestamps.

Parameters
----------
data : np.ndarray[object]
dayfirst : bool
yearfirst : bool
utc : bool, default False
    Whether to convert/localize timestamps to UTC.
errors : {'raise', 'ignore', 'coerce'}
allow_object : bool
    Whether to return an object-dtype ndarray instead of raising if the
    data contains more than one timezone.
out_unit : str, default "ns"

Returns
-------
result : ndarray
    np.datetime64[out_unit] if returned values represent wall times or UTC
    timestamps.
    object if mixed timezones
inferred_tz : tzinfo or None
    If not None, then the datetime64 values in `result` denote UTC timestamps.

Raises
------
ValueError : if data cannot be converted to datetimes
TypeError  : When a type cannot be converted to datetime
)r   ignorecoercer   )errorsutcr   r   r   r}   z!DatetimeIndex has mixed timezones)
rM   r  object_r   array_to_datetimer   rN   r   r?  rU  )	r   r   r   r  r  r  r   rl   	tz_parseds	            rE   r  r  2	  s    N 2222 ::d"**-D// *F    			c	!  		 $$;<< rH   c                   [        U S5      (       d  X4$ [        U R                  5      (       a)  U R                  [        5      R                  S5      n SnX4$ [        R                  " U R                  S5      (       d  [        U R                  5      (       a  [        SU R                   S35      e[        U R                  [        5      (       a  [        S5      e[        U R                  [        5      (       aD  [        U R                  [        5      (       d%  [        R                  " U [        R                   S9n SnX4$ )	a   
Convert data based on dtype conventions, issuing
errors where appropriate.

Parameters
----------
data : np.ndarray or pd.Index
copy : bool
tz : tzinfo or None, default None

Returns
-------
data : np.ndarray or pd.Index
copy : bool

Raises
------
TypeError : PeriodDType data is passed
rN   r   Fr  zdtype z& cannot be converted to datetime64[ns]zFPassing PeriodDtype data is invalid. Use `data.to_timestamp()` insteadr   )rg  r&   rN   r  r#   r  r
   r~   r%   rU  r   r+   r*   r)   rM   r  r  )r   r   rC   s      rE   r  r  |	  s    ( 4!!zdjj!!
 {{<(--d3& :# 
S	)	)]4::-F-F&,RSTT	DJJ	,	, T
 	
 
DJJ	/	/


O9 9 xxBJJ/:rH   c                x    U c  Un U $ Uc   U $ [         R                  " X5      (       d  [        SU SU  35      eU $ )a"  
If a timezone is inferred from data, check that it is compatible with
the user-provided timezone, if any.

Parameters
----------
tz : tzinfo or None
inferred_tz : tzinfo or None

Returns
-------
tz : tzinfo or None

Raises
------
TypeError : if both timezones are present but do not match
zdata is already tz-aware z, unable to set specified tz: )r   rh  rU  )rC   r   s     rE   r  r  	  sd    $ 
z I 
	 I !!"22'} 5!!#&
 	
 IrH   c                   U b  [        U 5      n U [        R                  " S5      :X  a  Sn[        U5      e[	        U [        R                  5      (       a   U R
                  S:w  d5  [        U 5      (       a%  [	        U [        R                  [        45      (       d  [        SU  S35      e[        U SS5      (       aB  [        [        U 5      n [        U R                  [        R                  " U R                  5      S9n U $ )	ac  
Check that a dtype, if passed, represents either a numpy datetime64[ns]
dtype or a pandas DatetimeTZDtype.

Parameters
----------
dtype : object

Returns
-------
dtype : None, numpy.dtype, or DatetimeTZDtype

Raises
------
ValueError : invalid dtype

Notes
-----
Unlike _validate_tz_from_dtype, this does _not_ allow non-existent
tz errors to go through
Nr  zhPassing in 'datetime64' dtype with no precision is not allowed. Please pass in 'datetime64[ns]' instead.r}   zUnexpected value for 'dtype': 'ze'. Must be 'datetime64[s]', 'datetime64[ms]', 'datetime64[us]', 'datetime64[ns]' or DatetimeTZDtype'.rC   )rD   rC   )r(   rM   rN   r   r   r   r   r)   r1  r   rD   r   tz_standardizerC   )rN   msgs     rE   r   r   	  s    , U#BHHTN";  S/! ubhh''s"*<U*C*CEBHHo#>??1% 98 8  5$%% %0E#ZZI$<$<UXX$FE LrH   c                   U b  [        U [        5      (       a   [        R                  " U 5      n [        U SS5      nUb=  Ub&  [        R                  " X5      (       d  [        S5      eU(       a  [        S5      eUnUbE  [        R                  " U S5      (       a)  Ub&  [        R                  " X5      (       d  [        S5      eU$ ! [         a     Nf = f)a  
If the given dtype is a DatetimeTZDtype, extract the implied
tzinfo object from it and check that it does not conflict with the given
tz.

Parameters
----------
dtype : dtype, str
tz : None, tzinfo
explicit_tz_none : bool, default False
    Whether tz=None was passed explicitly, as opposed to lib.no_default.

Returns
-------
tz : consensus tzinfo

Raises
------
ValueError : on tzinfo mismatch
NrC   z-cannot supply both a tz and a dtype with a tzz3Cannot pass both a timezone-aware dtype and tz=Noner}   zHcannot supply both a tz and a timezone-naive dtype (i.e. datetime64[ns]))r   rV  r)   construct_from_stringrU  r1  r   rh  r   r
   r~   )rN   rC   r   dtzs       rE   r   r   

  s    . eS!!'==eD eT4(?~i&:&:2&C&C !PQQ !VWWB>cooeS99 ~i&:&:2&C&C A 
 I/  
 s   C 
CCc                0    [         R                  " X5      n[         R                  " U5      n[         R                  " U5      nUb,  Ub)  [         R
                  " X25      (       d  [        S5      e U$ Ub  UnU$ ! [         a  n[        S5      UeSnAff = f)a{  
If a timezone is not explicitly given via `tz`, see if one can
be inferred from the `start` and `end` endpoints.  If more than one
of these inputs provides a timezone, require that they all agree.

Parameters
----------
start : Timestamp
end : Timestamp
tz : tzinfo or None

Returns
-------
tz : tzinfo or None

Raises
------
TypeError : if start and end timezones do not agree
z>Start and end cannot both be tz-aware with different timezonesNz0Inferred time zone not equal to passed time zone)r   infer_tzinfoAssertionErrorrU  r   rh  )rQ   rR   rC   r   errs        rE   r  r  ?
  s    ,,,U8 ((5K				#B	~+1##K44 !STT 5 I 
	 I!  L
	s   A: :
BBBc                b    U(       a&  U b  U R                  5       n Ub  UR                  5       nX4$ r@   )r   )rQ   rR   r   s      rE   r  r  j
  s1     OO%E?--/C:rH   c                    U bJ  U R                   c=  US:w  a  UOSnX4SS.n[        U[        5      (       d  Uc  X%S'   U R                  " S0 UD6n U $ )a  
Localize a start or end Timestamp to the timezone of the corresponding
start or end Timestamp

Parameters
----------
ts : start or end Timestamp to potentially localize
freq : Tick, DateOffset, or None
tz : str, timezone object or None
ambiguous: str, localization behavior for ambiguous times
nonexistent: str, localization behavior for nonexistent times

Returns
-------
ts : Timestamp
Nr  F)r   r   rC   rC   rA   )r   r   r1   r   )r+  r_   rC   r   r   localize_argss         rE   r  r  w
  s\    , 
~"))+ "+g!5I5	&/SWXdD!!T\"$$^^,m,IrH   c             #    #    [        U5      n[        U 5      n U [        La  U R                  U5      n OSn [        U5      nU[        La  UR                  U5      nOSnU (       a(  UR	                  U 5      (       d  UR                  U 5      n O.U(       a'  UR	                  U5      (       d  UR                  U5      nUc  X:  a  UR                  S:  a  SnSnUc
  XS-
  U-  -   nU c
  XS-
  U-  -
  n [        [        U 5      n [        [        U5      nU nUR                  S:  aP  XQ::  aJ  Uv   XQ:X  a  gUR                  U5      nUR                  U5      nXe::  a  [        SU S35      eUnXQ::  a  MI  ggXQ:  aJ  Uv   XQ:X  a  gUR                  U5      nUR                  U5      nXe:  a  [        SU S35      eUnXQ:  a  MI  gg7f)a:  
Generates a sequence of dates corresponding to the specified time
offset. Similar to dateutil.rrule except uses pandas DateOffset
objects to represent time increments.

Parameters
----------
start : Timestamp or None
end : Timestamp or None
periods : int or None
offset : DateOffset
unit : str

Notes
-----
* This method is faster for generating weekdays than dateutil.rrule
* At least two of (start, end, periods) must be specified.
* If both start and end are specified, the returned dates will
satisfy start <= date <= end.

Returns
-------
dates : generator object
Nr   r   zOffset z did not increment datez did not decrement date)r   r   r   r   is_on_offsetrollforwardrollbacknr   _applyr   )rQ   rR   r   r   rD   cur	next_dates          rE   r  r  
  s    @ vF eECd# C.C
#~kk$V((// ""5)	V((-- ooc" 3;688q=
{ {f,,} {f,,E"E
y#
C
Cxx1}jIz  c*I!))$/I 76(2I!JKKC j jIz  c*I!))$/I 76(2I!JKKC js   E-G1AGG).)rC   r   rD   rV  r  r)   )rC   r  rD   rV  r  znp.dtype[np.datetime64])rz   )rC   r  rD   rV  r  r   r@   )rs   rV  rm   rV  rt   r  )r   r3   r   r  rC   r  r   r  r   r  r   r8   r   r  )
r   r  rC   r  r   r  r   r8   r  ztuple[np.ndarray, bool])Fr   Frz   )
r   r  r  r  r  r4   r  r  r   rV  )r   r  rC   r  )rC   r  r   r  r  r  )F)rC   r  r   r  r  r  )rQ   r   rR   r   rC   r  r  r  )rQ   Timestamp | NonerR   r*  r   r  )r+  r*  r  r*  )
rQ   r*  rR   r*  r   r  r   r   rD   rV  )e
__future__r   r   r   r   typingr   r   r	   ru  numpyrM   pandas._libsr
   r   pandas._libs.tslibsr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   pandas._libs.tslibs.dtypesr   pandas.errorsr    pandas.util._exceptionsr!   pandas.util._validatorsr"   pandas.core.dtypes.commonr#   r$   r%   r&   r'   r(   pandas.core.dtypes.dtypesr)   r*   r+   pandas.core.dtypes.missingr,   r  r-   r   pandas.core.arrays._rangesr.   pandas.core.commoncorecommonr  pandas.tseries.frequenciesr/   pandas.tseries.offsetsr0   r1   collections.abcr2   pandas._typingr3   r4   r5   r6   r7   r8   r9   r:   r  r<   r>   rG  rF   ru   TimelikeOpsDatelikeOpsrw   r   r  r  r  r  r   r   r  r  r  r  rA   rH   rE   <module>rA     s   " 
 
       * : , 4 6  
 , 2 =     7
 (	 	 	 !.  
 
 
 

 $(11 1.1*%T[XCOOS__ [XJ? &{
{ { 		{
 { { { {|)
)*)26)CP))` #*G 
G  
	G 
 !G  G  G T1p<5r 8=220422j(($(*7((V

"2
?C
Bll	l l 	l lrH   