-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Labels
Description
What happens?
This code is working with duckdb 1.4.3 and pandas 2.3.3, but is crashing with 3.0.0, most probably from the new "str" pandas type.
It raises the following error :
conn.execute("CREATE TABLE ma_table AS SELECT * FROM df")
_duckdb.NotImplementedException: Not implemented Error: Data type 'str' not recognized
To Reproduce
import pandas as pd
import duckdb
# Create dummy dataframe
data = {"colonne": ["aa", "bb"]}
df = pd.DataFrame(data)
# Connect to DuckDB (it will create a new database file if it doesn't exist)
conn = duckdb.connect(database="./my_base.duckdb")
# Create table from dataframe
conn.execute("CREATE TABLE my_table AS SELECT * FROM df")
# Verify the table creation
resultat = conn.execute("SELECT * FROM my_table").fetchdf()
print(resultat)
# Close the connection
conn.close()OS:
Windows 11
DuckDB Package Version:
1.4.3
Python Version:
3.11
Full Name:
Bastien
Affiliation:
me
What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.
I have tested with a stable release
Did you include all relevant data sets for reproducing the issue?
Yes
Did you include all code required to reproduce the issue?
- Yes, I have
Did you include all relevant configuration to reproduce the issue?
- Yes, I have