-
Notifications
You must be signed in to change notification settings - Fork 10
DuckDB read/write integration #220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
DuckDB read/write integration #220
Conversation
422bc49
to
7378065
Compare
pandas_metadata = { | ||
"columns": [], | ||
"index_columns": [], # this function is only called if no pandas metadata is present, ergo we do not have any index columns | ||
"pandas_version": pd.__version__, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please hardcode the pandas version here. We are not using pandas
at all but hardcode the logic that pandes uses at the time of writing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apparently, the "logic" uses at the time of writing is to just use the current version. So should I keep the pd.__version__
?
plateau/io/duckdb/helper.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These functions all look familiar. Are these arrow rewrites of ones that exist as pandas versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
align_categories is:
-
helper/align_categories is rewrite of:
plateau/plateau/io_components/utils.py
Line 295 in 7190d1b
def align_categories(dfs, categoricals): -
cast_categoricals_to_dictionary is a take on
Line 269 in 7190d1b
empty_df = empty_df.astype(dict.fromkeys(categoricals, "category")) -
Just noticed that empty_table_from_schema can be a one-liner conversion
Co-authored-by: Uwe L. Korn <[email protected]>
Remove prints.
aaa2305
to
1cdae26
Compare
@xhochy do you think we can get this merged today? |
Add initial support for duckdb (and pyarrow) s.t. no conversion to
pandas.DataFrame
is performed.