File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 106
106
is_scalar ,
107
107
is_signed_integer_dtype ,
108
108
is_string_dtype ,
109
- is_unsigned_integer_dtype ,
110
109
needs_i8_conversion ,
111
110
pandas_dtype ,
112
111
validate_all_hashable ,
@@ -591,20 +590,20 @@ def _dtype_to_subclass(cls, dtype: DtypeObj):
591
590
592
591
return TimedeltaIndex
593
592
594
- elif is_float_dtype ( dtype ) :
593
+ elif dtype . kind == "f" :
595
594
from pandas .core .api import Float64Index
596
595
597
596
return Float64Index
598
- elif is_unsigned_integer_dtype ( dtype ) :
597
+ elif dtype . kind == "u" :
599
598
from pandas .core .api import UInt64Index
600
599
601
600
return UInt64Index
602
- elif is_signed_integer_dtype ( dtype ) :
601
+ elif dtype . kind == "i" :
603
602
from pandas .core .api import Int64Index
604
603
605
604
return Int64Index
606
605
607
- elif dtype == _dtype_obj :
606
+ elif dtype . kind == "O" :
608
607
# NB: assuming away MultiIndex
609
608
return Index
610
609
You can’t perform that action at this time.
0 commit comments