We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
pyarrow
1 parent ef97dd4 commit e3f1687Copy full SHA for e3f1687
pandas/io/parquet.py
@@ -13,6 +13,7 @@
13
FilePathOrBuffer,
14
StorageOptions,
15
)
16
+from pandas.compat import pa_version_under4p0
17
from pandas.compat._optional import import_optional_dependency
18
from pandas.errors import AbstractMethodError
19
from pandas.util._decorators import doc
@@ -179,6 +180,12 @@ def write(
179
180
mode="wb",
181
is_dir=partition_cols is not None,
182
183
+
184
+ # Output compliant Parquet if PyArrow supports it and the user hasn't
185
+ # explicitly set the desired behavior
186
+ if not pa_version_under4p0 and "use_compliant_nested_type" not in kwargs:
187
+ kwargs["use_compliant_nested_type"] = True
188
189
try:
190
if partition_cols is not None:
191
# writes to multiple files under the given path
0 commit comments