Skip to content
Discussion options

You must be logged in to vote

To retrieve the original pandas DataFrame from the DuckDB vector database, you can use the duckdb package to execute a query and fetch the results into a DataFrame. Here is an example of how you can do this:

import duckdb
import pandas as pd

# Connect to the DuckDB database
conn = duckdb.connect('path_to_your_database.duckdb')

# Execute a query to retrieve the data from the table
df = conn.execute('SELECT * FROM documents').fetchdf()

# Now df is a pandas DataFrame containing the data from the DuckDB table
print(df)

Replace 'path_to_your_database.duckdb' with the path to your DuckDB database file. This code will connect to the DuckDB database, execute a query to select all data from the

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@mraguth
Comment options

@dosubot
Comment options

@mraguth
Comment options

@dosubot
Comment options

Answer selected by mraguth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant