Skip to content

Float Index Interpreted as Object dtype #5914

Closed
@theandygross

Description

@theandygross

When I cast a FloatIndex to a numpy array, I get an array of objects. The desired behavior should be float. This is backwards incompatible with pre-FloatIndex behavior.

In [119]:   s = pd.Series([1,2,3],[1.,2.,3.])
               array(s.index).dtype

Out[119]:  dtype('O')

The Int64Index works as expected.

In [114]:    s = pd.Series([1,2,3],[1,2,3])
                array(s.index).dtype

Out[114]:  dtype('int64')

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugDtype ConversionsUnexpected or buggy dtype conversionsNumeric OperationsArithmetic, Comparison, and Logical operations

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions