Skip to content

Commit db55f47

Browse files
giba0jorisvandenbossche
authored andcommitted
DOC: Ambiguous description in to_parquet engine documentation (#19669)
1 parent 6cd42eb commit db55f47

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

pandas/core/frame.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -1678,9 +1678,10 @@ def to_parquet(self, fname, engine='auto', compression='snappy',
16781678
fname : str
16791679
string file path
16801680
engine : {'auto', 'pyarrow', 'fastparquet'}, default 'auto'
1681-
Parquet reader library to use. If 'auto', then the option
1682-
'io.parquet.engine' is used. If 'auto', then the first
1683-
library to be installed is used.
1681+
Parquet library to use. If 'auto', then the option
1682+
``io.parquet.engine`` is used. The default ``io.parquet.engine``
1683+
behavior is to try 'pyarrow', falling back to 'fastparquet' if
1684+
'pyarrow' is unavailable.
16841685
compression : {'snappy', 'gzip', 'brotli', None}, default 'snappy'
16851686
Name of the compression to use. Use ``None`` for no compression.
16861687
kwargs

pandas/io/parquet.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,10 @@ def to_parquet(df, path, engine='auto', compression='snappy', **kwargs):
244244
path : string
245245
File path
246246
engine : {'auto', 'pyarrow', 'fastparquet'}, default 'auto'
247-
Parquet reader library to use. If 'auto', then the option
248-
'io.parquet.engine' is used. If 'auto', then the first
249-
library to be installed is used.
247+
Parquet library to use. If 'auto', then the option
248+
``io.parquet.engine`` is used. The default ``io.parquet.engine``
249+
behavior is to try 'pyarrow', falling back to 'fastparquet' if
250+
'pyarrow' is unavailable.
250251
compression : {'snappy', 'gzip', 'brotli', None}, default 'snappy'
251252
Name of the compression to use. Use ``None`` for no compression.
252253
kwargs
@@ -271,9 +272,10 @@ def read_parquet(path, engine='auto', columns=None, **kwargs):
271272
272273
.. versionadded 0.21.1
273274
engine : {'auto', 'pyarrow', 'fastparquet'}, default 'auto'
274-
Parquet reader library to use. If 'auto', then the option
275-
'io.parquet.engine' is used. If 'auto', then the first
276-
library to be installed is used.
275+
Parquet library to use. If 'auto', then the option
276+
``io.parquet.engine`` is used. The default ``io.parquet.engine``
277+
behavior is to try 'pyarrow', falling back to 'fastparquet' if
278+
'pyarrow' is unavailable.
277279
kwargs are passed to the engine
278280
279281
Returns

0 commit comments

Comments
 (0)