zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
U
¬ý°dXã@sÊddlmZddlmZmZmZmZddlmZmZm    Z    ddl
Z
ddl Z ddl mZmZddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$ddl%m&Z&ddl'm(Z(m)Z)m*Z*m+Z+m,Z,dd    l-m.Z.dd
l/m0Z0dd l1m2Z2dd l3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBdd lCmDZDmEZEddlFmGZGddlHmIZJddlKmLZLddlMmNmOZPddlQmRZRddlSmTZTmUZUerÀddlVmWZWddlHmXZXeddƒZYdGdddœdd„ZZdHdddœdd„Z[Gdd„deJj\eJj]ƒZ^d dd d d!dd"œd#dd#d#d$d%d"œd&d'„Z_dId(d#d)d#d*œd+d,„Z`dJd#dd-œd.d/„Zadddd0œd1d2„Zbd3d4„ZcdKdd#dd5œd6d7„Zdd8d8ddd9œd:d;„Zed<d<d#d=œd>d?„Zfd@dA„Zgd<d<dBdCddDœdEdF„ZhdS)Lé)Ú annotations)ÚdatetimeÚtimeÚ    timedeltaÚtzinfo)Ú TYPE_CHECKINGÚIteratorÚcastN)ÚlibÚtslib)Ú
BaseOffsetÚNaTÚNaTTypeÚ
ResolutionÚ    TimestampÚastype_overflowsafeÚfieldsÚget_resolutionÚget_supported_resoÚget_unit_from_dtypeÚints_to_pydatetimeÚis_date_array_normalizedÚis_supported_unitÚ is_unitlessÚnormalize_i8_timestampsÚnpy_unit_to_abbrevÚ    timezonesÚ    to_offsetÚtz_convert_from_utcÚ tzconversion)Úabbrev_to_npy_unit)ÚDateTimeErrorChoicesÚIntervalClosedTypeÚ TimeAmbiguousÚTimeNonexistentÚnpt)ÚPerformanceWarning)Úfind_stack_level)Úvalidate_inclusive)Ú DT64NS_DTYPEÚ INT64_DTYPEÚ is_bool_dtypeÚis_datetime64_any_dtypeÚis_datetime64_dtypeÚis_datetime64tz_dtypeÚis_dtype_equalÚis_extension_array_dtypeÚis_float_dtypeÚis_object_dtypeÚis_period_dtypeÚ    is_sparseÚis_string_dtypeÚis_timedelta64_dtypeÚ pandas_dtype)ÚDatetimeTZDtypeÚExtensionDtype)Úisna)Ú datetimelike)Úgenerate_regular_range)Úget_period_alias)ÚDayÚTick©Ú    DataFrame©Ú PeriodArrayÚnsú tzinfo | NoneÚstr©ÚtzÚunitcCs*|dkrt d|›d¡St||dSdS)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
    NúM8[ú]rG)ÚnpÚdtyper8rG©rNúSd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\pandas/core/arrays/datetimes.pyÚ tz_to_dtype`s rP)ÚnameÚfieldcs ‡fdd„}||_||_t|ƒS)NcsÆ| ¡}ˆ|jkrtˆ d¡r^|j}d}|rD|j}| d| dd¡¡}tj|ˆ|j||j    d}ntj
|ˆ|j    d}|Sˆ|j kr tj |ˆ|j    d}|j |dd}n"tj
|ˆ|j    d}|j |ddd}|S)    N)ÚstartÚendé Z startingMonthÚmonth©Úreso©Ú
fill_valueÚfloat64)rZÚconvert)Ú_local_timestampsÚ    _bool_opsÚendswithÚfreqÚkwdsÚgetrZget_start_end_fieldÚfreqstrÚ_cresoZget_date_fieldÚ _object_opsÚget_date_name_fieldÚ_maybe_mask_results)ÚselfÚvaluesr`Zmonth_kwraÚresult©rRrNrOÚfts6
 
ÿ
ÿz_field_accessor.<locals>.f)Ú__name__Ú__doc__Úproperty)rQrRZ    docstringrlrNrkrOÚ_field_accessorss "rpcs¶eZdZUdZdZe dd¡ZeejfZ    e
Z dZ e ddœdd    „ƒZd
d d d dddgZded<ddgZded<ddddddddddd d!d"d#d$d%gZded&<d'd(d)gZded*<eeeed+gZded,<d-d.d/d0d1d2d3d4d5d6d7g Zded8<d9Zd:ed;<d<Zd=ed><eZed?d@„ƒZed<efdAd=ddBœ‡fdCdD„ ƒZed<dEdFœdGdHœdIdJ„ƒZed<dEejejdEdEdKdLœdGdMdGdGdNdOœdPdQ„ƒZ edËd<dSœdGdNdTdUdVddWœdXdY„ƒZ!dZdœd[d\„Z"d]dœd^d_„Z#d`dœdadb„Z$dZd]dcœddde„Z%e d:dœdfdg„ƒZ&e dhdœdidj„ƒZ'e'j(dkdj„ƒZ'e dhdœdldm„ƒZ)e dGdœdndo„ƒZ*e dpdœdqdr„ƒZ+dÌdAdœ‡fdsdt„ Z,dudœdvdw„Z-dÍdGdHœ‡fdydz„ Z.dd<d{œd|d}d~œdd€„Z/dGdœdd‚„Z0d`dœdƒd„„Z1ddœd…d†„Z2d‡dœdˆd‰„Z3ddœdŠd‹„Z4e5j6dÎdNdTddŒœddŽ„ƒZ7d}dœdd„Z8ddœd‘d’„Z9dÏd“dœd”d•„Z:dÐd}dœd–d—„Z;dÑd}dœd˜d™„Z<e d}dœdšd›„ƒZ=e d}dœdœd„ƒZ>e d}dœdždŸ„ƒZ?d dœd¡d¢„Z@eAdd£d¤ƒZBeAdd¥d¦ƒZCeAdd§d¨ƒZDeAdd©dªƒZEeAdd«d¬ƒZFeAdd­d®ƒZGeAd$d¯d°ƒZHeAd%dd±ƒZId²ZJeAdd³eJƒZKeKZLeKZMeAdd´dµƒZNeNZOeAd!d¶d·ƒZPeAd"d¸d¹ƒZQeQZRdºZSeAd
d
eSjTd»d¼ƒZUeAd d eSjTd½d¼ƒZVeAd d d¾ƒZWeAd d d¿ƒZXeAdddÀƒZYeAdddÁƒZZeAdddƒZ[dÃdœdÄdńZ\dÒdÇdGdGdȜdÉdʄZ]‡Z^S)ÓÚ DatetimeArraya
    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
    Z datetimearrayr rD)rÚ
datetime64Údateztype[Timestamp])ÚreturncCstS©N)r©rhrNrNrOÚ _scalar_typeÄszDatetimeArray._scalar_typeÚ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`rHreÚyearrVÚdayÚhourÚminuteÚsecondÚweekdayÚ    dayofweekÚ day_of_weekÚ    dayofyearÚ day_of_yearÚquarterÚ days_in_monthÚ daysinmonthÚ microsecondÚ
nanosecondÚ
_field_opsrsrÚtimetzÚ
_other_opsrIÚ_datetimelike_opsÚ    to_periodÚ tz_localizeÚ
tz_convertÚ    normalizeÚstrftimeÚroundÚfloorÚceilÚ
month_nameÚday_nameÚas_unitÚ_datetimelike_methodsièznp.dtype | DatetimeTZDtypeÚ_dtypeNzBaseOffset | NoneÚ_freqcCst|jƒt|ƒ}|Sru)Ú_validate_dt64_dtyperM)ÚclsrirMrNrNrOÚ_validate_dtypes
zDatetimeArray._validate_dtypeú
np.ndarray)rir`rtcsrt|tjƒst‚|jdkst‚t|tjƒrF||jks8t‚t|ƒrZt‚n|jt|jƒksZt‚t    ƒ 
||¡}||_ |S)NÚM) Ú
isinstancerLÚndarrayÚAssertionErrorÚkindrMrrdrÚsuperÚ _simple_newrŸ)r¡rir`rMrj©Ú    __class__rNrOrª s zDatetimeArray._simple_newF©rMÚcopyÚbool©r®cCs|j|||dS)Nr­)Ú_from_sequence_not_strict)r¡ZscalarsrMr®rNrNrOÚ_from_sequence!szDatetimeArray._from_sequenceÚraise)rMr®rHr`ÚdayfirstÚ    yearfirstÚ    ambiguousz'str | BaseOffset | lib.NoDefault | Noner#)r®r`r´rµr¶c    Csh|dk}    |tjk    r|nd}t |¡\}}
|dk} |tjkr@d}n
t |¡}t|ƒ}t||| ƒ}d} |dk    rŒt|t    j
ƒr†t      |¡d} n|j } t ||||||| d\} }}t||| ƒ|dk    rÈ| rÈtdƒ‚t |||
¡\}}
|    râd}t      | j
¡d}t||ƒ}|j| ||d}| dk    r,| |j kr,| | ¡}|dkrR|dk    rR|j|||dn|
rdt|jƒ|_|S)z\
        A non-strict version of _from_sequence, called from DatetimeIndex.__new__.
        Nr©r®rHr´rµr¶Úout_unitz^Passed data is timezone-aware, incompatible with 'tz=None'. Use obj.tz_localize(None) instead.©r`rM)r¶)r
Ú
no_defaultÚdtlZmaybe_infer_freqrÚ maybe_get_tzr Ú_validate_tz_from_dtyper¥rLrMZ datetime_datarIÚ_sequence_to_dt64nsÚ
ValueErrorZvalidate_inferred_freqrPrªrœZ_validate_frequencyrÚ inferred_freqrŸ)r¡ÚdatarMr®rHr`r´rµr¶Z explicit_noneZ
freq_inferÚexplicit_tz_nonerIZsubarrrÀÚ    data_unitÚ
data_dtyperjrNrNrOr±%sR
 
  ù
 ÿ
 
 z'DatetimeArray._from_sequence_not_strictÚboth©rIr$r"ú
str | None)r•r¶Ú nonexistentÚ    inclusiverIrtc
Cstt |¡}|dkr2tdd„|||fDƒƒr2tdƒ‚t ||||¡dkrNtdƒ‚t|ƒ}|dk    rft|ƒ}|dk    rvt|ƒ}|tks†|tkrŽtdƒ‚|
dk    r¨|
dkr¬tdƒ‚nd    }
|dk    rÊ|
dk    rÊ|j    |
d
d }|dk    rè|
dk    rè|j    |
d
d }t
|    ƒ\} } t |||ƒ\}}t |||ƒ}|dk    rj|dkr(dn|j } |dkr<dn|j }t|| |||||ƒ}t|||||||ƒ}|dk    rxt|tƒr¨|dk    r”| d¡}|dk    r¨| d¡}t|tƒrÈt|||||
d }n,t|||||
d }tjdd„|Dƒtjd}|dk    r|j n|j }|dk    r®|dkr®t |¡sFt|
ƒ}tj|||||d}|dk    r^| |||¡}|dk    r®| |||¡}n6tjd|j|j|dd|j}|jdkr®|  d¡}||krÒ| sF| sF|dd…}ntt|ƒj}t|ƒj}| rò| sF| st!|ƒr|d|kr|dd…}| sFt!|ƒrF|d|krF|dd…}| "d|
›d¡}t#||
d }|j$|||dS)Ncss|]}|dkVqdSrurN©Ú.0ÚxrNrNrOÚ    <genexpr>†sz0DatetimeArray._generate_range.<locals>.<genexpr>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ÚusrDz+'unit' must be one of 's', 'ms', 'us', 'ns'rDF)Zround_okrÆ©rSrTÚperiodsÚoffsetrIcSsg|]
}|j‘qSrN)Ú_valuerÊrNrNrOÚ
<listcomp>Ãsz1DatetimeArray._generate_range.<locals>.<listcomp>©rM©r¶rÈÚcresorÚint64Úi8ééÿÿÿÿz datetime64[rKr¹)%r»Zvalidate_periodsÚanyr¿ÚcomZcount_not_nonerrr rœr(Ú_maybe_normalize_endpointsÚ_infer_tz_from_endpointsrHÚ_maybe_localize_pointr¥r>r“r?r<Ú_generate_rangerLÚarrayrÚrÚis_utcr rÚtz_localize_to_utcZlinspacerÕrMÚastypeÚlenÚviewrPrª)r¡rSrTrÓr`rHr•r¶rÈrÉrIZleft_inclusiveZright_inclusiveZstart_tzZend_tzZi8valuesZxdrZ endpoint_tzrÙZstart_i8Zend_i8Ú dt64_valuesrMrNrNrOrãvsÀ
 ÿ
 
ÿÿ
 
 
 
 
 ÿ û
 
 
ÿÿ 
 
 
 
    zDatetimeArray._generate_rangez np.datetime64cCsPt||jƒs|tk    rtdƒ‚| |¡|tkr>t |j|j¡S|     |j¡j
SdS)Nz'value' should be a Timestamp.) r¥rwr r¿Ú_check_compatible_withrLrrrÕrIrœZasm8©rhÚvaluerNrNrOÚ _unbox_scalarûs 
zDatetimeArray._unbox_scalarzTimestamp | NaTTypecCst||jdS)N©rH)rrHrìrNrNrOÚ_scalar_from_stringsz!DatetimeArray._scalar_from_stringÚNonecCs|tkr dS| |¡dSru)r Ú_assert_tzawareness_compat)rhÚotherrNrNrOrësz$DatetimeArray._check_compatible_with)rÌrtcCs"| d¡}tj||j|jd}|S)NrÛ)rXrH)rérZ_from_value_and_resordrH)rhrÌríÚtsrNrNrOÚ    _box_funcs
zDatetimeArray._box_funccCs|jS)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žrvrNrNrOrMszDatetimeArray.dtyperEcCst|jddƒS)zÌ
        Return the timezone.
 
        Returns
        -------
        datetime.tzinfo, pytz.tzinfo.BaseTZInfo, dateutil.tz.tz.tzfile, or None
            Returns None when the array is tz-naive.
        rHN)ÚgetattrrMrvrNrNrOrH.s zDatetimeArray.tzcCs tdƒ‚dS)NzNCannot directly set timezone. Use tz_localize() or tz_convert() as appropriate)ÚAttributeErrorrìrNrNrOrH;sÿcCs|jS)z(
        Alias for tz attribute
        rïrvrNrNrOrCszDatetimeArray.tzinfocCst|j|j|jdS)zN
        Returns True if all of the dates are at midnight ("no time")
        rW)rÚasi8rHrdrvrNrNrOÚ is_normalizedJszDatetimeArray.is_normalizedrcCst|j|j|jdS)NrW)rrørHrdrvrNrNrOÚ_resolution_objQszDatetimeArray._resolution_objcs |dkr|jrt}tƒj|dS)Nr×)rHÚobjectr©Ú    __array__)rhrMr«rNrOrüXszDatetimeArray.__array__rc    cs˜|jdkr(tt|ƒƒD]}||Vqnl|j}t|ƒ}d}||d}t|ƒD]D}||}t|d||ƒ}t|||…|jd|jd}|EdHqNdS)zt
        Return an iterator over the boxed values
 
        Yields
        ------
        tstamp : Timestamp
        rÜi'Ú    timestamp)rHÚboxrXN)ÚndimÚrangerèrøÚminrrHrd)    rhÚirÁÚlengthÚ    chunksizeÚchunksZstart_iZend_iZ    convertedrNrNrOÚ__iter___s"
 
üzDatetimeArray.__iter__TcsTt|ƒ}t||jƒr$|r | ¡S|St|tƒrt|tƒsHtƒj||dS|j    dkr\t
dƒ‚n2t  |j ¡}t |j||d}t|ƒj|||jdSn´|j    dkrÚt|ƒrÚt|ƒsÚtt|ƒƒrÚt |j|dd}t|ƒj||jdS|j    dk    röt|ƒröt
dƒ‚nN|j    dkr,t|ƒr,||jkr,t|ƒr,t
dƒ‚nt|ƒrD|j|jdStj |||¡S)    Nr°zCannot use .astype to convert from timezone-naive dtype to timezone-aware dtype. Use obj.tz_localize instead or series.dt.tz_localize instead©rMr`Tr×zžCannot 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`)r7r/rMr®r¥r9r8r©rçrHÚ    TypeErrorrLrFrÚ_ndarrayÚtyperªr`r-rrrr3r’r»ZDatetimeLikeArrayMixin)rhrMr®Znp_dtypeZ
res_valuesr«rNrOrç|sV 
 
 
ÿ ÿþý
üÿÿþýüÿ
zDatetimeArray.astype)Úna_repÚ date_formatz str | floatznpt.NDArray[np.object_])r rtcKs0ddlm}|||ƒ}tj|j|j|||jdS)Nr)Ú!get_format_datetime64_from_values)rHÚformatr rX)Zpandas.io.formats.formatr r Zformat_array_from_datetimerørHrd)rhr r Úkwargsr ÚfmtrNrNrOÚ_format_native_typesÂs 
ÿz"DatetimeArray._format_native_typescCs6t|tjƒrt|ƒ}t|dƒs"dS|j}t |j|¡S)NrF)r¥rLrrrÚhasattrrrÚ
tz_compare)rhróÚother_tzrNrNrOÚ _has_same_tzÐs  
zDatetimeArray._has_same_tzcCsbt|ddƒ}t|ddƒ}t|ƒr(|jj}|tkr2n,|jdkrN|dk    r^tdƒ‚n|dkr^tdƒ‚dS)NrrMz;Cannot compare tz-naive and tz-aware datetime-like objects.z:Cannot compare tz-naive and tz-aware datetime-like objects)rör.rMrHr r)rhrórZ other_dtyperNrNrOròÛs  
ÿÿz(DatetimeArray._assert_tzawareness_compatcCsÌt|tƒrt‚|jdk    r$| d¡}n|}z| |¡ |j¡}Wnbtk
r t    j
dt t ƒd|  d¡|}t|ƒ |¡ |j¡}t|ƒsœ| |j¡YSYn(Xtj||jd}|jdk    rÈ| |j¡}|S)NzCNon-vectorized DateOffset being applied to Series or DatetimeIndex.©Ú
stacklevelÚOr×)r¥r?r§rHr“Z _apply_arrayrérMÚNotImplementedErrorÚwarningsÚwarnr&r'rçr
r²rœrIrèrqrª)rhrÔrirjrNrNrOÚ _add_offsetós(
 ý
 zDatetimeArray._add_offsetznpt.NDArray[np.int64]cCs0|jdkst |j¡r|jSt|j|j|jdS)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.
        NrW)rHrrårørrdrvrNrNrOr]szDatetimeArray._local_timestampscCs>t |¡}|jdkrtdƒ‚t||jd}|j|j||jdS)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')
        Nz?Cannot convert tz-naive timestamps, use tz_localize to localizerÆr)    rr¼rHrrPrIrªr    r`)rhrHrMrNrNrOr”s@
 
ÿzDatetimeArray.tz_convert)r¶rÈrtcCsêd}||krt|tƒstdƒ‚|jdk    rP|dkrFt|j|j|jd}qrtdƒ‚n"t     |¡}t
j |j||||jd}|  d|j ›d¡}t||j d    }d}t |¡sºt|ƒd
krÂt|d ƒsÂ|j}n|dkrÚ|jdkrÚ|j}|j|||d S) aÌ
        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 Z shift_forwardZshift_backwardzoThe nonexistent argument must be one of 'raise', 'NaT', 'shift_forward', 'shift_backward' or a timedelta objectNrWz,Already tz-aware, use tz_convert to convert.rØrJrKrÆrÜrr)r¥rr¿rHrrørdrrr¼rrærérIrPrårèr:r`rª)rhrHr¶rÈZnonexistent_optionsZ    new_datesrMr`rNrNrOr“ks:
ÿÿ
 
 
û"zDatetimeArray.tz_localizecCst|j|j|jdS)zx
        Return an ndarray of datetime.datetime objects.
 
        Returns
        -------
        numpy.ndarray
        )rHrX©rrørHrdrvrNrNrOÚ to_pydatetime'szDatetimeArray.to_pydatetimecCsZt|j|j|jd}| |jj¡}t|ƒj||jd}|     d¡}|jdk    rV| 
|j¡}|S)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)
        rWr×ÚinferN) rrørHrdrér    rMr
rªZ
_with_freqr“)rhZ
new_valuesrêZdtarNrNrOr•1s&
 
 zDatetimeArray.normalizerCcCsxddlm}|jdk    r(tjdttƒd|dkrd|jp:|j}|dkrLt    dƒ‚t
|ƒ}|dkr`|}|}|j |j ||jdS)ax
        Cast to PeriodArray/Index at a particular frequency.
 
        Converts DatetimeArray/Index to PeriodArray/Index.
 
        Parameters
        ----------
        freq : str or Offset, optional
            One of pandas' :ref:`offset strings <timeseries.offset_aliases>`
            or an Offset object. Will be inferred by default.
 
        Returns
        -------
        PeriodArray/Index
 
        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]')
        rrBNzNConverting to PeriodArray/Index representation will drop timezone information.rz8You must pass a freq argument as current index has none.rï) Úpandas.core.arraysrCrHrrÚ UserWarningr'rcrÀr¿r=Z_from_datetime64r    )rhr`rCÚresrNrNrOr’`s$, 
ü ÿzDatetimeArray.to_periodcCs.| ¡}tj|d||jd}|j|dd}|S)u˜
        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='M', 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='M', periods=3)
        >>> idx
        DatetimeIndex(['2018-01-31', '2018-02-28', '2018-03-31'],
                      dtype='datetime64[ns]', freq='M')
        >>> 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='M', periods=3)
        >>> idx
        DatetimeIndex(['2018-01-31', '2018-02-28', '2018-03-31'],
                      dtype='datetime64[ns]', freq='M')
        >>> idx.month_name(locale='pt_BR.utf8') # doctest: +SKIP
        Index(['Janeiro', 'Fevereiro', 'Março'], dtype='object')
        rš©ÚlocalerXNrY©r]rrfrdrg©rhr$rirjrNrNrOrš«s1ÿzDatetimeArray.month_namecCs.| ¡}tj|d||jd}|j|dd}|S)u“
        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#NrYr%r&rNrNrOr›äs1ÿzDatetimeArray.day_namecCs| ¡}t|d|jdS)zr
        Returns numpy array of :class:`datetime.time` objects.
 
        The time part of the Timestamps.
        r©rþrX©r]rrd©rhZ
timestampsrNrNrOrs
zDatetimeArray.timecCst|j|jd|jdS)z
        Returns numpy array of :class:`datetime.time` objects with timezones.
 
        The time part of the Timestamps.
        rr'rrvrNrNrOr+szDatetimeArray.timetzcCs| ¡}t|d|jdS)z«
        Returns numpy array of python :class:`datetime.date` objects.
 
        Namely, the date part of Timestamps without time and
        timezone information.
        rsr'r(r)rNrNrOrs4s zDatetimeArray.daterAcCsNddlm}| ¡}tj||jd}||dddgdd}|jrJd    |j|j<|S)
aö
        Calculate year, week, and day according to the ISO 8601 standard.
 
        .. versionadded:: 1.1.0
 
        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
        rr@rWrÚweekr€ZUInt32)ÚcolumnsrMN)    ÚpandasrAr]rZbuild_isocalendar_sarrayrdZ_hasnaZilocZ_isnan)rhrAriZsarrayZiso_calendar_dfrNrNrOÚ isocalendarCs" ÿ zDatetimeArray.isocalendarÚYa´
        The year of the datetime.
 
        Examples
        --------
        >>> datetime_series = pd.Series(
        ...     pd.date_range("2000-01-01", periods=3, freq="Y")
        ... )
        >>> 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
        r¤a·
        The month as January=1, December=12.
 
        Examples
        --------
        >>> datetime_series = pd.Series(
        ...     pd.date_range("2000-01-01", periods=3, freq="M")
        ... )
        >>> 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
        Ú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
        Ú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
        ÚmaË
        The minutes of the datetime.
 
        Examples
        --------
        >>> datetime_series = pd.Series(
        ...     pd.date_range("2000-01-01", periods=3, freq="T")
        ... )
        >>> 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Ï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Ñ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
        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
    ZdowZdoyz.
        The ordinal day of the year.
        Úqz*
        The quarter of the date.
        Zdimz2
        The number of days in the month.
        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])
    Úfirst)Z first_or_lastÚlasta
        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])
        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])
        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])
        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])
        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="Y")
        >>> idx
        DatetimeIndex(['2012-12-31', '2013-12-31', '2014-12-31'],
                      dtype='datetime64[ns]', freq='A-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
        znpt.NDArray[np.float64]cCsÖt |j¡}t |j¡}t |j¡}|dk}||d8<||d7<|t d|dd¡d|t |d¡t |d    ¡t |d
¡d |j|jd |j    d |j
d d|j d ddS)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ÜrUé™iÉéiméédig€C:Aé<ii@Biʚ;é) rLÚasarrayrrVr€Zfixr˜rr‚rƒrŒr)rhrrVr€ZtestarrrNrNrOÚto_julian_dateos@   ÿþ ý ü ûúÿþ ý üùùÿzDatetimeArray.to_julian_daterÜÚint)ÚddofÚkeepdimsÚskipnac
CsRddlm}|jjj dd¡}t |¡}|j|j |¡|d}    |    j    |||||dS)aÉ
        Return sample standard deviation over requested axis.
 
        Normalized by N-1 by default. This can be changed using the ddof argument
 
        Parameters
        ----------
        axis : int optional, default None
            Axis for the function to be applied on.
            For `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
        r)ÚTimedeltaArrayrrZ timedelta64r×)ÚaxisÚoutr>r?r@)
r rAr    rMrQÚreplacerLrªréÚstd)
rhrBrMrCr>r?r@rAZ    dtype_strZtdarNrNrOrE’s
! 
zDatetimeArray.std)NFr³r³rÅ)N)T)r³r³)N)N)N)NNNrÜFT)_rmÚ
__module__Ú __qualname__rnZ_typrLrrZ_internal_fill_valuerZ_recognized_scalarsr,Z_is_recognized_dtypeZ_infer_matchesrorwr^Ú__annotations__rerŽrr‘rZ__array_priority__rŸr)Z_default_dtypeÚ classmethodr¢rªr²r
rºr±rãrîrðrërõrMrHÚsetterrrùrúrürrçrrròrr]r”r»Z ravel_compatr“rr•r’ršr›rrrsr-rprrVr€rr‚rƒrŒrZ_dayofweek_docr†r…r„rˆr‡r‰rŠr‹Z _is_month_docrrxryrzr{r|r}r~r<rEÚ __classcell__rNrNr«rOrq›sÊ
" 
ù     ð ÿ
õ  
üöPö ô     
Gÿ   Lü<
/K99 -ýýýýýýýý" ýýý,
ÿ
ÿý*ý*ý,ý,ý*%ùrqFr³r·r¯r#rÇcCsÚd}tj||dd\}}t|tƒr(|j}t|||d\}}t|ddƒ}t}    |dk    rdt     d|›d¡}    t
|ƒs~t |ƒs~t |ƒr,d}t j|dd    d
kr¢| tj¡}n„|dk    rÜ|d krÜtj|td }
t |
|¡} |  t¡|dfSt|||dd \}} |r| r|j    dks t‚| t¡|dfS| r&| }|j    }t|ƒrLt||jƒ}|j} n&t|ƒrLt|d|ƒ}|j    }t|ƒ}t|ƒs¶t|ƒ}t |ƒ}t     d|›d¡}t!||dd}t|ƒ}d}|j    j"dkrà| |j     #d¡¡}|j    }d}|dk    r0|j$}|j%dkr| &¡}t'j(| d¡|||d}| |¡}| )|¡}|j    |ksFt|j    ƒ‚|} n&|j    t*krh|jtjdd}| |    ¡} |r€|  +¡} t| tj,ƒsštt-| ƒƒ‚| j    j.dks¬t‚| j    dks¼t‚tt| j    ƒƒsÐt‚| ||fS)aÿ
    Parameters
    ----------
    data : list-like
    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[ns]``.
    tz : tzinfo or None
        Either the user-provided tzinfo or one inferred from the data.
    inferred_freq : Tick or None
        The inferred frequency of the sequence.
 
    Raises
    ------
    TypeError : PeriodDType data is passed
    Nrq)Zcls_namerïrMrJrKF)r@Úintegerr³r×)r´rµÚ allow_objectrÛr    r­ú>ú<rÜ)r¶rÙr°r¤ÚM8)/r»Z!ensure_arraylike_for_datetimeliker¥rqr`Úmaybe_convert_dtyperör)rLrMr2r5r4r
Z infer_dtyperçrÚr;rûr Zarray_to_datetime_with_tzréÚobjects_to_datetime64nsr§r.Ú_maybe_infer_tzrHr    r-rrrrrÚ    byteorderZ newbyteorderÚshaperÿZravelrræZreshaper*r®r¦r
r¨)rÁr®rHr´rµr¶r¸rÀrÄZ    out_dtypeZobj_dataZi8dataÚ inferred_tzrjZ    new_dtyperÃZnew_resoZnew_unitrUrNrNrOr¾Âs $ÿ
 
 ÿþý ü
 
 
 
 
 
 ÿ
 
 
r¾r£r!)rÁÚutcÚerrorsrMcCs†|dks t‚tj|dtjd}tj|||||d\}}|dk    rL| d¡|fSt|ƒr\||fSt|ƒrz|rp||fSt    |ƒ‚nt    |ƒ‚dS)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.
 
    Returns
    -------
    result : ndarray
        np.int64 dtype if returned values represent UTC timestamps
        np.datetime64[ns] if returned values represent wall times
        object if mixed timezones
    inferred_tz : tzinfo or None
 
    Raises
    ------
    ValueError : if data cannot be converted to datetimes
    )r³ÚignoreZcoerceF)r®rM)rXrWr´rµNrÛ)
r§rLräÚobject_r Zarray_to_datetimerér-r2r)rÁr´rµrWrXrMrjZ    tz_parsedrNrNrOrRYs$# û
 
rR)r®rHcCsžt|dƒs||fSt|jƒr2| t¡ d¡}d}ndt|jƒsFt|jƒrZtd|j›dƒ‚n<t    |jƒrntdƒ‚n(t
|jƒr–t |jƒs–t j |t jd}d}||fS)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
    rMrÛFzdtype z& cannot be converted to datetime64[ns]zFPassing PeriodDtype data is invalid. Use `data.to_timestamp()` insteadr×)rr1rMrçr)rér6r+rr3r0r.rLrärZ)rÁr®rHrNrNrOrQ¡s
 
 
ÿrQ)rHrVrtcCs<|dkr|}n*|dkrn t ||¡s8td|›d|›ƒ‚|S)aV
    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
    Nzdata is already tz-aware z, unable to set specified tz: )rrr)rHrVrNrNrOrS×s ÿrScCsš|dk    r–t|ƒ}t|t d¡ƒr,d}t|ƒ‚t|tjƒrN|jdks^tt|ƒƒr^t|tjt    fƒsntd|›dƒ‚t
|ddƒr–t t    |ƒ}t    t   |j¡d}|S)    a£
    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
    NrPzhPassing in 'datetime64' dtype with no precision is not allowed. Please pass in 'datetime64[ns]' instead.r¤zUnexpected value for 'dtype': 'ze'. Must be 'datetime64[s]', 'datetime64[ms]', 'datetime64[us]', 'datetime64[ns]' or DatetimeTZDtype'.rHrï)r7r/rLrMr¿r¥r¨rrr8rör    rZtz_standardizerH)rMÚmsgrNrNrOr õs*ÿ
ÿþ
þý
ÿ 
r )rHrÂrtcCs¦|dk    r¢t|tƒr6zt |¡}Wntk
r4YnXt|ddƒ}|dk    rv|dk    rft ||¡sftdƒ‚|rrtdƒ‚|}|dk    r¢t    |ƒr¢|dk    r¢t ||¡s¢tdƒ‚|S)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
    NrHz-cannot supply both a tz and a dtype with a tzz3Cannot pass both a timezone-aware dtype and tz=NonezHcannot supply both a tz and a timezone-naive dtype (i.e. datetime64[ns]))
r¥rFr8Zconstruct_from_stringrrörrr¿r-)rMrHrÂZdtzrNrNrOr½+    s&
 ÿr½r)rSrTrHrtc
Csˆzt ||¡}Wn,tk
r<}ztdƒ|‚W5d}~XYnXt |¡}t |¡}|dk    rx|dk    rxt ||¡s„tdƒ‚n |dk    r„|}|S)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)rZ infer_tzinfor§rr¼r)rSrTrHrVÚerrrNrNrOrá`    s ÿþ
 
 
rázTimestamp | None©rSrTr•cCs,|r$|dk    r| ¡}|dk    r$| ¡}||fSru)r•r]rNrNrOrà‹    s ràcCsV|dkrR|dk    rR|dkr|nd}||ddœ}t|tƒs>|dkrF||d<|jf|Ž}|S)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
    is_none : argument that should be None
    is_not_none : argument that should not be None
    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
    NrF)r¶rÈrHrH)r¥r?r“)rôZis_noneZ is_not_noner`rHr¶rÈZ localize_argsrNrNrOr☠   s  râz
int | Noner rÒccs”t|ƒ}t|ƒ}|tk    r$| |¡}nd}t|ƒ}|tk    rD| |¡}nd}|rb| |¡sb| |¡}n|rz| |¡sz| |¡}|dkrœ||krœ|jdkrœd}d}|dkr´||d|}|dkrÌ||d|}tt|ƒ}tt|ƒ}|}|jdkr@||kr|V||krq|     |¡ |¡}||kr8t
d|›dƒ‚|}qðnP||kr|V||kr^q|     |¡ |¡}||krˆt
d|›dƒ‚|}q@dS)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
    NrrÜzOffset z did not increment datez did not decrement date) rrr rœZ is_on_offsetZ rollforwardÚrollbackÚnr    Ú_applyr¿)rSrTrÓrÔrIÚcurZ    next_daterNrNrOrã¹    sP    
 
 
 
 
 
 
 
 
rã)rD)N)Fr³F)N)F)iÚ
__future__rrrrrÚtypingrrr    rÚnumpyrLZ pandas._libsr
r Zpandas._libs.tslibsr r rrrrrrrrrrrrrrrrrrZpandas._libs.tslibs.dtypesr Zpandas._typingr!r"r#r$r%Z pandas.errorsr&Zpandas.util._exceptionsr'Zpandas.util._validatorsr(Zpandas.core.dtypes.commonr)r*r+r,r-r.r/r0r1r2r3r4r5r6r7Zpandas.core.dtypes.dtypesr8r9Zpandas.core.dtypes.missingr:r r;r»Zpandas.core.arrays._rangesr<Zpandas.core.commonÚcoreÚcommonrßZpandas.tseries.frequenciesr=Zpandas.tseries.offsetsr>r?r,rArCZ    _midnightrPrpZ TimelikeOpsZ DatelikeOpsrqr¾rRrQrSr r½ráràrârãrNrNrNrOÚ<module>sz X    D      
(8øúH67ÿ5+ !