-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
What happens?
In https://github.com/duckdb/duckdb/blob/5abc6983ed92847310219ab112db969ebd12d733/tools/pythonpkg/duckdb-stubs/__init__.pyi, the df method on DuckDBPyConnection is listed as taking a pandas.DataFrame and returning a DuckDBPyRelation. However this doesn't match the runtime behavior or the historical behavior of the duckdb python bindings:
Python 3.9.9 (main, Dec 13 2021, 11:20:38)
[Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import duckdb
>>> import pandas
>>> con = duckdb.connect()
>>> results = con.execute("SELECT 42").df()
>>> type(results)
<class 'pandas.core.frame.DataFrame'>(adapted from https://duckdb.org/docs/guides/python/execute_sql)
It looks like the type signatures may have slowly broken over the course of a few commits:
To Reproduce
See above
OS:
OSX, apple silicon
DuckDB Version:
0.6.0
DuckDB Client:
Python
Full Name:
Carl Jackson
Affiliation:
Watershed
Have you tried this on the latest master branch?
- I agree
Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?
- I agree
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels