@@ -2276,57 +2276,57 @@ def test_categorical_repr_period(self):
2276
2276
idx = pd .period_range ('2011-01-01 09:00' , freq = 'H' , periods = 5 )
2277
2277
c = pd .Categorical (idx )
2278
2278
exp = """[2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00, 2011-01-01 13:00]
2279
- Categories (5, period): [2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00,
2280
- 2011-01-01 13:00]"""
2279
+ Categories (5, period[H] ): [2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00,
2280
+ 2011-01-01 13:00]"""
2281
2281
2282
2282
self .assertEqual (repr (c ), exp )
2283
2283
2284
2284
c = pd .Categorical (idx .append (idx ), categories = idx )
2285
2285
exp = """[2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00, 2011-01-01 13:00, 2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00, 2011-01-01 13:00]
2286
- Categories (5, period): [2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00,
2287
- 2011-01-01 13:00]"""
2286
+ Categories (5, period[H] ): [2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00,
2287
+ 2011-01-01 13:00]"""
2288
2288
2289
2289
self .assertEqual (repr (c ), exp )
2290
2290
2291
2291
idx = pd .period_range ('2011-01' , freq = 'M' , periods = 5 )
2292
2292
c = pd .Categorical (idx )
2293
2293
exp = """[2011-01, 2011-02, 2011-03, 2011-04, 2011-05]
2294
- Categories (5, period): [2011-01, 2011-02, 2011-03, 2011-04, 2011-05]"""
2294
+ Categories (5, period[M] ): [2011-01, 2011-02, 2011-03, 2011-04, 2011-05]"""
2295
2295
2296
2296
self .assertEqual (repr (c ), exp )
2297
2297
2298
2298
c = pd .Categorical (idx .append (idx ), categories = idx )
2299
2299
exp = """[2011-01, 2011-02, 2011-03, 2011-04, 2011-05, 2011-01, 2011-02, 2011-03, 2011-04, 2011-05]
2300
- Categories (5, period): [2011-01, 2011-02, 2011-03, 2011-04, 2011-05]"""
2300
+ Categories (5, period[M] ): [2011-01, 2011-02, 2011-03, 2011-04, 2011-05]"""
2301
2301
2302
2302
self .assertEqual (repr (c ), exp )
2303
2303
2304
2304
def test_categorical_repr_period_ordered (self ):
2305
2305
idx = pd .period_range ('2011-01-01 09:00' , freq = 'H' , periods = 5 )
2306
2306
c = pd .Categorical (idx , ordered = True )
2307
2307
exp = """[2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00, 2011-01-01 13:00]
2308
- Categories (5, period): [2011-01-01 09:00 < 2011-01-01 10:00 < 2011-01-01 11:00 < 2011-01-01 12:00 <
2309
- 2011-01-01 13:00]"""
2308
+ Categories (5, period[H] ): [2011-01-01 09:00 < 2011-01-01 10:00 < 2011-01-01 11:00 < 2011-01-01 12:00 <
2309
+ 2011-01-01 13:00]"""
2310
2310
2311
2311
self .assertEqual (repr (c ), exp )
2312
2312
2313
2313
c = pd .Categorical (idx .append (idx ), categories = idx , ordered = True )
2314
2314
exp = """[2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00, 2011-01-01 13:00, 2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00, 2011-01-01 13:00]
2315
- Categories (5, period): [2011-01-01 09:00 < 2011-01-01 10:00 < 2011-01-01 11:00 < 2011-01-01 12:00 <
2316
- 2011-01-01 13:00]"""
2315
+ Categories (5, period[H] ): [2011-01-01 09:00 < 2011-01-01 10:00 < 2011-01-01 11:00 < 2011-01-01 12:00 <
2316
+ 2011-01-01 13:00]"""
2317
2317
2318
2318
self .assertEqual (repr (c ), exp )
2319
2319
2320
2320
idx = pd .period_range ('2011-01' , freq = 'M' , periods = 5 )
2321
2321
c = pd .Categorical (idx , ordered = True )
2322
2322
exp = """[2011-01, 2011-02, 2011-03, 2011-04, 2011-05]
2323
- Categories (5, period): [2011-01 < 2011-02 < 2011-03 < 2011-04 < 2011-05]"""
2323
+ Categories (5, period[M] ): [2011-01 < 2011-02 < 2011-03 < 2011-04 < 2011-05]"""
2324
2324
2325
2325
self .assertEqual (repr (c ), exp )
2326
2326
2327
2327
c = pd .Categorical (idx .append (idx ), categories = idx , ordered = True )
2328
2328
exp = """[2011-01, 2011-02, 2011-03, 2011-04, 2011-05, 2011-01, 2011-02, 2011-03, 2011-04, 2011-05]
2329
- Categories (5, period): [2011-01 < 2011-02 < 2011-03 < 2011-04 < 2011-05]"""
2329
+ Categories (5, period[M] ): [2011-01 < 2011-02 < 2011-03 < 2011-04 < 2011-05]"""
2330
2330
2331
2331
self .assertEqual (repr (c ), exp )
2332
2332
@@ -2515,8 +2515,8 @@ def test_categorical_series_repr_period(self):
2515
2515
3 2011-01-01 12:00
2516
2516
4 2011-01-01 13:00
2517
2517
dtype: category
2518
- Categories (5, period): [2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00,
2519
- 2011-01-01 13:00]"""
2518
+ Categories (5, period[H] ): [2011-01-01 09:00, 2011-01-01 10:00, 2011-01-01 11:00, 2011-01-01 12:00,
2519
+ 2011-01-01 13:00]"""
2520
2520
2521
2521
self .assertEqual (repr (s ), exp )
2522
2522
@@ -2528,7 +2528,7 @@ def test_categorical_series_repr_period(self):
2528
2528
3 2011-04
2529
2529
4 2011-05
2530
2530
dtype: category
2531
- Categories (5, period): [2011-01, 2011-02, 2011-03, 2011-04, 2011-05]"""
2531
+ Categories (5, period[M] ): [2011-01, 2011-02, 2011-03, 2011-04, 2011-05]"""
2532
2532
2533
2533
self .assertEqual (repr (s ), exp )
2534
2534
@@ -2541,8 +2541,8 @@ def test_categorical_series_repr_period_ordered(self):
2541
2541
3 2011-01-01 12:00
2542
2542
4 2011-01-01 13:00
2543
2543
dtype: category
2544
- Categories (5, period): [2011-01-01 09:00 < 2011-01-01 10:00 < 2011-01-01 11:00 < 2011-01-01 12:00 <
2545
- 2011-01-01 13:00]"""
2544
+ Categories (5, period[H] ): [2011-01-01 09:00 < 2011-01-01 10:00 < 2011-01-01 11:00 < 2011-01-01 12:00 <
2545
+ 2011-01-01 13:00]"""
2546
2546
2547
2547
self .assertEqual (repr (s ), exp )
2548
2548
@@ -2554,7 +2554,7 @@ def test_categorical_series_repr_period_ordered(self):
2554
2554
3 2011-04
2555
2555
4 2011-05
2556
2556
dtype: category
2557
- Categories (5, period): [2011-01 < 2011-02 < 2011-03 < 2011-04 < 2011-05]"""
2557
+ Categories (5, period[M] ): [2011-01 < 2011-02 < 2011-03 < 2011-04 < 2011-05]"""
2558
2558
2559
2559
self .assertEqual (repr (s ), exp )
2560
2560
0 commit comments