Open
Description
dti = pd.date_range("2016-01-01", periods=3)
ci = pd.Categorical(dti._values)
>>> pd.Categorical(["foo"], dtype=ci.dtype)
[NaT]
Categories (3, datetime64[ns]): [2016-01-01, 2016-01-02, 2016-01-03]
Casting "foo" to pd.NaT here makes very little sense to me, and does not match the behavior of any of our other constructors. I'm pretty sure this is why we have to do so much special-casing for Categorical in dtypes.cast and groupby ops.
Suggestion: we change/deprecate the behavior to raise instead of cast.