Skip to content

Commit 0963f7a

Browse files
closes pandas-dev#44914 by changing the path object to string if it is of io.BufferedWriter type.
1 parent 6b43a78 commit 0963f7a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

doc/source/whatsnew/v1.4.0.rst

+1
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,7 @@ I/O
935935
- Bug in :func:`read_json` raising ``ValueError`` when attempting to parse json strings containing "://" (:issue:`36271`)
936936
- Bug in :func:`read_csv` when ``engine="c"`` and ``encoding_errors=None`` which caused a segfault (:issue:`45180`)
937937
- Bug in :func:`read_csv` an invalid value of ``usecols`` leading to an un-closed file handle (:issue:`45384`)
938+
- Bug in :func:`read_parquet` when ``engine="pyarrow"`` which caused partial write to disk when column of unsupported datatype was passed (:issue:`44914`)
938939

939940
Period
940941
^^^^^^

pandas/io/parquet.py

+3
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ def write(
180180
mode="wb",
181181
is_dir=partition_cols is not None,
182182
)
183+
if isinstance(path_or_handle, WriteBuffer):
184+
path_or_handle = path_or_handle.raw.name
185+
183186
try:
184187
if partition_cols is not None:
185188
# writes to multiple files under the given path

0 commit comments

Comments
 (0)