62
62
randbool ,
63
63
rands ,
64
64
rands_array ,
65
- randu_array ,
66
65
)
67
66
from pandas ._testing ._warnings import ( # noqa:F401
68
67
assert_produces_warning ,
@@ -305,10 +304,6 @@ def makeStringIndex(k=10, name=None):
305
304
return Index (rands_array (nchars = 10 , size = k ), name = name )
306
305
307
306
308
- def makeUnicodeIndex (k = 10 , name = None ):
309
- return Index (randu_array (nchars = 10 , size = k ), name = name )
310
-
311
-
312
307
def makeCategoricalIndex (k = 10 , n = 3 , name = None , ** kwargs ):
313
308
"""make a length k index or n categories"""
314
309
x = rands_array (nchars = 4 , size = n , replace = False )
@@ -521,10 +516,10 @@ def makeCustomIndex(
521
516
label will repeated at the corresponding level, you can specify just
522
517
the first few, the rest will use the default ndupe_l of 1.
523
518
len(ndupe_l) <= nlevels.
524
- idx_type - "i"/"f"/"s"/"u"/" dt"/"p"/"td".
519
+ idx_type - "i"/"f"/"s"/"dt"/"p"/"td".
525
520
If idx_type is not None, `idx_nlevels` must be 1.
526
521
"i"/"f" creates an integer/float index,
527
- "s"/"u" creates a string/unicode index
522
+ "s" creates a string
528
523
"dt" create a datetime index.
529
524
"td" create a datetime index.
530
525
@@ -554,7 +549,6 @@ def makeCustomIndex(
554
549
"i" : makeIntIndex ,
555
550
"f" : makeFloatIndex ,
556
551
"s" : makeStringIndex ,
557
- "u" : makeUnicodeIndex ,
558
552
"dt" : makeDateIndex ,
559
553
"td" : makeTimedeltaIndex ,
560
554
"p" : makePeriodIndex ,
@@ -569,7 +563,7 @@ def makeCustomIndex(
569
563
elif idx_type is not None :
570
564
raise ValueError (
571
565
f"{ repr (idx_type )} is not a legal value for `idx_type`, "
572
- "use 'i'/'f'/'s'/'u'/' dt'/'p'/'td'."
566
+ "use 'i'/'f'/'s'/'dt'/'p'/'td'."
573
567
)
574
568
575
569
if len (ndupe_l ) < nlevels :
@@ -651,10 +645,10 @@ def makeCustomDataframe(
651
645
nrows/ncol, the last label might have lower multiplicity.
652
646
dtype - passed to the DataFrame constructor as is, in case you wish to
653
647
have more control in conjunction with a custom `data_gen_f`
654
- r_idx_type, c_idx_type - "i"/"f"/"s"/"u"/" dt"/"td".
648
+ r_idx_type, c_idx_type - "i"/"f"/"s"/"dt"/"td".
655
649
If idx_type is not None, `idx_nlevels` must be 1.
656
650
"i"/"f" creates an integer/float index,
657
- "s"/"u" creates a string/unicode index
651
+ "s" creates a string index
658
652
"dt" create a datetime index.
659
653
"td" create a timedelta index.
660
654
@@ -689,10 +683,10 @@ def makeCustomDataframe(
689
683
assert c_idx_nlevels > 0
690
684
assert r_idx_nlevels > 0
691
685
assert r_idx_type is None or (
692
- r_idx_type in ("i" , "f" , "s" , "u" , " dt" , "p" , "td" ) and r_idx_nlevels == 1
686
+ r_idx_type in ("i" , "f" , "s" , "dt" , "p" , "td" ) and r_idx_nlevels == 1
693
687
)
694
688
assert c_idx_type is None or (
695
- c_idx_type in ("i" , "f" , "s" , "u" , " dt" , "p" , "td" ) and c_idx_nlevels == 1
689
+ c_idx_type in ("i" , "f" , "s" , "dt" , "p" , "td" ) and c_idx_nlevels == 1
696
690
)
697
691
698
692
columns = makeCustomIndex (
0 commit comments