-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Open
Labels
CategoricalCategorical Data TypeCategorical Data TypeIntervalInterval data typeInterval data typePerformanceMemory or execution speed performanceMemory or execution speed performance
Description
This line converts the IntervalIndex
into a numpy object array:
pandas/pandas/core/dtypes/dtypes.py
Line 520 in faf3bbb
cat_array = hash_array(np.asarray(categories), categorize=False) |
then in this block, a TypeError is raised and causes that object array to be converted into strings:
TypeError: (-0.00872, 0.439] of type <class 'pandas._libs.interval.Interval'> is not a valid type for hashing, must be string or null
pandas/pandas/core/util/hashing.py
Lines 333 to 339 in faf3bbb
try: | |
vals = hash_object_array(vals, hash_key, encoding) | |
except TypeError: | |
# we have mixed types | |
vals = hash_object_array( | |
vals.astype(str).astype(object), hash_key, encoding | |
) |
Metadata
Metadata
Assignees
Labels
CategoricalCategorical Data TypeCategorical Data TypeIntervalInterval data typeInterval data typePerformanceMemory or execution speed performanceMemory or execution speed performance