-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
Dtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversionsDuplicate ReportDuplicate issue or pull requestDuplicate issue or pull requestEnhancementNA - MaskedArraysRelated to pd.NA and nullable extension arraysRelated to pd.NA and nullable extension arraysNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further action
Description
Feature Type
-
Adding new functionality to pandas
-
Changing existing functionality in pandas
-
Removing existing functionality in pandas
Problem Description
When a list that contains integers and pd.NA
s is cast in a pandas object, the column becomes dtype=object
. An example illustrating the issue:
Feature Description
pd.Series([pd.NA, 1]).dtype # object
Alternative Solutions
Is it possible to cast it into an Extension Dtype such as 'Int64'
or at least a numeric dtype such as float64
or Float64
?
Additional Context
No response
Metadata
Metadata
Assignees
Labels
Dtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversionsDuplicate ReportDuplicate issue or pull requestDuplicate issue or pull requestEnhancementNA - MaskedArraysRelated to pd.NA and nullable extension arraysRelated to pd.NA and nullable extension arraysNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further action