Skip to content

feat: add engine parameter to read_parquet #413

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

Merged
merged 9 commits into from
Mar 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
preserve null integers
  • Loading branch information
tswast committed Mar 6, 2024
commit 8c83b8bf414f4f0b7300b416480baecea3cc5384
12 changes: 11 additions & 1 deletion bigframes/session/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,17 @@ def read_parquet(

return self._read_bigquery_load_job(path, table, job_config=job_config)
else:
pandas_obj = pandas.read_parquet(path, engine=engine) # type: ignore
read_parquet_kwargs: Dict[str, Any] = {}
if pandas.__version__.startswith("1."):
read_parquet_kwargs["use_nullable_dtypes"] = True
else:
read_parquet_kwargs["dtype_backend"] = "pyarrow"

pandas_obj = pandas.read_parquet(
path,
engine=engine,
**read_parquet_kwargs,
) # type: ignore
return self._read_pandas(pandas_obj, "read_parquet")

def read_json(
Expand Down