Skip to content

Pandas v3 issue with new str dtype #291

@liquidcarbon

Description

@liquidcarbon

What happens?

Highlights of pandas 3.0

...
Dedicated string data type by default: string columns are now inferred as the new str dtype instead of object, providing better performance and type safety

When you query a pandas dataframe containing new str dtypes via DuckDB, you get

_duckdb.NotImplementedException: Not implemented Error: Data type 'str' not recognized

To Reproduce

import duckdb

duckdb_rel = duckdb.sql("FROM 'https://raw.githubusercontent.com/liquidcarbon/chembiodata/main/isotopes.csv'")
pandas3_df = duckdb_rel.df()

duckdb.sql("FROM duckdb_rel")  # works
duckdb.sql("FROM pandas3_df")  # fails

OS:

any

DuckDB Version:

1.4.3

DuckDB Client:

python

Hardware:

No response

Full Name:

Alex

Affiliation:

self

Did you include all relevant configuration (e.g., CPU architecture, Linux distribution) to reproduce the issue?

  • Yes, I have

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant data sets for reproducing the issue?

Yes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions