community: Register pandas df in duckdb when creating vector_store (#23690)

- **Description:** Register pandas df in duckdb when creating
vector_store
- **Issue:** Resolves #23308
- **Dependencies:** None
- **Twitter handle:** @timvw

Co-authored-by: Tim Van Wassenhove <tim.van.wassenhove@telenetgroup.be>
pull/23589/head^2
Tim Van Wassenhove 3 months ago committed by GitHub
parent b60df8bb4f
commit 24916c6703
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -191,6 +191,7 @@ class DuckDB(VectorStore):
if have_pandas:
# noinspection PyUnusedLocal
df = pd.DataFrame.from_dict(data) # noqa: F841
self._connection.register("df", df)
self._connection.execute(
f"INSERT INTO {self._table_name} SELECT * FROM df",
)

Loading…
Cancel
Save