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 intentionally? If latter - for what reason?
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 intentionally? If latter - for what reason?
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).