-
-
Notifications
You must be signed in to change notification settings - Fork 150
Open
Labels
CategoricalCategorical Data TypeCategorical Data TypeNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further actionNeeds TriageIssue that has not been reviewed by a pandas team memberIssue that has not been reviewed by a pandas team memberSeriesSeries data structureSeries data structurehelp wantedExtra attention is neededExtra attention is needed
Description
After #1383 and #1391, pd.Series([1], dtype="category")
gives Series[CategoricalDtype]
.
Is it the best idea to follow? Typically we use the type of elements as the Generic
type of a Series
or Index
, for example Series[int]
, instead of Series[Int64Dtype]
. The current approach seems inconsistent to me.
This is also related to #1395, where
Series([1], dtype=int)
:dtype
isnp.dtype("int64")
, element type isnp.int64
. Currently this isSeries[int]
inpandas-stubs
.Series([1], dtype="Int64")
:dtype
ispd.Int64Dtype
, element type is (built-in)int
. Currently this isSeries[Any]
inpandas-stubs
.
We will discuss the last part in #1395, here it is just an illustrative example.
Metadata
Metadata
Assignees
Labels
CategoricalCategorical Data TypeCategorical Data TypeNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further actionNeeds TriageIssue that has not been reviewed by a pandas team memberIssue that has not been reviewed by a pandas team memberSeriesSeries data structureSeries data structurehelp wantedExtra attention is neededExtra attention is needed