You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Greetings, Pandas devs! cuDF is building out additional dtypes such as cudf.CategoricalDtype and cudf.ListDtype based on pd.ExtensionDtype, and this is one question that came up.
It’s expected ExtensionArray[item] returns an instance of ExtensionDtype.type for scalar item, assuming that value is valid (not NA). NA values do not need to be instances of type.
However, I note that pd.CategoricalDtype for instance does not adhere to this:
The CategoricalDtype.type issue is discussed a bit at #22938 (comment). Categorical is a bit hard since it can hold anything, (including no categories, for backwards compatibility).
IIRC you're using pyarrow for ListDtype, so I would expect something like like pyarrow's ListValue or some cudf wrapper around it.
In [10]: a=pa.array([[1, 2]])
In [11]: type(a[0])
Out[11]: pyarrow.lib.ListValue
Greetings, Pandas devs! cuDF is building out additional dtypes such as
cudf.CategoricalDtype
andcudf.ListDtype
based onpd.ExtensionDtype
, and this is one question that came up.The documentation states:
However, I note that
pd.CategoricalDtype
for instance does not adhere to this:On the other hand, NumPy defines
dtype.type
somewhat differently:Would love any insights as to the appropriate return value of
.type
.The text was updated successfully, but these errors were encountered: