Skip to content

Infer filesystem from path when writing a partitioned DataFrame to remote file systems using pyarrow #34842

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

Closed
wants to merge 12 commits into from
Next Next commit
Pass filesystem to parquet.write_table and parquet.write_to_dataset
  • Loading branch information
Yuan Chuan Kee committed Jun 18, 2020
commit fdb3d7c8cfe8ebb5f7cdd61c0246b40d08d7977a
7 changes: 6 additions & 1 deletion pandas/io/parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,17 @@ def write(
table,
path,
compression=compression,
filesystem=get_fs_for_path(path),
partition_cols=partition_cols,
**kwargs,
)
else:
self.api.parquet.write_table(
table, file_obj_or_path, compression=compression, **kwargs
table,
file_obj_or_path,
compression=compression,
filesystem=get_fs_for_path(path),
**kwargs
)
if should_close:
file_obj_or_path.close()
Expand Down