+
    yȇie                         ^ RI t^ RIt^ RIHt ^ RIHt ^ RIHt ^ RI	H
t
HtHtHtHtHtHtHt ^ RIHt ^ RIHt  ! R R4      t ! R	 R
4      t ! R R4      t ! R R4      t ! R R4      tR# )    N)IncompatibleFrequency)Pandas4Warning)PeriodDtype)IndexNaTPeriodPeriodIndexSeries
date_rangeoffsetsperiod_range)PeriodArrayc                      a  ] tR t^t o ]P
                  P                  R. RO4      R 4       t]P
                  P                  R. RO4      R 4       t]P
                  P                  R. RO4      R 4       t	]P
                  P                  R. RO4      R 4       t
]P
                  P                  R4      ]P
                  P                  R	4      ]P
                  P                  R. RO4      R
 4       4       4       tRtV tR# )TestPeriodIndexDisallowedFreqszfreq,freq_deprc                L   R V 2p\         P                  ! \        VR7      ;_uu_ 4        \        RR.VR7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \	        RRVR7       RRR4       R#   + '       g   i     LM; i  + '       g   i     R# ; i)Invalid frequency: match
2020-01-01
2020-01-02freqNstartendr   )pytestraises
ValueErrorr	   r   )selfr   	freq_deprmsgs   &&& }/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/indexes/period/test_constructors.py1test_period_index_offsets_frequency_error_messagePTestPeriodIndexDisallowedFreqs.test_period_index_offsets_frequency_error_message   sq     $I;/]]:S11|49E 2 ]]:S11|IN 21 21 211s   A?&B?B	B#	r   c                L   R V 2p\         P                  ! \        VR7      ;_uu_ 4        \        RRVR7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \	        RR.VR7       RRR4       R#   + '       g   i     LN; i  + '       g   i     R# ; ir   r   z2020-01z2020-05r   Nr   r   r   r   r	   )r   r   r!   s   && r"   (test_period_index_frequency_invalid_freqGTestPeriodIndexDisallowedFreqs.test_period_index_frequency_invalid_freq-   sm     $D6*]]:S11ID9 2]]:S11I.T: 21 21111   A?%B?B	B#	c                    R V 2p\        R^VR7      p\        P                  ! \        VR7      ;_uu_ 4        VP	                  4        RRR4       R#   + '       g   i     R# ; i)r   z01-Jan-2012periodsr   r   N)r   r   r   r   	to_period)r   r   r!   rngs   &&  r"   2test_period_index_from_datetime_index_invalid_freqQTestPeriodIndexDisallowedFreqs.test_period_index_from_datetime_index_invalid_freq:   sG     $D6*=]]:S11MMO 2111s   AA$	r    c                L   R V 2p\         P                  ! \        VR7      ;_uu_ 4        \        RRVR7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \	        RR.VR7       RRR4       R#   + '       g   i     LN; i  + '       g   i     R# ; ir&   r'   )r   r    r!   s   && r"    test_period_index_T_L_U_N_raises?TestPeriodIndexDisallowedFreqs.test_period_index_T_L_U_N_raisesC   sm     $I;/]]:S11II> 2]]:S11I.Y? 21 21111r*   3ignore:PeriodDtype\[B\] is deprecated:FutureWarningz*ignore:Period with BDay freq:FutureWarningc                   R VR,           R2p\         P                  ! \        VRR7      ;_uu_ 4        \        RR.VR7      pRRR4       \        RR.VR7      p\         P                  ! XV4       \         P                  ! \        VRR7      ;_uu_ 4        \        RRVR	7      pRRR4       \        RRVR	7      p\         P                  ! WE4       R#   + '       g   i     L; i  + '       g   i     LI; i)
':   NNz8' is deprecated and will be removed in a future version.F)r   raise_on_extra_warningsr   r   r   Nr   )tmassert_produces_warningr   r	   assert_index_equalr   )r   r   r    r!   resultexpecteds   &&&   r"   *test_period_index_depr_lowercase_frequencyITestPeriodIndexDisallowedFreqs.test_period_index_depr_lowercase_frequencyM   s     	"VW 	 ''#u
 
 !,!=INF

 l;$G
fh/''#u
 
 ",YWF

  l4P
f/
 

 
s   CC&C#	&C6	 N))2M2ME)2Q-MARz2QE-MAR)2Y-FEBz2YE-FEB)rB   2me)rD   z2qe-MAR)rE   z2yE-feb)2SME2sme2BYE2Bye2CBME)z2BQE-SEPz2BYE-MAR2BME)2T1l2Un))2W2w)z2W-FRIz2w-fri)2D2d)2B2b)__name__
__module____qualname____firstlineno__r   markparametrizer#   r(   r0   r3   filterwarningsr?   __static_attributes____classdictcell____classdict__s   @r"   r   r      s    [[	

O
O [[1;	; [[V%EF G [[[*AB@ C@ [[ VW[[ LM[[H0	 N X0    r   c                   n  a  ] tR t^jt o R tR tR t]P                  P                  R]
]P                  ]]P                  .4      R 4       tR tR tR tR	 tR
 tR tR tR tR t]P                  P                  R. R+O4      R 4       tR tR tR tR tR t]P                  P                  RRR.]P                  ! RR.4      .4      R 4       t R t!R t"]P                  P                  R. R,O4      ]P                  P                  R. R-O4      R 4       4       t#]P                  P                  R. R-O4      R  4       t$R! t%R" t&R# t'R$ t(]P                  P                  R%. R.O4      ]P                  PS                  R&4      ]P                  PS                  R'4      R( 4       4       4       t*R) t+R*t,V t-R# )/TestPeriodIndexc                    \        RRR7       \        ^ RR7       \        P                  ! . RORR7      p\        P                  ! \        P                  ! . RO4      RR7      p\
        P                  ! W4       R# )i  Yordinalr   )ordinalsr   Ni)r   r8   )r   r	   from_ordinalsnparrayr:   r<   )r   idx1idx2s   &  r"   test_from_ordinals"TestPeriodIndex.test_from_ordinalsk   sQ    u3'qs#((*3G(("((:2FSQ
d)rb   c                   \        R RR7      \        \        RRR7      .p\        P                  ! \	        V4      \        V4      4       \        P                  ! \	        \        P                  ! V4      4      \        \        P                  ! V4      4      4       \        P                  \        \        RRR7      .p\        P                  ! \	        V4      \        V4      4       \        P                  ! \	        \        P                  ! V4      4      \        \        P                  ! V4      4      4       \        R RR7      \        \        RRR7      .p\        P                  ! \	        V4      \	        V\        R7      4       \        P                  ! \	        \        P                  ! V4      4      \	        \        P                  ! V4      \        R7      4       R# )2011-01Mr   2011-03DdtypeN)
r   r   r:   r<   r   r	   rl   rm   nanobject)r   arrs   & r"   "test_construction_base_constructor2TestPeriodIndex.test_construction_base_constructors   s   ic*C	1LM
eCj+c*:;
eBHHSM2K4NOvvsF9378
eCj+c*:;
eBHHSM2K4NOic*C	1LM
eCj%6*BC
eBHHSM2E"((3-v4VWrb   c                    \        R 4      p. ROp\        W!R7      p\        W!R7      p\        P                  ! W44       R# )rv   rw   N)
2011-01-01z
2012-03-04z
2014-05-01)r   r   r	   r:   r<   )r   rx   valuesr=   r>   s   &    r"   'test_base_constructor_with_period_dtype7TestPeriodIndex.test_base_constructor_with_period_dtype   s3    C ;v+v3
f/rb   values_constructorc                
   \        R RR7      \        \        RRR7      .pV! V4      p\        V\        R7      p\	        V4      \        J g   Q h\
        P                  ! VP                  \        P                  ! V4      4       R# )rs   rt   r   ru   rw   N)
r   r   r   rz   typer:   assert_numpy_array_equalr   rl   rm   )r   r   r-   r   r=   s   &&   r"   test_index_object_dtype'TestPeriodIndex.test_index_object_dtype   si     93'93'

 $G,vV,F|u$$$
##FMM288F3CDrb   c                   R p\         P                  ! \        VR7      ;_uu_ 4        \        RRR7      pRRR4       Rp\         P                  ! \        VR7      ;_uu_ 4        \	        R^
RR7      pRRR4       \         P                  ! \        VR7      ;_uu_ 4        \	        X^
R7      pRRR4       \         P
                  ! XX4       R#   + '       g   i     L; i  + '       g   i     Lv; i  + '       g   i     LO; i)	#Period with BDay freq is deprecatedr   z4/2/2012Br   NPeriodDtype\[B\] is deprecatedr   r-   r   r   r-   )r:   r;   FutureWarningr   r   r<   )r   msg1pmsg2r>   indexs   &     r"   test_constructor_use_start_freq/TestPeriodIndex.test_constructor_use_start_freq   s    4''TBBz,A C0''TBB#*bsKH C ''TBB q"5E C
eX. CB CB CBs#   C#C C3C	 C0	3D	c                
   \         P                  ! R R4      P                  ^4      ^R p\         P                  ! \         P                  ! ^^4      ^4      ^R p\        P
                  ! WRR7      p\        RRRR7      p\        P                  ! W44       \        P
                  ! WRR7      p\        P                  ! VP                  VP                  4       \        P
                  ! WR7      p\        P                  ! W44       . ROp^^.pR	p\        P                  ! \        VR
7      ;_uu_ 4        \        P
                  ! WRR7       RRR4       \        P                  ! \        VR
7      ;_uu_ 4        \        P
                  ! WRR7       RRR4       . ROp. ROp\        P
                  ! WRR7      p\        R^RR7      p	\        P                  ! W4       R#   + '       g   i     L; i  + '       g   i     Li; i)i  i  Q-DECyearquarterr   1990Q32009Q2r   z2Q-DECr   r   zMismatched Period array lengthsr   rt   )r   monthr   NrB   2007-01r,   )  r   r   )r8         )rl   arangerepeattiler	   from_fieldsr   r:   r<   r   asi8r   r   r   )
r   yearsquartersr   r>   index2monthsr!   idxexps
   &         r"   test_constructor_field_arrays-TestPeriodIndex.test_constructor_field_arrays   sf    		$%,,Q/"577299Q?B/"5''U7S(A
e.((eHU
##EJJ<''UE
e."Q/]]:S11##3G 2]]:S11##4H 2 #%%5SI9ac:
c' 2111s   3G8G2G/	2H	c           
         \        \        ^RR7      \        ^RR7      RR7      p\        \        ^RR7      \        ^RR7      \        ^RR7      \        ^RR7      .RR7      p\        P                  ! W4       R# )r8   nsrg   r   r   N)r   r   r	   r:   r<   r   r   r   s   &  r"   test_constructor_nano%TestPeriodIndex.test_constructor_nano   sq    .qt,

 qt,qt,qt,qt,	 
 	c'rb   c                   \         P                  ! R R\         P                  R7      P                  ^4      p\         P                  ! \         P
                  ! . RO\         P                  R7      ^(4      p\        P                  ! WR7      p\        P                  ! VP                  \        V4      4       \        P                  ! VP                  \        V4      4       R# )i    rw   r   N)r8   r   r      )rl   r   int64r   r   rm   r	   r   r:   r<   r   r   r   )r   r   r   pindexs   &   r"   %test_constructor_arrays_negative_year5TestPeriodIndex.test_constructor_arrays_negative_year   s    		$BHH5<<Q?77288LA2F((eF
fkk5<8
fnneHo>rb   c           
         R p\         P                  ! \        VR7      ;_uu_ 4        \        P                  ! \        RR4      \        \        ^4      4      RR7       RRR4       R#   + '       g   i     R# ; i)zQuarter must be 1 <= q <= 4r   r   i  r   r   N)r   r   r   r	   r   rangelistr   r!   s   & r"   !test_constructor_invalid_quarters1TestPeriodIndex.test_constructor_invalid_quarters   sK    +]]:S11##4&U1XW 2111s   6A''A8	c                    R p\         P                  ! \        VR7      ;_uu_ 4        \        RRRR7       RRR4       R#   + '       g   i     R# ; i)z$periods must be an integer, got 10.5r   r   g      %@rt   r,   N)r   r   	TypeErrorr   r   s   & r"   #test_period_range_fractional_period3TestPeriodIndex.test_period_range_fractional_period   s3    4]]9C00Ds; 1000s   A  A	c                    \        R RR7      p\        V^VP                  R7      p\        V^R7      p\        P                  ! W#4       R# )z2002-01-01 00:0030minr   r   r   N)r   r   r   r:   r<   )r   r   r   r=   s   &   r"   "test_constructor_with_without_freq2TestPeriodIndex.test_constructor_with_without_freq   s;    )8

CE15
c*rb   c           	        \        R ^RR7      p\        P                  ! \        VP                  4      V4       \        P                  ! \        \        VP                  4      4      V4       Rp\        P                  ! \        VR7      ;_uu_ 4        \        VP                  4       RRR4       \        P                  ! \        VR7      ;_uu_ 4        \        \        VP                  4      4       RRR4       Rp\        P                  ! \        VR7      ;_uu_ 4        \        \        RRR	7      R
7       RRR4       \        \        V4      4      p\        P                  ! W14       \        V4      p\        P                  ! W14       \        VRR	7      p\        P                  ! W14       \        V\        P                  ! 4       R	7      p\        P                  ! W14       VP                  R8X  g   Q h\        VRR	7      p\        P                  ! W1P!                  R4      4       VP                  R8X  g   Q h\        V\        P                  ! ^4      R	7      p\        P                  ! W1P!                  R4      4       VP                  R8X  g   Q h\        VRR	7      pVP!                  RR4      p\        P                  ! W44       R#   + '       g   i     EL.; i  + '       g   i     EL; i  + '       g   i     EL; i)r   rt   r,   z)freq not specified and cannot be inferredr   Nz'Period' object is not iterable2007rf   r   )dataMErB   rC   rv   e)r   r:   r<   r	   r   r   r   r   r   r   r   r   iterr   MonthEndr   asfreq)r   r   r!   r=   r   s   &    r"   test_constructor_fromarraylike.TestPeriodIndex.test_constructor_fromarraylike   s	   9bs; 	k#**5s;
k$szz*:;SA9]]:S11! 2]]:S11SXX' 2 0]]9C00VF56 1 T#Y'
f*S!
f*Ss+
f*Sw'7'7'9:
f*{{d"""St,
fjj&67{{e###Sw'7'7':;
fjj&67{{e###Ss+jjc"
f*A 211111 100s$   KK!!K5K	!K2	5L	c                   \         P                  ! R R^d\         P                  R7      pVP                  \         P                  ! R4      4      p\        VRR7      p\        VP                  R4      RR7      p\        P                  ! W#4       R# )i rw   zM8[us]rv   r   zM8[ns]Ni )	rl   r   r   viewrx   r	   astyper:   r<   )r   valspir>   s   &   r"   test_constructor_datetime64arr.TestPeriodIndex.test_constructor_datetime64arr  s`    yyBHHEyy(+,C(t{{843?
b+rb   boxNc                    \        R ^RR7      pVf   VP                  pMVR8X  d   \        V4      p\        VRR7      p\        . RORR7      p\        P
                  ! W44       R# )2017r   r,   Nseriesrv   r   )z
2017-01-31z
2017-02-28z
2017-03-31z
2017-04-30)r   _valuesr
   r	   r:   r<   )r   r   r   r=   r>   s   &&   r"   !test_constructor_datetime64arr_ok1TestPeriodIndex.test_constructor_datetime64arr_ok%  s[     &!$7;<<DH_$<DT,D3
 	f/rb   c                   \        R R.RR7      p\        R R.RR7      p\        P                  ! W4       VP                  R8X  g   Q h\        RR.RR7      p\        RR.R	R7      p\        P                  ! W4       VP                  R8X  g   Q h\        R
R.RR7      p\        VRR7      p\        R R .RR7      p\        P                  ! W24       VP                  R8X  g   Q h\        VRR7      p\        P                  ! W24       VP                  R8X  g   Q hRp\        P
                  ! \        VR7      ;_uu_ 4        \        R.RRR7       RRR4       R#   + '       g   i     R# ; i)z2013-01z2013-03z	period[M]rw   rt   r   z
2013-01-05z
2013-03-05z
period[3D]3Dz
2013-01-01z
2013-01-02rv   z&specified freq and dtype are differentr   rs   z	period[D])r   rx   N)r	   r:   r<   rx   r   r   r   )r   r   r   resr!   s   &    r"   test_constructor_dtype&TestPeriodIndex.test_constructor_dtype4  s6   9i0D9i0s;
c'yyK'''<6lK<6TB
c'yyL((( <6SA#[19i0s;
c'yyK'''#C(
c'yyK'''6]]0<<#[A =<<<s   ?EE*	c                2   \        . R R7      p\        V\         4      '       g   Q h\        V4      ^ 8X  g   Q hVP                  R8X  g   Q h\        P
                  ! \        RR7      ;_uu_ 4        \        . 4       RRR4       R#   + '       g   i     R# ; i)rt   r   r   freq not specifiedr   N)r	   
isinstancelenr   r   r   r   )r   r   s   & r"   test_constructor_empty&TestPeriodIndex.test_constructor_emptyQ  sl    "3'#{++++3x1}}xx4]]:-ABBO CBBBs   /BB	c                   \        \        R RR7      \        \        R RR7      .4      p\        . RORR7      p\        P                  ! W4       \        \
        P                  ! \        R RR7      \        \        R RR7      .4      4      p\        P                  ! W4       \        \        \        \        R RR7      \        R RR7      .4      p\        . RORR7      p\        P                  ! W4       \        \
        P                  ! \        \        \        R RR7      \        R RR7      .4      4      p\        P                  ! W4       \        \        \        R R .RR7      p\        P                  ! W4       \        P                  ! \        RR7      ;_uu_ 4        \        \        \        .4       RRR4       \        P                  ! \        RR7      ;_uu_ 4        \        \
        P                  ! \        \        .4      4       RRR4       \        P                  ! \        RR7      ;_uu_ 4        \        RR.4       RRR4       \        P                  ! \        RR7      ;_uu_ 4        \        \
        P                  ! RR.4      4       RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)	rs   rt   r   r   r   r   Nrs   r   rs   )r   r   rs   rs   )
r	   r   r   r:   r<   rl   rm   r   r   r   r   s   &  r"   test_constructor_pi_nat'TestPeriodIndex.test_constructor_pi_natZ  s   IC(#vic/JK
 7cB
c'HHfYS13ys8STU
 	c'#vic2F934OP
 >SI
c'HHc6)#6ys8ST

 	c'3Y	:E
c']]:-ABBc
# C ]]:-ABB#s,- C ]]:-ABB' C ]]:-ABB%01 CB CB CB CB CBBs0   J*J-4K ."KJ*	-J=	 K	K$	c                   R p\         P                  ! \        VR7      ;_uu_ 4        \        \	        RRR7      \
        \	        RRR7      .4       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        \        P                  ! \	        RRR7      \
        \	        RRR7      .4      4       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        \
        \	        RRR7      \	        RRR7      .4       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        \        P                  ! \
        \	        RRR7      \	        RRR7      .4      4       RRR4       R#   + '       g   i     EL:; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)z5Input has different freq=D from PeriodIndex\(freq=M\)r   rs   rt   r   rv   N)r   r   r   r	   r   r   rl   rm   r   s   & r"   test_constructor_incompat_freq.TestPeriodIndex.test_constructor_incompat_freq  s*   G]]0<<	4c6)RU;VWX = ]]0<<IC0#vic7RS = ]]0<<fYS96)RU;VWX = ]]0<<&5vic7RS =< =<< =< =< =<<s/   )F<=F%)F(:=F;F	F%	(F8	;G	c           	        \        R \        \        R RR7      .4      p\        . RORR7      p\        P                  ! W4       \        R\        \        R RR7      .4      p\        . R	ORR7      p\        P                  ! W4       \        \        RRR7      \        R.4      p\        . R
ORR7      p\        P                  ! W4       R# )rs   rt   r   r   r   rv   
2012-01-01Nr   )r   r   rs   )r   r   r   )r	   r   r   r:   r<   r   s   &  r"   test_constructor_mixed&TestPeriodIndex.test_constructor_mixed  s    9c6)#+FGH7cB
c'5#vic'BCD3#>
c'6,S93MN=CH
c'rb   floats皙? @c                    R p\         P                  ! \        VR7      ;_uu_ 4        \        V4       RRR4       R#   + '       g   i     R# ; i)z9PeriodIndex does not allow floating point in constructionr   N)r   r   r   r	   )r   r   r!   s   && r"   test_constructor_floats'TestPeriodIndex.test_constructor_floats  s/    I]]9C00 1000s	   =A	c                :   \        . RO4      pVR,
          p\        P                  ! WR7      p\        W!4       Uu. uF  qD^ ,          R RV^,          R 2NK  	  pp\	        \        \        V4      4      p\        V4      p\        P                  ! Ws4       R# u upi )  r   r   dQN)r   i  i  )	r
   r	   r   zipr   mapr   r:   r<   )r   r   r   r   tstrslopsr   s   &       r"   !test_constructor_year_and_quarter1TestPeriodIndex.test_constructor_year_and_quarter  s    ()+%%4A.1'.@A.@Q4(!AaD8$.@AC%&
a% Bs   Bc                   \        R R^R7      p\        . RORR7      p\        P                  ! W4       \        RRRR7      p\        . RORR7      p\        P                  ! W4       \        RR	^R
7      p\        . ROR	R7      p\        P                  ! W4       Rp\        P
                  ! \        VR7      ;_uu_ 4        \        R.RR7       RRR4       Rp\        P
                  ! \        VR7      ;_uu_ 4        \        R.RR7       RRR4       Rp\        P
                  ! \        VR7      ;_uu_ 4        \        R^RR7       RRR4       R#   + '       g   i     L; i  + '       g   i     Lb; i  + '       g   i     R# ; i)2014-01rB   r   r   r-   r   
2014-01-02z
2014-01-15r   r   2014-01-01 17:004h)r   r   r-   z;Frequency must be positive, because it represents span: -1Mr   rs   z-1MNz:Frequency must be positive, because it represents span: 0M0Mr,   )r  z2014-03z2014-05z2014-07)r  z
2014-01-05z
2014-01-08z
2014-01-11z
2014-01-14)z2014-01-01 09:00z2014-01-01 13:00r  )r   r	   r:   r<   r   r   r   )r   pidxr>   r!   s   &   r"   test_constructor_freq_mult*TestPeriodIndex.test_constructor_freq_mult  s$   )$BKRVW
d-,LtLR
 	d- 2qIHt
 	d-K]]:S11%0 2 K]]:S11$/ 2 K]]:S11AD9 21 21 21 211s$    E=E&:E9E#	&E6	9F
	zfreq_offset, freq_periodmultc                    \        V4      V,           p\        V4      V,           p\        R V^
R7      p\        R V^
R7      P                  V4      p\        P
                  ! Wg4       R# )
2014-04-01r  N)strr   r   r.   r:   r<   )r   r  freq_offsetfreq_periodfreqstr_offsetfreqstr_periodr  r>   s   &&&&    r"   %test_constructor_freq_mult_dti_compat5TestPeriodIndex.test_constructor_freq_mult_dti_compat  s\     T[0T[0,^RP^R

)N
# 	 	d-rb   c                    \        R V R2^
R7      p\        R V R2^
R7      P                  V R24      p\        P                  ! W#4       R# )r  rt   r  r   N)r   r   r.   r:   r<   )r   r  r  r>   s   &&  r"   +test_constructor_freq_mult_dti_compat_month;TestPeriodIndex.test_constructor_freq_mult_dti_compat_month  sP    ,vQZLvR["

)tfAJ
 	 	d-rb   c                    R
 F!  p\        RR.VR7      p\        RR.RR7      pK#  	  R
 F6  p\        R^VR7      p\        RR.RR7      p\        P                  ! W#4       K8  	  R	# )1D1hz
2016-01-01z
2016-01-02r   z2016-01-01 00:00z2016-01-02 00:0025hr   z2016-01-02 01:00N)r"  1h1D)r	   r   r:   r<   )r   r   r  r>   s   &   r"   test_constructor_freq_combined.TestPeriodIndex.test_constructor_freq_combined  sm    $Dl;$GD"$68J#KRWXH % %DlADID"$68J#KRWXH!!$1 %rb   c                   \        R RRR7      p\        V4      ^	8X  g   Q h\        RRRR7      p\        V4      ^$8X  g   Q h\        RRRR7      p\        V4      ^l8X  g   Q h\        RRRR7      p\        V4      R8X  g   Q hRp\        P                  ! \        VR	7      ;_uu_ 4        \        R
RRR7      pRRR4       \        V4      R8X  g   Q h\        RRRR7      p\        V4      R8X  g   Q h\        RRRR7      p\        V4      R8X  g   Q h\        RRRR7      p\        V4      R8X  g   Q h\        P                  ! \        VR	7      ;_uu_ 4        \        RR
4      p\        V^R7      pRRR4       \        X4      ^8X  g   Q hVP                  XP                  8X  g   Q hV^ ,          V8X  g   Q h\        RR4      p\        V^
R7      p\        V4      ^
8X  g   Q hVP                  VP                  8X  g   Q hVR,          V8X  g   Q hRp\        P                  ! \        VR	7      ;_uu_ 4        \        RR4      pRRR4       \        V^
R7      p\        V4      \        V4      8X  g   Q hWF8H  P                  4       '       g   Q hVP                  VP                  8X  g   Q hR#   + '       g   i     EL; i  + '       g   i     ELX; i  + '       g   i     L; i)rf   z1/1/2001z	12/1/2009)r   r   r   r  rt   rv   z
12/31/2009r   r   r   Nhz12/31/2001 23:00Minz1/1/2001 23:59sz1/1/2001 23:59:5902-Apr-2005r   
2006-12-31W)r   r-   z:'w' is deprecated and will be removed in a future version.1wi  i-	  i8"  i  iQ rj   )	r   r   r:   r;   r   r   r   r   all)r   r   r!   r   i1end_intvi2s   &      r"   test_period_range_length(TestPeriodIndex.test_period_range_length  sv   s*+F2w!||s*+F2w%s*+F2w&   s*,G2w+%%%3''SAA3jlKB B2w'!!!s*:LM2w("""uJ<LM2w'!!!s*:MN2w,&&&''SAA=#.EE26B B 2w"}}ww%**$$$!u~~,,h32w"}}ww(--'''"v!!!J''cBBlD1H Ch32w#b'!!!~~ww"''!!!A BAA BAA CBs$   'J)J=3K)J:	=K	K!	c                ^   R p\         P                  ! \        VR7      ;_uu_ 4        \        RR4      p\        RR4      p\	        W#R7       \        V\        RR4      .4      pRRR4       \        X4      ^8X  g   Q hV^ ,          X8X  g   Q h\         P                  ! \        VR7      ;_uu_ 4        \        \        P                  ! V\        RR4      .4      4      pRRR4       \        V4      ^8X  g   Q hV^ ,          V8X  g   Q hR#   + '       g   i     L; i  + '       g   i     LG; i)r   r   r+  r   
2005-05-01)r   r   z
2005-05-05N)	r:   r;   r   r   r   r	   r   rl   rm   )r   r!   r   r1  r2  s   &    r"   "test_infer_freq_from_first_element2TestPeriodIndex.test_infer_freq_from_first_element*  s    3''SAA=#.ElC0Hu3 h|S(ABCB B 2w!||!u   ''SAARXXxc1J&KLMB B2w!||!u    BA BAs   <D	1,D	D	D,	c           	     "   R p\         P                  ! \        VR7      ;_uu_ 4        \        RR4      pRRR4       X\        RR4      .pRpRp\        P
                  ! \        VR7      ;_uu_ 4        \         P                  ! \        VR7      ;_uu_ 4        \        V4       RRR4       RRR4       \        P                  ! V4      p\        P
                  ! \        VR7      ;_uu_ 4        \         P                  ! \        VR7      ;_uu_ 4        \        V4       RRR4       RRR4       R#   + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     LT; i  + '       g   i     R# ; i)	r   r   r6  r   Nr,  r-  z9Input has different freq=W-SUN from PeriodIndex\(freq=B\)r   )
r:   r;   r   r   r   r   r   r	   rl   rm   )r   r!   r1  r   depr_msgs   &    r"   test_mixed_freq_raises&TestPeriodIndex.test_mixed_freq_raises;  s   3''SAAlC0H B &s34J4]]0<<++MJJD! K = xx~]]0<<++MJJD! K =< BAA KJ =<
 KJ =<<sS   D02%EE	#E-%E=E*	E=0E	EEE'	*E:5E==F	r   z8ignore:Period with BDay freq is deprecated:FutureWarningr5   c                |    \        R V^R7      p\        VP                  VR7      p\        P                  ! W24       R# )z
2001/04/01r  r   N)r   r	   r   r:   r<   )r   r   orgr   s   &&  r"   test_recreate_from_data'TestPeriodIndex.test_recreate_from_dataL  s0     D!D#**40
c'rb   c                x   . ROp\        VRR7      p\        V Uu. uF  p\        V4      NK  	  up4      pVP                  \        4      p\	        V\        4      '       g   Q h\
        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       g   Q h\        P                  ! WT4       R# u upi )  rf   r   c              3   B   "   T F  p\        V\        4      x  K  	  R # 5i)N)r   r  ).0resis   & r"   	<genexpr>CTestPeriodIndex.test_map_with_string_constructor.<locals>.<genexpr>c  s     9ST:dC((Ss   FTN)rB  r   i  )r	   r   r  r  r   r/  r:   r<   )r   rawr   numr>   r   s   &     r"    test_map_with_string_constructor0TestPeriodIndex.test_map_with_string_constructorX  s     Cc*c2cs#c(c23iin #u%%%% s9S9sss9S99999 	c, 3s   B7rA   )Nr   r   ))YErf   )r   rt   )rv   rv   )minrM  )r*  r*  )r8   r   r   r      )rt   r  rf   rv   r   rM  r*  msusr   r(  ).rW   rX   rY   rZ   rp   r|   r   r   r[   r\   r   rl   rm   r	   r   _from_sequencer   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r%  r3  r7  r;  r]   r?  rJ  r^   r_   r`   s   @r"   rd   rd   j   s    *X0 [[tRXX{K<V<VWEE/(>("?<
+(+T, [[U$=>0 ?0B:&2P0( [[Xc
BHHc3Z4H'IJ  K 
&:> [["	
	 [[V_5. 6	. [[V_5. 6.2."`!""" [[L [[C [[ VW( X(
- -rb   rd   c                      a  ] tR tRt o R tR t]P                  P                  RRR.]	P                  ! RR.4      .4      R 4       tRtV tR	# )
TestSimpleNewii  c                   \        R R^RR7      p\        P                  ! \        RR7      ;_uu_ 4        VP	                  VRR7       RRR4       VP	                  VP
                  RR7      p\        P                  ! W!4       Rp\        P                  ! \        VR7      ;_uu_ 4        \        VP
                  4      P	                  \        VP                  4      VP                  R	7       RRR4       \        VP
                  4      P	                  VP                  VP                  R	7      pVP	                  VRR7      p\        P                  ! W!4       R#   + '       g   i     EL; i  + '       g   i     L; i)
r   r   rt   )namer-   r   <class .*PeriodIndex'>r   rU  Nz Should be numpy array of type i8rw   )r   r   r   AssertionError_simple_new_datar:   r<   r   r   r   rx   )r   r   r=   r!   r{   s   &    r"   test_constructor_simple_new)TestSimpleNew.test_constructor_simple_newj  s    93D]]>1IJJOOCcO* K 5
f*0]]>55O''chhsyy'I 6 399o))#((#)))D3/
f* KJJ 65s   E)AE.E+	.E>	c                .   \        . R RR7      p\        P                  ! \        RR7      ;_uu_ 4        VP	                  VRR7       RRR4       VP	                  VP
                  RR7      p\        P                  ! W!4       R#   + '       g   i     LE; i)rt   r   )r   rU  rV  r   rW  N)r	   r   r   rX  rY  rZ  r:   r<   )r   r   r=   s   &  r"   !test_constructor_simple_new_empty/TestSimpleNew.test_constructor_simple_new_empty|  sh    "3S1]]>1IJJOOCcO* K 5
f*	 KJs   BB	r   r   r   c                    \         P                  ! \        R R7      ;_uu_ 4        \        P                  ! V4       RRR4       R#   + '       g   i     R# ; i)z<class r   N)r   r   rX  r	   rY  )r   r   s   &&r"   -test_period_index_simple_new_disallows_floats;TestSimpleNew.test_period_index_simple_new_disallows_floats  s0    ]]>;;##F+ <;;;s   AA	rA   N)rW   rX   rY   rZ   r[  r^  r   r[   r\   rl   rm   ra  r^   r_   r`   s   @r"   rS  rS  i  sK     +$+ [[Xc
BHHc3Z4H'IJ, K,rb   rS  c                   2   a  ] tR tRt o R tR tR tRtV tR# )TestShallowCopyi  c                p    \        . R R7      pVP                  4       pTp\        P                  ! W#4       R# )rt   r   N)r	   _viewr:   r<   )r   r   r=   r>   s   &   r"   test_shallow_copy_empty'TestShallowCopy.test_shallow_copy_empty  s,    "3'
f/rb   c                    \        R ^RR7      p\        P                  ! \        RR7      ;_uu_ 4        VP	                  VP
                  4       RRR4       R#   + '       g   i     R# ; i)
2018-01-01rS   r,   ndarrayr   N)r   r   r   rX  _shallow_copyr   r   r   s   & r"   test_shallow_copy_disallow_i8-TestShallowCopy.test_shallow_copy_disallow_i8  sB    ,=]]>;;RWW% <;;;s   AA*	c                    \        R ^RR7      p\        P                  ! \        RR7      ;_uu_ 4        VP	                  V4       RRR4       R#   + '       g   i     R# ; i)rj  rS   r,   r	   r   N)r   r   r   rX  rl  rm  s   & r"   0test_shallow_copy_requires_disallow_period_index@TestShallowCopy.test_shallow_copy_requires_disallow_period_index  s?    ,=]]>??R  @???s   AA 	rA   N)	rW   rX   rY   rZ   rg  rn  rq  r^   r_   r`   s   @r"   rd  rd    s     0&! !rb   rd  c                   ,   a  ] tR tRt o R tR tRtV tR# )TestSeriesPeriodi  c           
         R p\         P                  ! \        VR7      ;_uu_ 4        \        \	        R^
RR7      \
        R7       RRR4       R#   + '       g   i     R# ; i)z(Cannot cast PeriodIndex to dtype float64r   z
2000-01-01rv   r,   rw   N)r   r   r   r
   r   floatr   s   & r"   !test_constructor_cant_cast_period2TestSeriesPeriod.test_constructor_cant_cast_period  s:    8]]9C00<bsC5Q 1000s   AA 	c                    \        R ^
R7      p\        V\        R4      R7      p\        V4      p\        P                  ! W#4       R# )z1/1/2000)r-   rv   rw   N)r   r
   r   r:   assert_series_equal)r   r   serr   s   &   r"   test_constructor_cast_object-TestSeriesPeriod.test_constructor_cast_object  s6    *b1R{3/0Rj
s(rb   rA   N)rW   rX   rY   rZ   rw  r|  r^   r_   r`   s   @r"   rt  rt    s     R
) )rb   rt  )numpyrl   r   pandas._libs.tslibs.periodr   pandas.errorsr   pandas.core.dtypes.dtypesr   pandasr   r   r   r	   r
   r   r   r   pandas._testing_testingr:   pandas.core.arraysr   r   rd   rS  rd  rt  rA   rb   r"   <module>r     sd      < ( 1	 	 	  *P0 P0f|- |-~, ,D! !*
) 
)rb   