Skip to content

Support for numpy strings #5261

Closed
Closed
@cancan101

Description

This is more of a question than an issue:

why does Pandas use object type rather than the native fixed length numpy strings?

For example:

In [24]: np.array(["foo", "baz"])
Out[24]: 
array(['foo', 'baz'], 
      dtype='|S3')

but:

In [29]: pd.DataFrame({"a":np.array(["foo", "baz"])}).dtypes
Out[29]: 
a    object
dtype: object

Metadata

Assignees

No one assigned

    Labels

    Dtype ConversionsUnexpected or buggy dtype conversionsEnhancementPerformanceMemory or execution speed performanceStringsString extension data type and string data

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions