Skip to content Skip to sidebar Skip to footer

Pandas.Series.dtype.kind Is None For Pd.interval

Test code: s = pd.Series(pd.array([pd.Interval(0,1.2), pd.Interval(5,123)])) s.dtype s.dtype.kind is None >>> interval[float64] >>> True Is it some bug or made

Solution 1:

The reason this is appearing as None is simply because the implementation of IntervalDtype explicitly sets kind = None. This should probably be updated to 'O', though some care is needed here as it will result in unintended side effects, e.g. this would cause is_string_dtype to return True (see here).


Post a Comment for "Pandas.Series.dtype.kind Is None For Pd.interval"